fix
This commit is contained in:
@@ -33,6 +33,7 @@ import com.starry.admin.modules.weichat.entity.order.PlayClerkOrderInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayClerkOrderListReturnVo;
|
||||
import com.starry.admin.modules.weichat.service.WxCustomUserService;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.admin.utils.SmsUtils;
|
||||
import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
@@ -100,6 +101,8 @@ public class WxClerkController {
|
||||
|
||||
@Resource
|
||||
private IPlayPersonnelGroupInfoService playPersonnelGroupInfoService;
|
||||
@Resource
|
||||
private SmsUtils smsUtils;
|
||||
|
||||
|
||||
/**
|
||||
@@ -198,6 +201,8 @@ public class WxClerkController {
|
||||
if (entity != null) {
|
||||
throw new CustomException("已有申请未审核");
|
||||
}
|
||||
smsUtils.checkSmsCode(vo.getPhone(), vo.getSmsCode());
|
||||
|
||||
entity = ConvertUtil.entityToVo(vo, PlayClerkUserReviewInfoEntity.class);
|
||||
entity.setReviewState("0");
|
||||
entity.setClerkId(clerkId);
|
||||
@@ -378,9 +383,6 @@ public class WxClerkController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 店员分页查询本人订单列表
|
||||
*
|
||||
|
||||
@@ -93,4 +93,6 @@ public class PlayClerkUserByWxAddVo {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private String smsCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.starry.admin.utils;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
@@ -34,6 +35,9 @@ public class SmsUtils {
|
||||
|
||||
// 校验短信验证码是否正确
|
||||
public void checkSmsCode(String phone, String code) {
|
||||
if(StringUtils.isEmpty(code)){
|
||||
throw new RuntimeException("短信验证码必填");
|
||||
}
|
||||
String key = "sms:phone:" + phone;
|
||||
Object data = redisCache.getCacheObject(key);
|
||||
if (Objects.isNull(data)) {
|
||||
|
||||
Reference in New Issue
Block a user