yujian
2019-08-29 60ee2a03717f1455ae4065b92afa687a474525fd
隔一个小时赠送淘礼金退回
4个文件已修改
13 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/tlj/UserTaoLiJinGiveRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinOriginServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/TaoLiJinJob.java
@@ -181,9 +181,9 @@
    
    /**
     * 每天00:10  赠送退回已过期淘礼金
     * 每2个小时  赠送退回已过期淘礼金
     */
    @Scheduled(cron = "0 10 0 * * ? ")
    @Scheduled(cron = "0 0 0/2 * * ? ")
    public void giveSendBack() {
        if (!Constant.IS_TASK)
            return;
fanli/src/main/java/com/yeshi/fanli/mapping/tlj/UserTaoLiJinGiveRecordMapper.xml
@@ -55,7 +55,7 @@
  
  <select id="overdueList" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_user_taolijin_give_record d
    WHERE d.`tgr_state` = 0 AND d.`tgr_end_time` IS NOT NULL AND d.`tgr_end_time` <![CDATA[<]]> CURDATE()
    WHERE d.`tgr_state` = 0 AND d.`tgr_end_time` IS NOT NULL AND d.`tgr_end_time` <![CDATA[<]]> NOW()
    LIMIT #{count}
  </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinOriginServiceImpl.java
@@ -646,7 +646,7 @@
                SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd HH:mm");
                MsgOtherGiveContentDTO msgOther = new MsgOtherGiveContentDTO();
                msgOther.setType(MsgOtherGiveContentDTO.TYEP_TLJ);
                msgOther.setTitle("赠送推广红包退回");
                msgOther.setTitle("推广红包退回");
                msgOther.setGiveType("你赠送的"+ money + "推广红包未被成功领取");
                msgOther.setGiveTime(sd.format(record.getGiveTime()));
                msgOther.setReturnTime(sd.format(new Date()));
fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinRecordServiceImpl.java
@@ -464,10 +464,11 @@
                }
            }
            // 计算剩余未领取数量
            // 计算剩余未领取数量= 总数量 - 领取数量
            int winNum = userTaoLiJinRecordVO.getWinNum();
            int totalNum = userTaoLiJinRecordVO.getTotalNum();
            userTaoLiJinRecordVO.setSurplusNum(totalNum - winNum);
            int refundNum = userTaoLiJinRecordVO.getRefundNum();
            userTaoLiJinRecordVO.setSurplusNum(totalNum - winNum - refundNum);
            // 计算分享奖金
            BigDecimal shareMoney = new BigDecimal(0);