新增湖分标签

This commit is contained in:
wuchunlei
2025-04-17 17:43:24 +08:00
parent 8286cf2034
commit a5a81680ca
2 changed files with 55 additions and 1 deletions

View File

@@ -33,10 +33,14 @@ public class UserContributionController {
public R getUserContribution(){
Integer userId = ShiroUtils.getUId();
//各分类总分
MPJLambdaWrapper wrapper = new MPJLambdaWrapper();
MPJLambdaWrapper<UserContribution> wrapper = new MPJLambdaWrapper();
wrapper.leftJoin(com.peanut.modules.book.entity.SysDictDataEntity.class,
com.peanut.modules.book.entity.SysDictDataEntity::getDictType,UserContribution::getType);
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,"userContributionLabel");
wrapper.eq("user_id",userId);
wrapper.select("type");
wrapper.select("sum(score) as score");
wrapper.select(com.peanut.modules.book.entity.SysDictDataEntity::getDictValue);
wrapper.groupBy("type");
List contributions = contributionService.listMaps(wrapper);
//统计总分