|
|
@ -3,14 +3,13 @@ package cc.hiver.mall.serviceimpl; |
|
|
import cc.hiver.core.common.constant.CommonConstant; |
|
|
import cc.hiver.core.common.constant.CommonConstant; |
|
|
import cc.hiver.core.common.constant.DealingsRecordConstant; |
|
|
import cc.hiver.core.common.constant.DealingsRecordConstant; |
|
|
import cc.hiver.core.common.constant.SaleConstant; |
|
|
import cc.hiver.core.common.constant.SaleConstant; |
|
|
import cc.hiver.core.common.constant.UserConstant; |
|
|
|
|
|
import cc.hiver.core.common.sms.SmsUtil; |
|
|
import cc.hiver.core.common.sms.SmsUtil; |
|
|
import cc.hiver.core.common.utils.*; |
|
|
import cc.hiver.core.common.utils.BeanUtils; |
|
|
import cc.hiver.core.common.vo.PageVo; |
|
|
import cc.hiver.core.common.utils.SecurityUtil; |
|
|
|
|
|
import cc.hiver.core.common.utils.SnowFlakeUtil; |
|
|
|
|
|
import cc.hiver.core.common.utils.StringUtils; |
|
|
import cc.hiver.core.entity.LogiticsCompany; |
|
|
import cc.hiver.core.entity.LogiticsCompany; |
|
|
import cc.hiver.core.entity.Role; |
|
|
|
|
|
import cc.hiver.core.entity.User; |
|
|
import cc.hiver.core.entity.User; |
|
|
import cc.hiver.core.entity.UserRole; |
|
|
|
|
|
import cc.hiver.core.service.LogiticsCompanyService; |
|
|
import cc.hiver.core.service.LogiticsCompanyService; |
|
|
import cc.hiver.core.service.RoleService; |
|
|
import cc.hiver.core.service.RoleService; |
|
|
import cc.hiver.core.service.UserRoleService; |
|
|
import cc.hiver.core.service.UserRoleService; |
|
|
@ -29,8 +28,6 @@ import cc.hiver.mall.service.mybatis.*; |
|
|
import cn.hutool.core.text.CharSequenceUtil; |
|
|
import cn.hutool.core.text.CharSequenceUtil; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.data.domain.Page; |
|
|
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
@ -453,10 +450,10 @@ public class SalesAndDetailsServiceImpl implements SalesAndDetailsService { |
|
|
// 分享页提交订单的时候,根据手机号查询下游客户信息,如果查不到,则新增下游客户
|
|
|
// 分享页提交订单的时候,根据手机号查询下游客户信息,如果查不到,则新增下游客户
|
|
|
User byMobile; |
|
|
User byMobile; |
|
|
String customerId = ""; |
|
|
String customerId = ""; |
|
|
if (StringUtils.isNotEmpty(saleQueryDTO.getMobile())) { |
|
|
// if (StringUtils.isNotEmpty(saleQueryDTO.getMobile())) {
|
|
|
// 20240906如果前台传了客户id了,不要新增客户了就
|
|
|
// 20240906如果前台传了客户id了,不要新增客户了就
|
|
|
if(StringUtils.isEmpty(saleQueryDTO.getUserId())){ |
|
|
if(StringUtils.isEmpty(saleQueryDTO.getUserId())){ |
|
|
byMobile = userService.findByMobile(saleQueryDTO.getMobile()); |
|
|
/*byMobile = userService.findByMobile(saleQueryDTO.getMobile()); |
|
|
if (byMobile == null) { |
|
|
if (byMobile == null) { |
|
|
//默认密码
|
|
|
//默认密码
|
|
|
final String encryptPass = new BCryptPasswordEncoder().encode("123456"); |
|
|
final String encryptPass = new BCryptPasswordEncoder().encode("123456"); |
|
|
@ -495,9 +492,9 @@ public class SalesAndDetailsServiceImpl implements SalesAndDetailsService { |
|
|
} |
|
|
} |
|
|
byMobile = userService.save(byMobile); |
|
|
byMobile = userService.save(byMobile); |
|
|
} |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
|
|
|
|
|
|
customer.setUserId(byMobile.getId()); |
|
|
// customer.setUserId(byMobile.getId());
|
|
|
customer.setCreateTime(new Date()); |
|
|
customer.setCreateTime(new Date()); |
|
|
customer.setDelFlag(CommonConstant.DEL_FLAG_FALSE); |
|
|
customer.setDelFlag(CommonConstant.DEL_FLAG_FALSE); |
|
|
customer.setName(saleQueryDTO.getUsername()); |
|
|
customer.setName(saleQueryDTO.getUsername()); |
|
|
@ -545,10 +542,10 @@ public class SalesAndDetailsServiceImpl implements SalesAndDetailsService { |
|
|
// 客户id拿前台传的
|
|
|
// 客户id拿前台传的
|
|
|
customerId = saleQueryDTO.getUserId(); |
|
|
customerId = saleQueryDTO.getUserId(); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
/*} else { |
|
|
log.error("下游客户未填写手机号!"); |
|
|
log.error("下游客户未填写手机号!"); |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
}*/ |
|
|
|
|
|
|
|
|
// 分享页提交订单这里肯定是:未收款
|
|
|
// 分享页提交订单这里肯定是:未收款
|
|
|
sale.setPayStatus("0"); |
|
|
sale.setPayStatus("0"); |
|
|
|