| | |
| | | * @return |
| | | */ |
| | | BigDecimal getOrderRewardByTeamUidTheMonth(@Param("uid") Long uid, @Param("teamUid") Long teamUid); |
| | | |
| | | /** |
| | | * 统计已到账金额 |
| | | * @param uid |
| | | * @param list 类型 |
| | | * @return |
| | | */ |
| | | BigDecimal getRewardMoneyByUid(@Param("uid") Long uid, @Param("list") List<Integer> list); |
| | | |
| | | } |
| | |
| | | AND DATE_FORMAT(CURDATE(), '%Y%m') = DATE_FORMAT(v2.`hb_get_time`, '%Y%m') |
| | | </select> |
| | | |
| | | <select id="getRewardMoneyByUid" resultType="BigDecimal"> |
| | | SELECT IFNULL(SUM(v2.`hb_money`),0) FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE v2.`hb_uid` = #{uid} |
| | | <if test="list != null and list.size() > 0"> |
| | | AND |
| | | <foreach collection="list" item="item" open="(" separator="OR" close=")"> |
| | | v2.`hb_type` = #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getByUidAndTeamUidAndType" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_red_pack_win_invite d |
| | | WHERE d.`rwr_uid` = #{uid} AND d.`rwr_team_uid` = #{teamUid} AND d.`rwr_type` = #{type} |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getByUidAndTeamUidAndTypeMonth" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_red_pack_win_invite d |
| | | WHERE d.`rwr_uid` = #{uid} AND d.`rwr_team_uid` = #{teamUid} AND d.`rwr_type` = #{type} |
| | | AND DATE_FORMAT(d.rwr_create_time,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getRewardList" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_red_pack_win_invite d |
| | | WHERE d.`rwr_uid` = #{uid} |
| | |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | |
| | | public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid) {
|
| | | return hongBaoV2CountMapper.getOrderRewardByTeamUidTheMonth(uid, teamUid); |
| | | }
|
| | | |
| | | @Override
|
| | | public BigDecimal getRewardMoneyBySelf(Long uid) {
|
| | | List<Integer> list = new ArrayList<Integer>();
|
| | | list.add(HongBaoV2.STATE_YILINGQU);
|
| | | return hongBaoV2CountMapper.getRewardMoneyByUid(uid, list);
|
| | | }
|
| | | }
|
| | |
| | | * @param teamUid 下级id
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid); |
| | | public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid);
|
| | |
|
| | | /**
|
| | | * 自购返利到账金额
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getRewardMoneyBySelf(Long uid); |
| | |
|
| | | }
|