Commit 91216ed4 authored by hezhen's avatar hezhen

123

parent ec701597
...@@ -35,6 +35,10 @@ public class UserInfoDTO { ...@@ -35,6 +35,10 @@ public class UserInfoDTO {
private BigDecimal balance; private BigDecimal balance;
@ApiModelProperty(value = "用户收藏总数")
private Integer userCollectNumber;
......
...@@ -142,4 +142,12 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl ...@@ -142,4 +142,12 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
List<AppUserCollect> collect = mapper.select(appUserCollect); List<AppUserCollect> collect = mapper.select(appUserCollect);
return CollectionUtils.isNotEmpty(collect); 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>{ ...@@ -40,6 +40,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
@Autowired @Autowired
ActivityFeign activityFeign; ActivityFeign activityFeign;
@Autowired
AppUserCollectBiz userCollectBiz;
//我的钱包入账 //我的钱包入账
public void updMyWater(MyWalletDetail walletDetail){ public void updMyWater(MyWalletDetail walletDetail){
...@@ -174,6 +177,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{ ...@@ -174,6 +177,9 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
}else { }else {
dto.setBalance(BigDecimal.ZERO); dto.setBalance(BigDecimal.ZERO);
} }
Integer userCollectNumber = userCollectBiz.getUserCollectNumber(userId);
userCollectNumber=userCollectNumber == null ? 0 : userCollectNumber;
dto.setUserCollectNumber(userCollectNumber);
return ObjectRestResponse.succ(dto); return ObjectRestResponse.succ(dto);
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage(), 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