Merge branch 'feature/mall_product' into test
commit
89041b470f
|
@ -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) {
|
public void addPhoneRecord(RechargeOrderDO orderDO, String orderId) {
|
||||||
List<RechargeOrderInfoDO> infoDOS = rechargeOrderInfoMapper.selectList(Wrappers.<RechargeOrderInfoDO>lambdaQuery().eq(RechargeOrderInfoDO::getOrderNo, orderId));
|
List<RechargeOrderInfoDO> infoDOS = rechargeOrderInfoMapper.selectList(Wrappers.<RechargeOrderInfoDO>lambdaQuery().eq(RechargeOrderInfoDO::getOrderNo, orderId));
|
||||||
List<PhoneRecordDO> recordDOS = new ArrayList<>();
|
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())) {
|
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][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());
|
MemberUserRespDTO userByMobile = userService.getUserByMobile(request.getUserPhone());
|
||||||
// 初始化一个账号
|
// 初始化一个账号
|
||||||
if (Objects.isNull(userByMobile)) {
|
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) {
|
private StoreOrder getInfoException(String orderNo) {
|
||||||
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<StoreOrder> lqw = Wrappers.lambdaQuery();
|
||||||
|
|
|
@ -202,7 +202,8 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
||||||
Assert.notNull(loginUser, "登录失效,请重新登录!");
|
Assert.notNull(loginUser, "登录失效,请重新登录!");
|
||||||
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
|
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
|
||||||
.eq(RechargeOrderDO::getUid, loginUser.getId())
|
.eq(RechargeOrderDO::getUid, loginUser.getId())
|
||||||
.ne(RechargeOrderDO::getPaid, 1)
|
.eq(RechargeOrderDO::getPaid, 1)
|
||||||
|
.eq(RechargeOrderDO::getRefundStatus, 0)
|
||||||
.orderByDesc(RechargeOrderDO::getCreateTime));
|
.orderByDesc(RechargeOrderDO::getCreateTime));
|
||||||
if (!CollectionUtils.isEmpty(orderDOS)) {
|
if (!CollectionUtils.isEmpty(orderDOS)) {
|
||||||
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
||||||
|
@ -317,7 +318,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
||||||
@Override
|
@Override
|
||||||
public List<RechargeOrderRespVO> memberOrderInfoByPhone(String phone) {
|
public List<RechargeOrderRespVO> memberOrderInfoByPhone(String phone) {
|
||||||
List<RechargeOrderDO> orderDOS = rechargeOrderMapper.selectList(Wrappers.<RechargeOrderDO>lambdaQuery()
|
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)) {
|
if (!CollectionUtils.isEmpty(orderDOS)) {
|
||||||
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
List<RechargeOrderRespVO> rechargeOrderRespVOS = RechargeOrderConvert.INSTANCE.convertList(orderDOS);
|
||||||
List<String> collect1 = rechargeOrderRespVOS.stream().map(RechargeOrderBaseVO::getOrderId).collect(Collectors.toList());
|
List<String> collect1 = rechargeOrderRespVOS.stream().map(RechargeOrderBaseVO::getOrderId).collect(Collectors.toList());
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class AppAuthSmsLoginReqVO {
|
||||||
|
|
||||||
@Schema(description = "手机号", required = true, example = "15601691300")
|
@Schema(description = "手机号", required = true, example = "15601691300")
|
||||||
@NotEmpty(message = "手机号不能为空")
|
@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;
|
private String mobile;
|
||||||
/**
|
/**
|
||||||
* 推广员id
|
* 推广员id
|
||||||
|
|
|
@ -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.security.core.annotations.PreAuthenticated;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
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.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.promoter.vo.PromoterRespVO;
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.user.vo.AppUserInfoReqVO;
|
import cn.iocoder.yudao.module.member.controller.admin.user.vo.AppUserInfoReqVO;
|
||||||
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserInfoRespVO;
|
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserInfoRespVO;
|
||||||
|
|
|
@ -105,6 +105,9 @@ public class PromoterServiceImpl implements PromoterService {
|
||||||
memberUserDO.setStatus(createReqVO.getStatus());
|
memberUserDO.setStatus(createReqVO.getStatus());
|
||||||
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
|
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
|
||||||
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
||||||
|
} else {
|
||||||
|
memberUserDO.setNickname(createReqVO.getNickname());
|
||||||
|
memberUserService.updateById(memberUserDO);
|
||||||
}
|
}
|
||||||
if(!TenantContextHolder.getTenantId().equals(memberUserDO.getTenantId())){
|
if(!TenantContextHolder.getTenantId().equals(memberUserDO.getTenantId())){
|
||||||
throw new ServiceException(PROMOTER_EXISTS_OTHER);
|
throw new ServiceException(PROMOTER_EXISTS_OTHER);
|
||||||
|
|
Loading…
Reference in New Issue