Commit 71abd114 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev-chw' into dev-chw

parents 7f18b293 91216ed4
......@@ -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);
......
......@@ -16,4 +16,7 @@ public class ActivityCouponVo extends Coupon {
@ApiModelProperty("是否使用")
private Integer isUsd;
@ApiModelProperty("到期时间")
private Long ledExpireTime;
}
......@@ -36,6 +36,7 @@
<result property="updTime" column="upd_time"/>
<result property="isDel" column="is_del"/>
<result property="isLed" column="isLed"/>
<result property="ledExpireTime" column="ledExpireTime"/>
</resultMap>
<select id="selectTitles" resultType="com.xxfc.platform.activity.vo.CouponTitleVo">
......@@ -69,7 +70,7 @@
</select>
<select id="selectList" resultMap="couponMap" parameterType="com.xxfc.platform.activity.dto.CouponFindDTO">
select c.*,IF(COUNT(uc.id) >0 ,1,0) as isLed from `coupon` c
select c.*,IF(COUNT(uc.id) >0 ,1,0) as isLed,IFNULL(uc.expire_time,0) as ledExpireTime from `coupon` c
LEFT JOIN (SELECT * FROM user_coupon
WHERE 1=1
<if test="userId != null and userId >= 0">
......
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