Commit c50e3f6d by 吕明尚

修改查询抽奖日志列表

parent 6da8849e
...@@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController; import share.common.core.controller.BaseController;
import share.common.core.page.TableDataInfo; import share.common.core.domain.R;
import share.system.domain.LotteryRecordsLog; import share.system.domain.LotteryRecordsLog;
import share.system.service.LotteryRecordsLogService; import share.system.service.LotteryRecordsLogService;
...@@ -26,11 +26,9 @@ public class LotteryRecordsLogController extends BaseController { ...@@ -26,11 +26,9 @@ public class LotteryRecordsLogController extends BaseController {
/** /**
* 查询抽奖记录日志列表 * 查询抽奖记录日志列表
*/ */
@GetMapping("/list") @GetMapping("/query")
public TableDataInfo list(LotteryRecordsLog lotteryRecordsLog) { public R<List<LotteryRecordsLog>> query() {
startPage(); return R.ok(lotteryRecordsLogService.queryList());
List<LotteryRecordsLog> list = lotteryRecordsLogService.selectLotteryRecordsLogList(lotteryRecordsLog);
return getDataTable(list);
} }
......
...@@ -59,4 +59,6 @@ public interface LotteryRecordsLogService extends IService<LotteryRecordsLog> { ...@@ -59,4 +59,6 @@ public interface LotteryRecordsLogService extends IService<LotteryRecordsLog> {
* @return 结果 * @return 结果
*/ */
public int deleteLotteryRecordsLogById(Long id); public int deleteLotteryRecordsLogById(Long id);
List<LotteryRecordsLog> queryList();
} }
package share.system.service.impl; package share.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import share.system.domain.LotteryRecordsLog; import share.system.domain.LotteryRecordsLog;
import share.system.domain.SConsumer;
import share.system.mapper.LotteryRecordsLogMapper; import share.system.mapper.LotteryRecordsLogMapper;
import share.system.service.LotteryRecordsLogService; import share.system.service.LotteryRecordsLogService;
import share.system.service.SConsumerService;
import java.util.List; import java.util.List;
...@@ -20,6 +23,8 @@ import java.util.List; ...@@ -20,6 +23,8 @@ import java.util.List;
public class LotteryRecordsLogServiceImpl extends ServiceImpl<LotteryRecordsLogMapper, LotteryRecordsLog> implements LotteryRecordsLogService { public class LotteryRecordsLogServiceImpl extends ServiceImpl<LotteryRecordsLogMapper, LotteryRecordsLog> implements LotteryRecordsLogService {
@Autowired @Autowired
private LotteryRecordsLogMapper lotteryRecordsLogMapper; private LotteryRecordsLogMapper lotteryRecordsLogMapper;
@Autowired
private SConsumerService sConsumerService;
/** /**
* 查询抽奖记录日志 * 查询抽奖记录日志
...@@ -88,4 +93,10 @@ public class LotteryRecordsLogServiceImpl extends ServiceImpl<LotteryRecordsLogM ...@@ -88,4 +93,10 @@ public class LotteryRecordsLogServiceImpl extends ServiceImpl<LotteryRecordsLogM
public int deleteLotteryRecordsLogById(Long id) { public int deleteLotteryRecordsLogById(Long id) {
return lotteryRecordsLogMapper.deleteLotteryRecordsLogById(id); return lotteryRecordsLogMapper.deleteLotteryRecordsLogById(id);
} }
@Override
public List<LotteryRecordsLog> queryList() {
SConsumer user = sConsumerService.getInfo();
return list(new LambdaQueryWrapper<LotteryRecordsLog>().eq(LotteryRecordsLog::getUserId, user.getId()));
}
} }
...@@ -175,7 +175,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame ...@@ -175,7 +175,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
break; break;
case GOODS: case GOODS:
log.setIsHit(YesNoEnum.yes.getIndex()); log.setIsHit(YesNoEnum.yes.getIndex());
log.setIsSend(YesNoEnum.yes.getIndex()); log.setIsSend(YesNoEnum.no.getIndex());
log.setHitPrize(PrizeTypeEnum.GOODS.getName()); log.setHitPrize(PrizeTypeEnum.GOODS.getName());
log.setSendMsg(PrizeTypeEnum.GOODS.getName() + ":" + prize.getPrizeName() + "以发放"); log.setSendMsg(PrizeTypeEnum.GOODS.getName() + ":" + prize.getPrizeName() + "以发放");
lotteryRecordsLogService.save(log); lotteryRecordsLogService.save(log);
......
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