提交 5da04b36 authored 作者: douxy's avatar douxy

修改重客抽奖小程序,用户信息存储逻辑

上级 610ab188
...@@ -36,4 +36,9 @@ public class LotteryController { ...@@ -36,4 +36,9 @@ public class LotteryController {
lotteryService.uploadReceipt(lotteryRecordVo.getId(), lotteryRecordVo.getReceiptImageUrl()); lotteryService.uploadReceipt(lotteryRecordVo.getId(), lotteryRecordVo.getReceiptImageUrl());
return R.success(lotteryRecordVo.getReceiptImageUrl()); return R.success(lotteryRecordVo.getReceiptImageUrl());
} }
@PostMapping("/getuserinfo")
public R getLotteryUserInfo(@RequestBody LotteryRecordVo lotteryRecordVo) {
return R.success(lotteryService.getLotteryUserInfo(lotteryRecordVo.getWxOpenId()));
}
} }
\ No newline at end of file
...@@ -13,4 +13,6 @@ public interface LotteryCoreDao { ...@@ -13,4 +13,6 @@ public interface LotteryCoreDao {
LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo); LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo);
LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId); LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId);
LotteryUserInfoDto getLotteryUserInfo(String wxOpenId);
} }
...@@ -104,6 +104,12 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao { ...@@ -104,6 +104,12 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao {
return result ; return result ;
} }
@Override
public LotteryUserInfoDto getLotteryUserInfo(String wxOpenId) {
LotteryUserInfo lotteryUserInfo = lotteryUserInfoMapper.selectOne(new LambdaQueryWrapper<LotteryUserInfo>().eq(LotteryUserInfo::getOpenId, wxOpenId));
return BeanUtils.transitionDto(lotteryUserInfo, LotteryUserInfoDto.class);
}
/** /**
* 简单动态概率 * 简单动态概率
*/ */
......
...@@ -54,4 +54,8 @@ public class LotteryCoreServiceImpl implements LotteryCoreService { ...@@ -54,4 +54,8 @@ public class LotteryCoreServiceImpl implements LotteryCoreService {
public LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo) { public LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo) {
return lotteryCoreDao.doDraw(recordId,userInfo); return lotteryCoreDao.doDraw(recordId,userInfo);
} }
public LotteryUserInfoDto getLotteryUserInfo(String wxOpenId) {
return lotteryCoreDao.getLotteryUserInfo(wxOpenId);
}
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论