Commit 91216ed4 authored by hezhen's avatar hezhen

123

parent ec701597
......@@ -35,6 +35,10 @@ public class UserInfoDTO {
private BigDecimal balance;
@ApiModelProperty(value = "用户收藏总数")
private Integer userCollectNumber;
......
......@@ -142,4 +142,12 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
List<AppUserCollect> collect = mapper.select(appUserCollect);
return CollectionUtils.isNotEmpty(collect);
}
public Integer getUserCollectNumber(Integer userId){
Example example = new Example(AppUserCollect.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId",userId).andEqualTo("isDel",0).andEqualTo("status",0);
return selectCountByExample(example);
}
}
......@@ -40,6 +40,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
@Autowired
ActivityFeign activityFeign;
@Autowired
AppUserCollectBiz userCollectBiz;
//我的钱包入账
public void updMyWater(MyWalletDetail walletDetail){
......@@ -174,6 +177,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
}else {
dto.setBalance(BigDecimal.ZERO);
}
Integer userCollectNumber = userCollectBiz.getUserCollectNumber(userId);
userCollectNumber=userCollectNumber == null ? 0 : userCollectNumber;
dto.setUserCollectNumber(userCollectNumber);
return ObjectRestResponse.succ(dto);
}catch (Exception e){
log.error(e.getMessage(), e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment