提交 82c465c2 authored 作者: 窦馨雨's avatar 窦馨雨

合并分支 'dxy' 到 'master'

增加勤策门店获取门店面积字段逻辑 查看合并请求 !130
...@@ -41,4 +41,9 @@ public class LotteryController { ...@@ -41,4 +41,9 @@ public class LotteryController {
public R getLotteryUserInfo(@RequestBody LotteryRecordVo lotteryRecordVo) { public R getLotteryUserInfo(@RequestBody LotteryRecordVo lotteryRecordVo) {
return R.success(lotteryService.getLotteryUserInfo(lotteryRecordVo.getWxOpenId())); return R.success(lotteryService.getLotteryUserInfo(lotteryRecordVo.getWxOpenId()));
} }
@PostMapping("/getRecordInfo")
public R getLotteryRecordInfo(@RequestBody LotteryRecordVo lotteryRecordVo) {
return R.success(lotteryService.getLotteryRecordInfo(lotteryRecordVo.getWxOpenId()));
}
} }
\ No newline at end of file
...@@ -4,6 +4,8 @@ import com.wangxiaolu.promotion.domain.lottery.entity.LotteryUserInfo; ...@@ -4,6 +4,8 @@ import com.wangxiaolu.promotion.domain.lottery.entity.LotteryUserInfo;
import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryRecordDto; import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryRecordDto;
import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryUserInfoDto; import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryUserInfoDto;
import java.util.List;
/** /**
* @Author: DouXinYu * @Author: DouXinYu
* @Date: 2026-04-07 17:41 * @Date: 2026-04-07 17:41
...@@ -15,4 +17,6 @@ public interface LotteryCoreDao { ...@@ -15,4 +17,6 @@ public interface LotteryCoreDao {
LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId); LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId);
LotteryUserInfoDto getLotteryUserInfo(String wxOpenId); LotteryUserInfoDto getLotteryUserInfo(String wxOpenId);
List<LotteryRecordDto> getLotteryRecordInfo(String wxOpenId);
} }
...@@ -14,6 +14,7 @@ import com.wangxiaolu.promotion.result.basedata.RCode; ...@@ -14,6 +14,7 @@ import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.utils.TencentMapUtil; import com.wangxiaolu.promotion.utils.TencentMapUtil;
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 org.springframework.util.CollectionUtils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -86,17 +87,10 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao { ...@@ -86,17 +87,10 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao {
} }
if (record.getWxOpenId() != null && record.getPrizeLevel() != null) { if (record.getWxOpenId() != null && record.getPrizeLevel() != null) {
}
LambdaQueryWrapper<LotteryRecord> qw = new LambdaQueryWrapper<>();
qw.eq(LotteryRecord::getWxOpenId,record.getWxOpenId());
qw.eq(LotteryRecord::getCreateDate,FORMAT.format(new Date()));
LotteryRecord lotteryRecord = lotteryMapper.selectOne(qw);
if (Objects.nonNull(lotteryRecord)){
throw new ParamException(RCode.LOTTERY_RECORD_ERROR); throw new ParamException(RCode.LOTTERY_RECORD_ERROR);
} }
LotteryUserInfo user = lotteryUserInfoMapper.selectOne(new LambdaQueryWrapper<LotteryUserInfo>().eq(LotteryUserInfo::getOpenId, record.getWxOpenId())); LotteryUserInfo user = lotteryUserInfoMapper.selectOne(new LambdaQueryWrapper<LotteryUserInfo>().eq(LotteryUserInfo::getOpenId, record.getWxOpenId()));
if (Objects.isNull(user)) { if (Objects.isNull(user)) {
LotteryUserInfo lotteryUserInfo = new LotteryUserInfo(); LotteryUserInfo lotteryUserInfo = new LotteryUserInfo();
...@@ -122,6 +116,23 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao { ...@@ -122,6 +116,23 @@ public class LotteryCoreDaoImpl implements LotteryCoreDao {
return BeanUtils.transitionDto(lotteryUserInfo, LotteryUserInfoDto.class); return BeanUtils.transitionDto(lotteryUserInfo, LotteryUserInfoDto.class);
} }
/**
* 获取抽奖记录详情
* @param wxOpenId 微信openid
* @return 抽奖记录详情
*/
@Override
public List<LotteryRecordDto> getLotteryRecordInfo(String wxOpenId) {
LambdaQueryWrapper<LotteryRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(LotteryRecord::getWxOpenId, wxOpenId);
queryWrapper.isNotNull(LotteryRecord::getPrizeLevel);
queryWrapper.orderByDesc(LotteryRecord::getId);
queryWrapper.last("limit 100");
List<LotteryRecord> lotteryRecordList = lotteryMapper.selectList(queryWrapper);
return BeanUtils.transitionDtos(lotteryRecordList, LotteryRecordDto.class);
}
/** /**
* 简单动态概率 * 简单动态概率
*/ */
......
...@@ -237,6 +237,8 @@ public class QinCeClienteleStoreDO implements Serializable { ...@@ -237,6 +237,8 @@ public class QinCeClienteleStoreDO implements Serializable {
// 渠道小类 -->> 渠道类型 // 渠道小类 -->> 渠道类型
private String channelTypeExt; private String channelTypeExt;
private String storeSellingArea;
@TableField(exist = false) @TableField(exist = false)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -271,6 +273,9 @@ public class QinCeClienteleStoreDO implements Serializable { ...@@ -271,6 +273,9 @@ public class QinCeClienteleStoreDO implements Serializable {
if ("门店类型".equals(extKey)) { if ("门店类型".equals(extKey)) {
this.storeTypeExt = extValue; this.storeTypeExt = extValue;
} }
if ("门店面积".equals(extKey)) {
this.storeSellingArea = extValue;
}
} }
if (!isChain) { if (!isChain) {
this.lineName = this.storeType; this.lineName = this.storeType;
......
...@@ -69,5 +69,9 @@ public class LotteryRecordDto { ...@@ -69,5 +69,9 @@ public class LotteryRecordDto {
*/ */
private LotteryUserInfoDto userInfo; private LotteryUserInfoDto userInfo;
/**
* 收据图片URL
*/
private String receiptImageUrl;
} }
\ No newline at end of file
...@@ -25,4 +25,5 @@ public class QinCeClienteleStoreDto { ...@@ -25,4 +25,5 @@ public class QinCeClienteleStoreDto {
private String storeMssCity; private String storeMssCity;
private String storeMssArea; private String storeMssArea;
private String storeAddr; private String storeAddr;
private String storeSellingarea;
} }
...@@ -3,6 +3,8 @@ package com.wangxiaolu.promotion.service.lottery; ...@@ -3,6 +3,8 @@ package com.wangxiaolu.promotion.service.lottery;
import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryRecordDto; import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryRecordDto;
import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryUserInfoDto; import com.wangxiaolu.promotion.pojo.lottery.dto.LotteryUserInfoDto;
import java.util.List;
/** /**
* @Author: DouXinYu * @Author: DouXinYu
* @Date: 2026-04-07 17:38 * @Date: 2026-04-07 17:38
...@@ -12,4 +14,6 @@ public interface LotteryCoreService { ...@@ -12,4 +14,6 @@ public interface LotteryCoreService {
LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId); LotteryRecordDto initLottery(Double longitude, Double latitude, String receiptImage, String wxOpenId);
LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo); LotteryRecordDto doDraw(Long recordId, LotteryUserInfoDto userInfo);
List<LotteryRecordDto> getLotteryRecordInfo(String wxOpenId);
} }
...@@ -13,6 +13,7 @@ import com.wangxiaolu.promotion.service.lottery.LotteryCoreService; ...@@ -13,6 +13,7 @@ import com.wangxiaolu.promotion.service.lottery.LotteryCoreService;
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 java.util.List;
import java.util.Random; import java.util.Random;
@Service @Service
...@@ -55,7 +56,13 @@ public class LotteryCoreServiceImpl implements LotteryCoreService { ...@@ -55,7 +56,13 @@ public class LotteryCoreServiceImpl implements LotteryCoreService {
return lotteryCoreDao.doDraw(recordId,userInfo); return lotteryCoreDao.doDraw(recordId,userInfo);
} }
public LotteryUserInfoDto getLotteryUserInfo(String wxOpenId) { public LotteryUserInfoDto getLotteryUserInfo(String wxOpenId) {
return lotteryCoreDao.getLotteryUserInfo(wxOpenId); return lotteryCoreDao.getLotteryUserInfo(wxOpenId);
} }
@Override
public List<LotteryRecordDto> getLotteryRecordInfo(String wxOpenId) {
return lotteryCoreDao.getLotteryRecordInfo(wxOpenId);
}
} }
\ No newline at end of file
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<result property="storeCreatorCode" column="store_creator_code" jdbcType="VARCHAR"/> <result property="storeCreatorCode" column="store_creator_code" jdbcType="VARCHAR"/>
<result property="storeModifierCode" column="store_modifier_code" jdbcType="VARCHAR"/> <result property="storeModifierCode" column="store_modifier_code" jdbcType="VARCHAR"/>
<result property="storeApprovalStatus" column="store_approval_status" jdbcType="CHAR"/> <result property="storeApprovalStatus" column="store_approval_status" jdbcType="CHAR"/>
<result property="storeSellingArea" column="store_selling_area" jdbcType="VARCHAR"/>
<result property="storeStatus" column="store_status" jdbcType="CHAR"/> <result property="storeStatus" column="store_status" jdbcType="CHAR"/>
<result property="createTime" column="create_time" jdbcType="CHAR"/> <result property="createTime" column="create_time" jdbcType="CHAR"/>
</resultMap> </resultMap>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论