Commit ffe6012b by 吕明尚

修改抽奖日志

parent 35c298f6
...@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import share.common.annotation.Excel; import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity; import share.common.core.domain.BaseEntity;
...@@ -70,7 +68,7 @@ public class LotteryRecordsLog extends BaseEntity { ...@@ -70,7 +68,7 @@ public class LotteryRecordsLog extends BaseEntity {
* 中奖奖品 * 中奖奖品
*/ */
@Excel(name = "中奖奖品") @Excel(name = "中奖奖品")
private String hitPrize; private Integer hitPrize;
/** /**
* 是否发放 0:未发放,1:已发放 * 是否发放 0:未发放,1:已发放
...@@ -84,25 +82,4 @@ public class LotteryRecordsLog extends BaseEntity { ...@@ -84,25 +82,4 @@ public class LotteryRecordsLog extends BaseEntity {
@Excel(name = "发放结果") @Excel(name = "发放结果")
private String sendMsg; private String sendMsg;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("gameId", getGameId())
.append("userId", getUserId())
.append("userName", getUserName())
.append("phone", getPhone())
.append("drawTime", getDrawTime())
.append("isHit", getIsHit())
.append("hitPrize", getHitPrize())
.append("isSend", getIsSend())
.append("sendMsg", getSendMsg())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
} }
...@@ -165,7 +165,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -165,7 +165,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
SConsumerCoupon give = sConsumerCouponService.give(user.getId(), prize.getCouponId(), 30); SConsumerCoupon give = sConsumerCouponService.give(user.getId(), prize.getCouponId(), 30);
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.yes.getIndex()); log.setIsSend(YesNoEnum.yes.getIndex());
log.setHitPrize(PrizeTypeEnum.COUPON.getName()); log.setHitPrize(PrizeTypeEnum.COUPON.getCode());
log.setSendMsg(PrizeTypeEnum.COUPON.getName() + ":" + give.getName() + "以发放"); log.setSendMsg(PrizeTypeEnum.COUPON.getName() + ":" + give.getName() + "以发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -176,7 +176,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -176,7 +176,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
case GOODS: case GOODS:
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.no.getIndex()); log.setIsSend(YesNoEnum.no.getIndex());
log.setHitPrize(PrizeTypeEnum.GOODS.getName()); log.setHitPrize(PrizeTypeEnum.GOODS.getCode());
log.setSendMsg(PrizeTypeEnum.GOODS.getName() + ":" + prize.getPrizeName() + "未发放"); log.setSendMsg(PrizeTypeEnum.GOODS.getName() + ":" + prize.getPrizeName() + "未发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -191,7 +191,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -191,7 +191,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
consumerWalletService.giveIntegral(consumerWallet); consumerWalletService.giveIntegral(consumerWallet);
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.yes.getIndex()); log.setIsSend(YesNoEnum.yes.getIndex());
log.setHitPrize(PrizeTypeEnum.INTEGRAL.getName()); log.setHitPrize(PrizeTypeEnum.INTEGRAL.getCode());
log.setSendMsg(PrizeTypeEnum.INTEGRAL.getName() + ":" + prize.getPrizeValue() + "以发放"); log.setSendMsg(PrizeTypeEnum.INTEGRAL.getName() + ":" + prize.getPrizeValue() + "以发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -206,7 +206,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -206,7 +206,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
consumerWalletService.giveDuration(durationrWallet); consumerWalletService.giveDuration(durationrWallet);
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.yes.getIndex()); log.setIsSend(YesNoEnum.yes.getIndex());
log.setHitPrize(PrizeTypeEnum.TIME.getName()); log.setHitPrize(PrizeTypeEnum.TIME.getCode());
log.setSendMsg(PrizeTypeEnum.TIME.getName() + ":" + prize.getPrizeValue() + "以发放"); log.setSendMsg(PrizeTypeEnum.TIME.getName() + ":" + prize.getPrizeValue() + "以发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -221,7 +221,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -221,7 +221,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
consumerWalletService.giveAmount(giveAmountWallet); consumerWalletService.giveAmount(giveAmountWallet);
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.yes.getIndex()); log.setIsSend(YesNoEnum.yes.getIndex());
log.setHitPrize(PrizeTypeEnum.MONEY.getName()); log.setHitPrize(PrizeTypeEnum.MONEY.getCode());
log.setSendMsg(PrizeTypeEnum.MONEY.getName() + ":" + prize.getPrizeValue() + "以发放"); log.setSendMsg(PrizeTypeEnum.MONEY.getName() + ":" + prize.getPrizeValue() + "以发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -232,7 +232,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -232,7 +232,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
case THANK: case THANK:
log.setIsHit(YesNoEnum.no.getIndex()); log.setIsHit(YesNoEnum.no.getIndex());
log.setIsSend(YesNoEnum.no.getIndex()); log.setIsSend(YesNoEnum.no.getIndex());
log.setHitPrize("谢谢参与"); log.setHitPrize(PrizeTypeEnum.THANK.getCode());
log.setSendMsg("谢谢参与"); log.setSendMsg("谢谢参与");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex()); prize.setCurrentNum(prize.getCurrentNum() + YesNoEnum.yes.getIndex());
...@@ -255,7 +255,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -255,7 +255,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
sConsumerService.updateById(user); sConsumerService.updateById(user);
log.setIsHit(YesNoEnum.no.getIndex()); log.setIsHit(YesNoEnum.no.getIndex());
log.setIsSend(YesNoEnum.no.getIndex()); log.setIsSend(YesNoEnum.no.getIndex());
log.setHitPrize("谢谢参与"); log.setHitPrize(PrizeTypeEnum.THANK.getCode());
log.setSendMsg("谢谢参与"); log.setSendMsg("谢谢参与");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
return new Prize(); return new Prize();
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<if test="gameName != null ">and w.name like concat('%', #{gameName}, '%')</if> <if test="gameName != null ">and w.name like concat('%', #{gameName}, '%')</if>
<if test="userId != null ">and l.user_id = #{userId}</if> <if test="userId != null ">and l.user_id = #{userId}</if>
<if test="userName != null and userName != ''">and l.user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''">and l.user_name like concat('%', #{userName}, '%')</if>
<if test="phone != null and phone != ''">and l.phone = #{phone}</if> <if test="phone != null and phone != ''">and l.phone like concat('%', #{phone}, '%')</if>
<if test="drawTime != null ">and l.draw_time = #{drawTime}</if> <if test="drawTime != null ">and l.draw_time = #{drawTime}</if>
<if test="isHit != null ">and l.is_hit = #{isHit}</if> <if test="isHit != null ">and l.is_hit = #{isHit}</if>
<if test="hitPrize != null and hitPrize != ''">and l.hit_prize = #{hitPrize}</if> <if test="hitPrize != null and hitPrize != ''">and l.hit_prize = #{hitPrize}</if>
......
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