Commit 35c298f6 by 吕明尚

修改抽奖日志

parent 6a819ceb
......@@ -10,6 +10,7 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.LotteryRecordsLog;
import share.system.domain.vo.LotteryRecordsLogVo;
import share.system.service.LotteryRecordsLogService;
import javax.servlet.http.HttpServletResponse;
......@@ -32,9 +33,9 @@ public class LotteryRecordsLogController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:lotteryRecordsLog:list')")
@GetMapping("/list")
public TableDataInfo list(LotteryRecordsLog lotteryRecordsLog) {
public TableDataInfo list(LotteryRecordsLogVo lotteryRecordsLog) {
startPage();
List<LotteryRecordsLog> list = lotteryRecordsLogService.selectLotteryRecordsLogList(lotteryRecordsLog);
List<LotteryRecordsLogVo> list = lotteryRecordsLogService.selectLotteryRecordsLogList(lotteryRecordsLog);
return getDataTable(list);
}
......@@ -44,9 +45,9 @@ public class LotteryRecordsLogController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:lotteryRecordsLog:export')")
@Log(title = "抽奖记录日志", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, LotteryRecordsLog lotteryRecordsLog) {
List<LotteryRecordsLog> list = lotteryRecordsLogService.selectLotteryRecordsLogList(lotteryRecordsLog);
ExcelUtil<LotteryRecordsLog> util = new ExcelUtil<LotteryRecordsLog>(LotteryRecordsLog.class);
public void export(HttpServletResponse response, LotteryRecordsLogVo lotteryRecordsLog) {
List<LotteryRecordsLogVo> list = lotteryRecordsLogService.selectLotteryRecordsLogList(lotteryRecordsLog);
ExcelUtil<LotteryRecordsLogVo> util = new ExcelUtil<LotteryRecordsLogVo>(LotteryRecordsLogVo.class);
util.exportExcel(response, list, "抽奖记录日志数据");
}
......
......@@ -56,8 +56,8 @@ public class LotteryRecordsLog extends BaseEntity {
/**
* 抽奖时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "抽奖时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "抽奖时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date drawTime;
/**
......
package share.system.domain.vo;
import lombok.Data;
import share.system.domain.LotteryRecordsLog;
@Data
public class LotteryRecordsLogVo extends LotteryRecordsLog {
private String gameName;
}
......@@ -2,6 +2,7 @@ package share.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import share.system.domain.LotteryRecordsLog;
import share.system.domain.vo.LotteryRecordsLogVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface LotteryRecordsLogMapper extends BaseMapper<LotteryRecordsLog> {
* @param lotteryRecordsLog 抽奖记录日志
* @return 抽奖记录日志集合
*/
public List<LotteryRecordsLog> selectLotteryRecordsLogList(LotteryRecordsLog lotteryRecordsLog);
public List<LotteryRecordsLogVo> selectLotteryRecordsLogList(LotteryRecordsLogVo lotteryRecordsLog);
/**
* 新增抽奖记录日志
......
......@@ -2,6 +2,7 @@ package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import share.system.domain.LotteryRecordsLog;
import share.system.domain.vo.LotteryRecordsLogVo;
import java.util.List;
......@@ -26,7 +27,7 @@ public interface LotteryRecordsLogService extends IService<LotteryRecordsLog> {
* @param lotteryRecordsLog 抽奖记录日志
* @return 抽奖记录日志集合
*/
public List<LotteryRecordsLog> selectLotteryRecordsLogList(LotteryRecordsLog lotteryRecordsLog);
public List<LotteryRecordsLogVo> selectLotteryRecordsLogList(LotteryRecordsLogVo lotteryRecordsLog);
/**
* 新增抽奖记录日志
......
......@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import share.common.utils.DateUtils;
import share.system.domain.LotteryRecordsLog;
import share.system.domain.SConsumer;
import share.system.domain.vo.LotteryRecordsLogVo;
import share.system.mapper.LotteryRecordsLogMapper;
import share.system.service.LotteryRecordsLogService;
import share.system.service.SConsumerService;
......@@ -44,7 +45,7 @@ public class LotteryRecordsLogServiceImpl extends ServiceImpl<LotteryRecordsLogM
* @return 抽奖记录日志
*/
@Override
public List<LotteryRecordsLog> selectLotteryRecordsLogList(LotteryRecordsLog lotteryRecordsLog) {
public List<LotteryRecordsLogVo> selectLotteryRecordsLogList(LotteryRecordsLogVo lotteryRecordsLog) {
return lotteryRecordsLogMapper.selectLotteryRecordsLogList(lotteryRecordsLog);
}
......
......@@ -155,7 +155,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
log.setUserName(user.getNickName());
log.setPhone(user.getPhone());
log.setDrawTime(DateUtils.getNowDate());
log.setCreateTime(DateUtils.getNowDate());
if (ObjectUtil.isNotEmpty(prize)) {
PrizeTypeEnum couponType = PrizeTypeEnum.getTypeCode(prize.getPrizeType());
......
......@@ -4,9 +4,10 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.LotteryRecordsLogMapper">
<resultMap type="LotteryRecordsLog" id="LotteryRecordsLogResult">
<resultMap type="LotteryRecordsLogVo" id="LotteryRecordsLogResult">
<result property="id" column="id"/>
<result property="gameId" column="game_id"/>
<result property="gameName" column="game_name"/>
<result property="userId" column="user_id"/>
<result property="userName" column="user_name"/>
<result property="phone" column="phone"/>
......@@ -42,17 +43,35 @@
</sql>
<select id="selectLotteryRecordsLogList" parameterType="LotteryRecordsLog" resultMap="LotteryRecordsLogResult">
<include refid="selectLotteryRecordsLogVo"/>
select
l.id,
l.game_id,
w.name as game_name,
l.user_id,
l.user_name,
l.phone,
l.draw_time,
l.is_hit,
l. hit_prize,
l. is_send,
l.send_msg,
l.create_by,
l. create_time,
l. update_by,
l.update_time,
l.remark
from s_lottery_records_log l left join s_wheel_game w on l.game_id = w.id
<where>
<if test="gameId != null ">and game_id = #{gameId}</if>
<if test="userId != null ">and user_id = #{userId}</if>
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="drawTime != null ">and draw_time = #{drawTime}</if>
<if test="isHit != null ">and is_hit = #{isHit}</if>
<if test="hitPrize != null and hitPrize != ''">and hit_prize = #{hitPrize}</if>
<if test="isSend != null ">and is_send = #{isSend}</if>
<if test="sendMsg != null and sendMsg != ''">and send_msg = #{sendMsg}</if>
<if test="gameId != null ">and l.game_id = #{gameId}</if>
<if test="gameName != null ">and w.name like concat('%', #{gameName}, '%')</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="phone != null and phone != ''">and l.phone = #{phone}</if>
<if test="drawTime != null ">and l.draw_time = #{drawTime}</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="isSend != null ">and l.is_send = #{isSend}</if>
<if test="sendMsg != null and sendMsg != ''">and l.send_msg = #{sendMsg}</if>
</where>
</select>
......
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