Merge branch 'master' into div
| | |
| | | |
| | | int deleteByPrimaryKey(String id); |
| | | |
| | | UserTaoLiJinReport selectByPrimaryKey(String id); |
| | | UserTaoLiJinReport selectByPrimaryKeyStr(String id); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">utr_id,utr_unfreeze_amount,utr_unfreeze_num,utr_refund_amount,utr_refund_num,utr_alipay_amount,utr_use_amount,utr_use_num,utr_win_amount,utr_win_num,utr_pre_commission_amount,utr_create_time,utr_update_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_user_taolijin_report where utr_id = #{id,jdbcType=BIGINT} |
| | | <select id="selectByPrimaryKeyStr" resultMap="BaseResultMap" parameterType="java.lang.String">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_user_taolijin_report where utr_id = #{id,jdbcType=VARCHAR} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_taolijin_report where utr_id = #{id,jdbcType=BIGINT}</delete> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.String">delete from yeshi_ec_user_taolijin_report where utr_id = #{id,jdbcType=VARCHAR}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinReport" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_taolijin_report (utr_id,utr_unfreeze_amount,utr_unfreeze_num,utr_refund_amount,utr_refund_num,utr_alipay_amount,utr_use_amount,utr_use_num,utr_win_amount,utr_win_num,utr_pre_commission_amount,utr_create_time,utr_update_time) values (#{id,jdbcType=VARCHAR},#{unfreezeAmount,jdbcType=DECIMAL},#{unfreezeNum,jdbcType=INTEGER},#{refundAmount,jdbcType=DECIMAL},#{refundNum,jdbcType=INTEGER},#{alipayAmount,jdbcType=DECIMAL},#{useAmount,jdbcType=DECIMAL},#{useNum,jdbcType=INTEGER},#{winAmount,jdbcType=DECIMAL},#{winNum,jdbcType=INTEGER},#{preCommissionAmount,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinReport" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_taolijin_report |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | // 15天前过期
|
| | | Date date = null;
|
| | | try {
|
| | | date = DateUtil.reduceDay(15, new Date());
|
| | | date = DateUtil.reduceDay(14, new Date());
|
| | | } catch (ParseException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | BigDecimal total = new BigDecimal(0);
|
| | | for (UserTaoLiJinOrigin userTaoLiJinOrigin: list) {
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd HH.mm");
|
| | | String time = sd.format(userTaoLiJinOrigin.getCreateTime()); |
| | | |
| | | BigDecimal moneySurplus = userTaoLiJinOrigin.getMoneySurplus();
|
| | | total = MoneyBigDecimalUtil.add(total, moneySurplus);
|
| | | |
| | | String rightsId = null;
|
| | | boolean refund = false;
|
| | | TaoLiJinOriginEnum originEnum = userTaoLiJinOrigin.getOrigin();
|
| | | if (TaoLiJinOriginEnum.refund.equals(originEnum)) {
|
| | | refund = true;
|
| | | rightsId = userTaoLiJinOrigin.getRightsId();
|
| | | }
|
| | | |
| | | UserTaoLiJinOrigin origin = new UserTaoLiJinOrigin();
|
| | | origin.setId(userTaoLiJinOrigin.getId());
|
| | | origin.setMoneySurplus(new BigDecimal(0));
|
| | | origin.setUpdateTime(new Date());
|
| | | userTaoLiJinOriginMapper.updateByPrimaryKeySelective(origin);
|
| | |
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd hh.mm");
|
| | | String time = sd.format(userTaoLiJinOrigin.getCreateTime());
|
| | | if (origin.getOrigin().equals(TaoLiJinOriginEnum.refund)) {
|
| | | String rightsId = userTaoLiJinOrigin.getRightsId();
|
| | | if (refund) {
|
| | | UserTaoLiJinReport report = userTaoLiJinReportService.selectByPrimaryKey(rightsId);
|
| | | Date shareTime = null;
|
| | | if (report == null) {
|
| | |
| | | content.setState("红包收回");
|
| | | content.setSource("于["+ sd.format(shareTime) + "]创建的分享未被领取部分");
|
| | | content.setTimeDesc("退回于" + time);
|
| | | content.setMoney(userTaoLiJinOrigin.getMoneySurplus());
|
| | | content.setMoney(moneySurplus);
|
| | | content.setReason("本笔退回推广红包从退回日起至今并未产生分享记录");
|
| | | content.setResult("长期未使用收回");
|
| | | userOtherMsgNotificationService.taoLiJinMsg(uid, "如有疑问请联系人工客服", content);
|
| | |
| | | // 消息
|
| | | MsgOtherTaoLiJinContentDTO content = new MsgOtherTaoLiJinContentDTO();
|
| | | content.setState("红包收回");
|
| | | content.setSource(origin.getOrigin().getDesc());
|
| | | content.setSource(originEnum.getDesc());
|
| | | content.setTimeDesc("获得于" + time);
|
| | | content.setMoney(userTaoLiJinOrigin.getMoneySurplus());
|
| | | content.setMoney(moneySurplus);
|
| | | content.setReason("本笔推广红包从获得日起至今并未产生分享记录");
|
| | | content.setResult("长期未使用收回");
|
| | | userOtherMsgNotificationService.taoLiJinMsg(uid, "如有疑问请联系人工客服", content);
|
| | | }
|
| | | |
| | | |
| | | total = MoneyBigDecimalUtil.add(total, userTaoLiJinOrigin.getMoneySurplus());
|
| | | }
|
| | |
|
| | | // 用户剩余淘礼金
|
| | |
| | | // 使用成功消息
|
| | | try {
|
| | | String beizhu = "未被领取/使用的部分将会退回";
|
| | |
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd hh.mm");
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd HH.mm");
|
| | | String time = sd.format(new Date());
|
| | | MsgOtherTaoLiJinContentDTO content = new MsgOtherTaoLiJinContentDTO();
|
| | | content.setState("红包扣除");
|
| | |
| | |
|
| | | @Override
|
| | | public UserTaoLiJinReport selectByPrimaryKey(String id) {
|
| | | return userTaoLiJinReportMapper.selectByPrimaryKey(id);
|
| | | return userTaoLiJinReportMapper.selectByPrimaryKeyStr(id);
|
| | | }
|
| | |
|
| | | }
|