Merge branch 'feature/mall_product' into test

feature/mall_product
tangqian 2023-06-09 14:32:38 +08:00
commit 89041b470f
5 changed files with 13 additions and 10 deletions

View File

@ -1282,11 +1282,6 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
}
}
public static void main(String[] args) {
String s = "MEMBER_1661994584871321602";
System.out.println(s.contains("MEMBER_"));
}
public void addPhoneRecord(RechargeOrderDO orderDO, String orderId) {
List<RechargeOrderInfoDO> infoDOS = rechargeOrderInfoMapper.selectList(Wrappers.<RechargeOrderInfoDO>lambdaQuery().eq(RechargeOrderInfoDO::getOrderNo, orderId));
List<PhoneRecordDO> recordDOS = new ArrayList<>();
@ -1522,7 +1517,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
}
if (StringUtils.isNotBlank(request.getUserPhone()) && StringUtils.isNotBlank(request.getConfirmPhone())) {
Assert.isTrue(StringUtils.equals(request.getUserPhone(), request.getConfirmPhone()), "输入号码不一致!");
Assert.isTrue(Pattern.matches("^[1][3,4,5,7,8][0,1,2,3,4,5,6,7,8,9][0-9]{8}$", request.getUserPhone()), "手机号前三位不能是190或193!");
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!");
MemberUserRespDTO userByMobile = userService.getUserByMobile(request.getUserPhone());
// 初始化一个账号
if (Objects.isNull(userByMobile)) {
@ -1531,6 +1526,9 @@ 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) {
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();

View File

@ -202,7 +202,8 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
Assert.notNull(loginUser, "登录失效,请重新登录!");
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
.eq(RechargeOrderDO::getUid, loginUser.getId())
.ne(RechargeOrderDO::getPaid, 1)
.eq(RechargeOrderDO::getPaid, 1)
.eq(RechargeOrderDO::getRefundStatus, 0)
.orderByDesc(RechargeOrderDO::getCreateTime));
if (!CollectionUtils.isEmpty(orderDOS)) {
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
@ -317,7 +318,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
@Override
public List<RechargeOrderRespVO> memberOrderInfoByPhone(String phone) {
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
.eq(RechargeOrderDO::getUserPhone, phone).eq(RechargeOrderDO::getPaid, 1));
.eq(StringUtils.isNotBlank(phone), RechargeOrderDO::getUserPhone, phone)
.eq(RechargeOrderDO::getRefundStatus, 0)
.eq(RechargeOrderDO::getPaid, 1));
if (!CollectionUtils.isEmpty(orderDOS)) {
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
List<String> collect1 = rechargeOrderRespVOS.stream().map(RechargeOrderBaseVO::getOrderId).collect(Collectors.toList());

View File

@ -29,7 +29,7 @@ public class AppAuthSmsLoginReqVO {
@Schema(description = "手机号", required = true, example = "15601691300")
@NotEmpty(message = "手机号不能为空")
@Pattern(regexp = "^[1][3,4,5,7,8][0,1,2,3,4,5,6,7,8,9][0-9]{8}$",message = "手机号不正确")
@Pattern(regexp = "^[1][3,4,5,7,8,9][1,2,4,5,6,7,8,9][0-9]{8}$",message = "手机号不正确")
private String mobile;
/**
* 广id

View File

@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.AppPromoterCreateReqVO;
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.PromoterCreateReqVO;
import cn.iocoder.yudao.module.member.controller.admin.promoter.vo.PromoterRespVO;
import cn.iocoder.yudao.module.member.controller.admin.user.vo.AppUserInfoReqVO;
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserInfoRespVO;

View File

@ -105,6 +105,9 @@ public class PromoterServiceImpl implements PromoterService {
memberUserDO.setStatus(createReqVO.getStatus());
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
} else {
memberUserDO.setNickname(createReqVO.getNickname());
memberUserService.updateById(memberUserDO);
}
if(!TenantContextHolder.getTenantId().equals(memberUserDO.getTenantId())){
throw new ServiceException(PROMOTER_EXISTS_OTHER);