45666
This commit is contained in:
parent
c1bfcc3840
commit
cd5a008a36
@ -55,6 +55,11 @@ public class StatsCaseClinicalController extends BaseController {
|
|||||||
return Response.success(new StatsCaseClinicalDto());
|
return Response.success(new StatsCaseClinicalDto());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Long articleReadNum = caseClinicalArticleDao.getTotalReadNum();
|
||||||
|
Long videoReadNum = caseClinicalVideoDao.getTotalReadNum();
|
||||||
|
g.setArticleReadNum(Math.toIntExact(articleReadNum));
|
||||||
|
g.setVideoNum(Math.toIntExact(videoReadNum));
|
||||||
|
|
||||||
return Response.success(g);
|
return Response.success(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,6 +55,14 @@ public interface CaseClinicalArticleDao extends BaseMapper<CaseClinicalArticleMo
|
|||||||
@Param("labelIden") String labelIden
|
@Param("labelIden") String labelIden
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有未删除文章的阅读量总和
|
||||||
|
*
|
||||||
|
* @return 阅读量总和
|
||||||
|
*/
|
||||||
|
@Select("SELECT SUM(read_num) FROM case_clinical_article WHERE delete_status = 0 and article_status = 1")
|
||||||
|
Long getTotalReadNum();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inc 自增
|
* Inc 自增
|
||||||
* @param articleId 文章 ID
|
* @param articleId 文章 ID
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.example.caseData.dto.caseClinicalVideo.CaseClinicalVideoDto;
|
|||||||
import com.example.caseData.model.CaseClinicalVideoModel;
|
import com.example.caseData.model.CaseClinicalVideoModel;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.apache.ibatis.annotations.Update;
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -99,4 +100,12 @@ public interface CaseClinicalVideoDao extends BaseMapper<CaseClinicalVideoModel>
|
|||||||
* @return 最新发表时间,无数据时返回 null
|
* @return 最新发表时间,无数据时返回 null
|
||||||
*/
|
*/
|
||||||
LocalDateTime selectLastVideoPushDateByLabelId(@Param("labelIden") String labelIden);
|
LocalDateTime selectLastVideoPushDateByLabelId(@Param("labelIden") String labelIden);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有未删除文章的阅读量总和
|
||||||
|
*
|
||||||
|
* @return 阅读量总和
|
||||||
|
*/
|
||||||
|
@Select("SELECT SUM(read_num) FROM case_clinical_video WHERE delete_status = 0 and video_status = 1")
|
||||||
|
Long getTotalReadNum();
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user