fix: 修改
parent
eca405b763
commit
fe4236d607
|
@ -1517,7 +1517,10 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(request.getUserPhone()) && StringUtils.isNotBlank(request.getConfirmPhone())) {
|
if (StringUtils.isNotBlank(request.getUserPhone()) && StringUtils.isNotBlank(request.getConfirmPhone())) {
|
||||||
Assert.isTrue(StringUtils.equals(request.getUserPhone(), request.getConfirmPhone()), "输入号码不一致!");
|
Assert.isTrue(StringUtils.equals(request.getUserPhone(), request.getConfirmPhone()), "输入号码不一致!");
|
||||||
// Assert.isTrue(Pattern.matches("^[1][3,4,5,7,8,9][1,2,4,5,6,7,8,9][0-9]{8}$", request.getUserPhone()), "手机号前三位不能是190或193!");
|
String substring = request.getUserPhone().substring(0, 3);
|
||||||
|
if (substring.equals("190") || substring.equals("193")) {
|
||||||
|
throw new ServiceException(200, "手机号前三位不能是190或193");
|
||||||
|
}
|
||||||
MemberUserRespDTO userByMobile = userService.getUserByMobile(request.getUserPhone());
|
MemberUserRespDTO userByMobile = userService.getUserByMobile(request.getUserPhone());
|
||||||
// 初始化一个账号
|
// 初始化一个账号
|
||||||
if (Objects.isNull(userByMobile)) {
|
if (Objects.isNull(userByMobile)) {
|
||||||
|
@ -1526,10 +1529,6 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Assert.isTrue(Pattern.matches("^[1][3,4,5,7,8,9][1,2,4,5,6,7,8,9][0-9]{8}$", "19372349962"), "手机号前三位不能是190或193!");
|
|
||||||
}
|
|
||||||
|
|
||||||
private StoreOrder getInfoException(String orderNo) {
|
private StoreOrder getInfoException(String orderNo) {
|
||||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(StoreOrder::getOrderId, orderNo);
|
lqw.eq(StoreOrder::getOrderId, orderNo);
|
||||||
|
|
Loading…
Reference in New Issue