提交 2c2d24f1 authored 作者: douxy's avatar douxy

CP计划小程序改造,改造登录放行

上级 fd934ee6
package com.wangxiaolu.promotion.controller.user.tem;
import com.wangxiaolu.promotion.common.redis.RedisKeys;
import com.wangxiaolu.promotion.common.redis.service.RedisCache;
import com.wangxiaolu.promotion.common.util.DataUtils;
import com.wangxiaolu.promotion.common.util.EnvUtil;
......@@ -11,7 +10,6 @@ import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.service.wechat.WeChatUserCoreService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -58,7 +56,8 @@ public class TemporaryInfoCoreController {
// if (envUtil.isLive()) {
// String redisKey = RedisKeys.UserKeys.PHONE_VER_CODE.getKey() + wxTemporaryEnrollVo.getPhone();
// String phoneCodeOld = redisCache.get(redisKey);
// if (StringUtils.isBlank(phoneCodeOld) || !phoneCodeOld.equals(wxTemporaryEnrollVo.getPhoneCode())) {
// if (StringUtils.isBlan
// k(phoneCodeOld) || !phoneCodeOld.equals(wxTemporaryEnrollVo.getPhoneCode())) {
// throw new ParamException(RCode.TENCENT_SMS_PHONE_CODE_ERROR, null);
// }
// redisCache.removeKey(redisKey);
......
......@@ -72,12 +72,12 @@ public class TemporaryInfoQueryController {
/**
* 注册时获取门店列表
* @param temporaryRegisterVo 临时注册信息
* @param planMonth 计划月份
* @return 门店列表
*/
@PostMapping("/temporary/findStoreList")
public R findStoreList(@RequestBody TemporaryRegisterVo temporaryRegisterVo) {
return R.success(weChatUserQueryService.findStoreList(temporaryRegisterVo));
@GetMapping("/temporary/findStoreList")
public R findStoreList(@RequestParam("planMonth") String planMonth) {
return R.success(weChatUserQueryService.findStoreList(planMonth));
}
private void phontAndOpenIdVerify(WxTemporaryLoginVo wxTemporaryLoginVo) {
......
......@@ -42,9 +42,9 @@ public interface ActivityPlanInfoDao {
/**
* 根据位置信息查询当前月份的促销门店
* @param temporaryRegisterVo 查询条件参数
* @param planMonth 查询条件参数
* @return 门店信息列表
*/
List<Map<String, String>> findThisMonthStoreListByLocation(TemporaryRegisterVo temporaryRegisterVo);
List<Map<String, String>> findThisMonthStoreListByLocation(String planMonth);
}
......@@ -129,19 +129,13 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
/**
* 根据地理位置信息查询本店本月门店列表
* @param temporaryRegisterVo 查询条件参数
* @param planMonth 查询条件参数
* @return 门店列表
*/
@Override
public List<Map<String, String>> findThisMonthStoreListByLocation(TemporaryRegisterVo temporaryRegisterVo) {
public List<Map<String, String>> findThisMonthStoreListByLocation(String planMonth) {
LambdaQueryWrapper<ActivityPlanInfoDo> qw = new LambdaQueryWrapper<>();
qw.likeRight(ActivityPlanInfoDo::getDate,temporaryRegisterVo.getMonth());
if (StringUtils.isNotBlank(temporaryRegisterVo.getProvince())){
qw.eq(ActivityPlanInfoDo::getProvince,temporaryRegisterVo.getProvince());
}
if (StringUtils.isNotBlank(temporaryRegisterVo.getCity())){
qw.eq(ActivityPlanInfoDo::getCity,temporaryRegisterVo.getCity());
}
qw.likeRight(ActivityPlanInfoDo::getDate,planMonth);
List<ActivityPlanInfoDo> activityPlanInfoDoList = activityPlanInfoMapper.selectList(qw);
List<Map<String, String>> resultList = activityPlanInfoDoList.stream().map(activityPlanInfoDo -> {
Map<String, String> map = new HashMap<>();
......
......@@ -17,7 +17,7 @@ public interface WeChatUserQueryService {
LoginVo temporaryLoginByPhone(String phone);
List<Map<String, String>> findStoreList(TemporaryRegisterVo temporaryRegisterVo);
List<Map<String, String>> findStoreList(String planMonth);
/**
* 根据临时ID查询手机号
......
......@@ -91,8 +91,8 @@ public class WeChatUserQueryServiceImpl implements WeChatUserQueryService {
}
@Override
public List<Map<String, String>> findStoreList(TemporaryRegisterVo temporaryRegisterVo) {
return activityPlanInfoDao.findThisMonthStoreListByLocation(temporaryRegisterVo);
public List<Map<String, String>> findStoreList(String planMonth) {
return activityPlanInfoDao.findThisMonthStoreListByLocation(planMonth);
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论