forked from angelo/java-retail-app
Compare commits
No commits in common. "826855b5fcbeee8fb4ee7429b91cfcd8c49affd4" and "09f3c0e30b2ec52c0b9beb32188c517d28d77d61" have entirely different histories.
826855b5fc
...
09f3c0e30b
|
|
@ -3,7 +3,6 @@ package com.hzs.member.base;
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberRegister;
|
import com.hzs.common.domain.member.base.CuMemberRegister;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
|
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
|
||||||
|
|
@ -33,20 +32,6 @@ public interface IMemberServiceApi {
|
||||||
*/
|
*/
|
||||||
R<LoginMember> getMemberInfo(String memberCode);
|
R<LoginMember> getMemberInfo(String memberCode);
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过会员编码查询分享会员信息
|
|
||||||
*
|
|
||||||
* @param memberCode 会员编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
R<LoginMember> getShareMemberInfo(String memberCode);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询分享会员
|
|
||||||
*
|
|
||||||
* @param pkMember 主键
|
|
||||||
*/
|
|
||||||
R<CuMemberShare> queryCuMemberShare(Long pkMember);
|
|
||||||
/**
|
/**
|
||||||
* 根据会员ID获取会员信息(查库)
|
* 根据会员ID获取会员信息(查库)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.hzs.member.base.dto;
|
package com.hzs.member.base.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
|
|
@ -64,11 +63,6 @@ public class LoginMember implements Serializable {
|
||||||
*/
|
*/
|
||||||
private CuMemberExt cuMember;
|
private CuMemberExt cuMember;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分享会员信息(分享注册会员使用)
|
|
||||||
*/
|
|
||||||
private CuMemberShare cuMemberShare;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算国家(此字段实体不存值,只做部分业务传递参数使用)
|
* 结算国家(此字段实体不存值,只做部分业务传递参数使用)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.hzs.member.base.controller.api;
|
package com.hzs.member.base.controller.api;
|
||||||
|
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
import com.hzs.common.core.annotation.RepeatSubmitSimple;
|
||||||
import com.hzs.common.core.config.BdConfig;
|
|
||||||
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
import com.hzs.common.core.constant.msg.CommonMsgConstants;
|
||||||
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
import com.hzs.common.core.constant.msg.ConfigMsgConstants;
|
||||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||||
|
|
@ -371,50 +369,4 @@ public class ApiMemberController extends BaseController {
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询推荐人编号 -- 188分享注册
|
|
||||||
*
|
|
||||||
* @param pkParent 推荐人(加密)
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/fans-convert-code/{pkParent}")
|
|
||||||
public AjaxResult fansConvertCode(@PathVariable("pkParent") String pkParent) {
|
|
||||||
// 验证必输项
|
|
||||||
if (pkParent == null) {
|
|
||||||
return AjaxResult.error(MemberMsgConstants.REQUIRED_NOT_EMPTY);
|
|
||||||
}
|
|
||||||
CuMember cuMember = iCuMemberService.getMemberById(Long.parseLong(new String(Base64Decoder.decode(pkParent))));
|
|
||||||
if (null != cuMember) {
|
|
||||||
return AjaxResult.success("", cuMember.getMemberCode());
|
|
||||||
}
|
|
||||||
return AjaxResult.error();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据订单查询会员信息 -- 188分享注册
|
|
||||||
*
|
|
||||||
* @param orderCode 订单编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RepeatSubmitSimple(intervalTime = 2L)
|
|
||||||
@GetMapping("/fans-order/{orderCode}")
|
|
||||||
public AjaxResult fansOrder(@PathVariable("orderCode") String orderCode) {
|
|
||||||
CuMemberExt cuMemberExt = iCuMemberService.queryFansOrder(orderCode);
|
|
||||||
if (null == cuMemberExt) {
|
|
||||||
return AjaxResult.error("注册会员失败,请联系客服处理");
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.success(MemberShare.builder()
|
|
||||||
.memberName(cuMemberExt.getMemberName())
|
|
||||||
.memberCode(cuMemberExt.getMemberCode())
|
|
||||||
.phone(cuMemberExt.getPhone())
|
|
||||||
.loginPassword(cuMemberExt.getLoginPassword())
|
|
||||||
.payPassword(cuMemberExt.getPayPassword())
|
|
||||||
.urlAddress(BdConfig.getPc())
|
|
||||||
.gzh(BdConfig.getGzh())
|
|
||||||
.ios(BdConfig.getIos())
|
|
||||||
.android(BdConfig.getAndroid())
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -651,12 +651,4 @@ public interface CuMemberMapper extends BaseMapper<CuMember> {
|
||||||
*/
|
*/
|
||||||
List<MemberMeritsSummaryVo> queryDateBySummary(CensusSummaryParam censusSummaryParam);
|
List<MemberMeritsSummaryVo> queryDateBySummary(CensusSummaryParam censusSummaryParam);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询海粉订单
|
|
||||||
*
|
|
||||||
* @param orderCode 订单编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
CuMemberExt queryFansOrder(@Param("orderCode") String orderCode);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
package com.hzs.member.base.provider;
|
package com.hzs.member.base.provider;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.core.enums.ELoginType;
|
import com.hzs.common.core.enums.ELoginType;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberRegister;
|
import com.hzs.common.domain.member.base.CuMemberRegister;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
|
import com.hzs.common.domain.retail.member.CuMemberRetailRegion;
|
||||||
|
|
@ -42,8 +40,6 @@ public class MemberServiceProvider implements IMemberServiceApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberService iCuMemberService;
|
private ICuMemberService iCuMemberService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberShareService iCuMemberShareService;
|
|
||||||
@Autowired
|
|
||||||
private ICuMemberBusinessService iCuMemberBusinessService;
|
private ICuMemberBusinessService iCuMemberBusinessService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICuMemberRegisterService iCuMemberRegisterService;
|
private ICuMemberRegisterService iCuMemberRegisterService;
|
||||||
|
|
@ -66,20 +62,6 @@ public class MemberServiceProvider implements IMemberServiceApi {
|
||||||
return R.ok(loginMember);
|
return R.ok(loginMember);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<LoginMember> getShareMemberInfo(String memberCode) {
|
|
||||||
LambdaQueryWrapper<CuMemberShare> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(CuMemberShare::getMemberCode, memberCode);
|
|
||||||
CuMemberShare cuMemberShare = iCuMemberShareService.getOne(queryWrapper);
|
|
||||||
if (null == cuMemberShare) {
|
|
||||||
return R.fail("用户名或密码错误");
|
|
||||||
}
|
|
||||||
LoginMember loginMember = new LoginMember();
|
|
||||||
loginMember.setLoginType(ELoginType.SHARE_MEMBER.getValue());
|
|
||||||
loginMember.setCuMemberShare(cuMemberShare);
|
|
||||||
return R.ok(loginMember);
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public R<CuMemberExt> getMemberById(Long memberId) {
|
public R<CuMemberExt> getMemberById(Long memberId) {
|
||||||
return R.ok(iCuMemberService.getMemberById(memberId));
|
return R.ok(iCuMemberService.getMemberById(memberId));
|
||||||
|
|
@ -399,9 +381,4 @@ public class MemberServiceProvider implements IMemberServiceApi {
|
||||||
return R.ok(iCuMemberService.checkRegisterRelation(phone, parentCode));
|
return R.ok(iCuMemberService.checkRegisterRelation(phone, parentCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public R<CuMemberShare> queryCuMemberShare(Long pkMember) {
|
|
||||||
return R.ok(iCuMemberShareService.queryCuMemberShare(pkMember));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,15 +179,7 @@ public interface ICuMemberService extends IService<CuMember> {
|
||||||
* @param digit 编号数字位数
|
* @param digit 编号数字位数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String createUserNameByPremix(Integer pkCountry, Integer digit); /**
|
String createUserNameByPremix(Integer pkCountry, Integer digit);
|
||||||
* 生成会员编号
|
|
||||||
*
|
|
||||||
* @param pkCountry 所属国家
|
|
||||||
* @param isHaiFun
|
|
||||||
* @param digit 编号数字位数
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String createUserNameByPremix(Integer pkCountry, Boolean isHaiFun, Integer digit);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量生成会员编号
|
* 批量生成会员编号
|
||||||
|
|
@ -805,7 +797,7 @@ public interface ICuMemberService extends IService<CuMember> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
CuMember getRetailTopMember(Long pkMember, String memberCode, Long topPkMember, String topMemberCode);
|
CuMember getRetailTopMember(Long pkMember, String memberCode, Long topPkMember, String topMemberCode);
|
||||||
String createRetailMemberCode(String prefix);
|
|
||||||
/**
|
/**
|
||||||
* 根据推荐人编号,校验手机号必须唯一
|
* 根据推荐人编号,校验手机号必须唯一
|
||||||
*
|
*
|
||||||
|
|
@ -919,12 +911,4 @@ public interface ICuMemberService extends IService<CuMember> {
|
||||||
*/
|
*/
|
||||||
List<CensusSummaryVo> selectCensusSummary(CensusSummaryParam censusSummaryParam, List<String> days);
|
List<CensusSummaryVo> selectCensusSummary(CensusSummaryParam censusSummaryParam, List<String> days);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询海粉订单
|
|
||||||
*
|
|
||||||
* @param orderCode 订单编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
CuMemberExt queryFansOrder(String orderCode);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,5 @@ public interface ICuMemberShareService extends IService<CuMemberShare> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SeaFlourVo> seaFlourList(SeaFlourParam seaFlourParam);
|
List<SeaFlourVo> seaFlourList(SeaFlourParam seaFlourParam);
|
||||||
/**
|
|
||||||
* 查询会员分享
|
|
||||||
*
|
|
||||||
* @param pkMember 会员主键
|
|
||||||
*/
|
|
||||||
CuMemberShare queryCuMemberShare(Long pkMember);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1614,34 +1614,6 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
return memberCode;
|
return memberCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String createUserNameByPremix(Integer pkCountry, Boolean isHaiFun, Integer digit) {
|
|
||||||
String prefix;
|
|
||||||
if (isHaiFun) {
|
|
||||||
prefix = SysConstants.HAI_FUN_PREFIX;
|
|
||||||
} else {
|
|
||||||
CountryDTO country = iCountryServiceApi.getCountry(pkCountry).getData();
|
|
||||||
prefix = country.getCode();
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(prefix)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// 生成loginName
|
|
||||||
String memberCode = this.createMemberCode(prefix, digit);
|
|
||||||
|
|
||||||
CuMember cuMemberByKey = getMember(memberCode);
|
|
||||||
if (cuMemberByKey != null && cuMemberByKey.getPkId() > 0) {
|
|
||||||
// 用户名已经存在,则继续尝试
|
|
||||||
return this.createUserNameByPremix(pkCountry, isHaiFun, digit);
|
|
||||||
} else {
|
|
||||||
// 验证空单注册里面是否存在编号
|
|
||||||
List<CuMemberEmptyCode> cuMemberEmptyDetails = iCuMemberEmptyCodeService.queryCuMemberEmptyCode(memberCode);
|
|
||||||
if (CollectionUtil.isNotEmpty(cuMemberEmptyDetails)) {
|
|
||||||
return this.createUserNameByPremix(pkCountry, isHaiFun, digit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return memberCode;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 创建会员编号
|
* 创建会员编号
|
||||||
*
|
*
|
||||||
|
|
@ -3108,7 +3080,6 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
* @param prefix 会员编号前缀
|
* @param prefix 会员编号前缀
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public String createRetailMemberCode(String prefix) {
|
public String createRetailMemberCode(String prefix) {
|
||||||
if (StringUtils.isEmpty(prefix)) {
|
if (StringUtils.isEmpty(prefix)) {
|
||||||
prefix = SysConstants.RETAIL_PREFIX;
|
prefix = SysConstants.RETAIL_PREFIX;
|
||||||
|
|
@ -3358,9 +3329,4 @@ public class CuMemberServiceImpl extends ServiceImpl<CuMemberMapper, CuMember> i
|
||||||
return censusSummaryList;
|
return censusSummaryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CuMemberExt queryFansOrder(String orderCode) {
|
|
||||||
return baseMapper.queryFansOrder(orderCode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.hzs.member.base.service.impl;
|
package com.hzs.member.base.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
import com.hzs.common.domain.member.base.CuMemberShare;
|
||||||
import com.hzs.member.base.mapper.CuMemberShareMapper;
|
import com.hzs.member.base.mapper.CuMemberShareMapper;
|
||||||
|
|
@ -31,10 +30,4 @@ public class CuMemberShareServiceImpl extends ServiceImpl<CuMemberShareMapper, C
|
||||||
return baseMapper.seaFlourList(seaFlourParam);
|
return baseMapper.seaFlourList(seaFlourParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CuMemberShare queryCuMemberShare(Long pkMember) {
|
|
||||||
QueryWrapper<CuMemberShare> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.select("PK_ID,MEMBER_CODE,MEMBER_NAME,PHONE,PK_PARENT");
|
|
||||||
return baseMapper.selectById(pkMember);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,4 @@ public interface IMemberLoginService {
|
||||||
**/
|
**/
|
||||||
LoginMember passwordFreelogin(String username);
|
LoginMember passwordFreelogin(String username);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分享登录
|
|
||||||
*
|
|
||||||
* @param username 用户名
|
|
||||||
* @param password 密码
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
LoginMember shareLogin(String username, String password);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import com.hzs.common.core.utils.ServletUtils;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.core.utils.ip.IpUtils;
|
import com.hzs.common.core.utils.ip.IpUtils;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.detail.CuMemberLogin;
|
import com.hzs.common.domain.member.detail.CuMemberLogin;
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
|
|
@ -158,35 +157,6 @@ public class MemberLoginServiceImpl implements IMemberLoginService {
|
||||||
return loginMember;
|
return loginMember;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public LoginMember shareLogin(String username, String password) {
|
|
||||||
// 用户名或密码为空 错误
|
|
||||||
if (StringUtils.isAnyBlank(username, password)) {
|
|
||||||
// 用户/密码必须填写
|
|
||||||
throw new ServiceException(TransactionUtils.getContent(SystemMsgConstants.USER_REQUIRED));
|
|
||||||
}
|
|
||||||
// 查询用户信息
|
|
||||||
R<LoginMember> memberResult = iMemberServiceApi.getShareMemberInfo(username);
|
|
||||||
|
|
||||||
if (R.FAIL == memberResult.getCode()) {
|
|
||||||
throw new ServiceException(memberResult.getMsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.isNull(memberResult.getData())) {
|
|
||||||
// 登录用户: %s 不存在
|
|
||||||
throw new ServiceException(TransactionUtils.getContent(SystemMsgConstants.USER_NOT_EXIST, username));
|
|
||||||
}
|
|
||||||
|
|
||||||
LoginMember loginMember = memberResult.getData();
|
|
||||||
CuMemberShare cuMemberShare = loginMember.getCuMemberShare();
|
|
||||||
// 密码校验
|
|
||||||
if (!SecurityUtils.matchesPassword(password, cuMemberShare.getLoginPwd())) {
|
|
||||||
// 用户不存在/密码错误
|
|
||||||
throw new ServiceException(TransactionUtils.getContent(SystemMsgConstants.USER_ERROR, username));
|
|
||||||
}
|
|
||||||
|
|
||||||
return loginMember;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 记录登录信息
|
* 记录登录信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -172,30 +172,4 @@ public class ApiShareController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取188分享码(H5)
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("/fans-code-h5")
|
|
||||||
public AjaxResult fansCodeH5() {
|
|
||||||
Long userId = SecurityUtils.getUserId();
|
|
||||||
// 188注册分享人就是自己
|
|
||||||
R<String> resultR = iShareServiceApi.queryShareCode(ShareServiceDTO.builder()
|
|
||||||
.eShareType(EShareType.FANS)
|
|
||||||
.pkBusiness(userId)
|
|
||||||
.pkCountry(SecurityUtils.getPkCountry())
|
|
||||||
.userId(userId)
|
|
||||||
.build());
|
|
||||||
if (resultR.isSuccess()) {
|
|
||||||
Map<String, String> resultMap = new HashMap<>();
|
|
||||||
resultMap.put("dataUrl", resultR.getData());
|
|
||||||
// 前端无法根据URL生成海报,此处需要转一下base64
|
|
||||||
resultMap.put("dataStr", Base64Util.toUrlBase64(resultR.getData()));
|
|
||||||
return AjaxResult.success(resultMap);
|
|
||||||
}
|
|
||||||
return AjaxResult.error();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,13 @@
|
||||||
package com.hzs.retail.login.controller;
|
package com.hzs.retail.login.controller;
|
||||||
|
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
|
||||||
import com.hzs.common.core.constant.CacheConstants;
|
import com.hzs.common.core.constant.CacheConstants;
|
||||||
import com.hzs.common.core.constant.MagicNumberConstants;
|
|
||||||
import com.hzs.common.core.constant.SysConstants;
|
|
||||||
import com.hzs.common.core.service.RedisService;
|
import com.hzs.common.core.service.RedisService;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.core.web.domain.AjaxResult;
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
|
||||||
import com.hzs.common.security.auth.AuthMemberUtil;
|
import com.hzs.common.security.auth.AuthMemberUtil;
|
||||||
import com.hzs.common.security.service.MemberTokenService;
|
import com.hzs.common.security.service.MemberTokenService;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.member.base.dto.LoginMember;
|
import com.hzs.member.base.dto.LoginMember;
|
||||||
import com.hzs.member.base.service.ICuMemberService;
|
|
||||||
import com.hzs.member.base.service.ICuMemberShareService;
|
|
||||||
import com.hzs.member.login.param.AutoLoginParam;
|
|
||||||
import com.hzs.member.login.service.IMemberLoginService;
|
|
||||||
import com.hzs.retail.login.param.RetailAutoLoginParam;
|
import com.hzs.retail.login.param.RetailAutoLoginParam;
|
||||||
import com.hzs.retail.login.param.RetailLoginParam;
|
import com.hzs.retail.login.param.RetailLoginParam;
|
||||||
import com.hzs.retail.login.service.IRetailMemberLoginService;
|
import com.hzs.retail.login.service.IRetailMemberLoginService;
|
||||||
|
|
@ -37,13 +28,6 @@ import javax.validation.Valid;
|
||||||
@RestController
|
@RestController
|
||||||
public class RetailMemberTokenController {
|
public class RetailMemberTokenController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ICuMemberService iCuMemberService;
|
|
||||||
@Autowired
|
|
||||||
private ICuMemberShareService iCuMemberShareService;
|
|
||||||
@Autowired
|
|
||||||
private IMemberLoginService iMemberLoginService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MemberTokenService memberTokenService;
|
private MemberTokenService memberTokenService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -73,53 +57,19 @@ public class RetailMemberTokenController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/auto-login")
|
@PostMapping("/auto-login")
|
||||||
// public AjaxResult autoLogin(@Valid @RequestBody RetailAutoLoginParam param) {
|
public AjaxResult autoLogin(@Valid @RequestBody RetailAutoLoginParam param) {
|
||||||
// String tmpUuid = redisService.getCacheObject(CacheConstants.AUTO_LOGIN + param.getUsername());
|
String tmpUuid = redisService.getCacheObject(CacheConstants.AUTO_LOGIN + param.getUsername());
|
||||||
// if (!param.getUuid().equals(tmpUuid)) {
|
if (!param.getUuid().equals(tmpUuid)) {
|
||||||
// // 没有自动登录标记 或者 标记不对,则不能自动登录
|
// 没有自动登录标记 或者 标记不对,则不能自动登录
|
||||||
// return AjaxResult.error("当前会员已不能快递登录");
|
return AjaxResult.error("当前会员已不能快递登录");
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 用户登录
|
|
||||||
// LoginMember loginMember = iRetailMemberLoginService.login(param.getUsername(), param.getPassword());
|
|
||||||
// // 获取登录token
|
|
||||||
// return AjaxResult.success(memberTokenService.createToken(loginMember));
|
|
||||||
// }
|
|
||||||
public AjaxResult autoLogin(@RequestBody AutoLoginParam param) {
|
|
||||||
if (StringUtils.isEmpty(param.getPkParent())) {
|
|
||||||
return AjaxResult.error("缺少注册信息!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上级编码(推荐人)
|
// 用户登录
|
||||||
Long pkParent = Long.parseLong(new String(Base64Decoder.decode(param.getPkParent())));
|
LoginMember loginMember = iRetailMemberLoginService.login(param.getUsername(), param.getPassword());
|
||||||
// 查询上级信息
|
|
||||||
CuMemberExt parentCuMember = iCuMemberService.getMemberById(pkParent);
|
|
||||||
if (null == parentCuMember) {
|
|
||||||
return AjaxResult.error("二维码已经失效!");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 生成的会员编号
|
|
||||||
String memberCode = iCuMemberService.createRetailMemberCode(SysConstants.RETAIL_PREFIX);
|
|
||||||
// iCuMemberService.createUserNameByPremix(parentCuMember.getPkSettleCountry(), MagicNumberConstants.DIGIT);
|
|
||||||
|
|
||||||
CuMemberShare cuMemberShare = new CuMemberShare();
|
|
||||||
cuMemberShare.setMemberCode(memberCode);
|
|
||||||
cuMemberShare.setPkParent(pkParent);
|
|
||||||
cuMemberShare.setLoginPassword(SysConstants.LOGIN_PASSWORD);
|
|
||||||
cuMemberShare.setLoginPwd(SecurityUtils.encryptPassword(SysConstants.LOGIN_PASSWORD));
|
|
||||||
cuMemberShare.setPayPassword(SysConstants.PAY_PASSWORD);
|
|
||||||
cuMemberShare.setPayPwd(SecurityUtils.encryptPassword(SysConstants.PAY_PASSWORD));
|
|
||||||
cuMemberShare.setPkCreator(pkParent);
|
|
||||||
cuMemberShare.setPkCountry(parentCuMember.getPkSettleCountry());
|
|
||||||
if (iCuMemberShareService.save(cuMemberShare)) {
|
|
||||||
// 会员登录
|
|
||||||
LoginMember loginMember = iMemberLoginService.shareLogin(memberCode, SysConstants.LOGIN_PASSWORD);
|
|
||||||
|
|
||||||
// 获取登录token
|
// 获取登录token
|
||||||
return AjaxResult.success(memberTokenService.createToken(loginMember));
|
return AjaxResult.success(memberTokenService.createToken(loginMember));
|
||||||
}
|
}
|
||||||
return AjaxResult.error();
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 会员登出
|
* 会员登出
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2498,19 +2498,4 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询海粉订单 -->
|
|
||||||
<select id="queryFansOrder" resultMap="MemberResultMap">
|
|
||||||
select cm.member_code,
|
|
||||||
cm.member_name,
|
|
||||||
cm.phone,
|
|
||||||
cm.login_password,
|
|
||||||
cm.pay_password
|
|
||||||
from sa_order so
|
|
||||||
inner join cu_member cm
|
|
||||||
on cm.pk_id = so.pk_creator
|
|
||||||
where so.del_flag = 0
|
|
||||||
and so.order_type = 41
|
|
||||||
and so.order_code = #{orderCode}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -7,22 +7,17 @@ import com.hzs.common.core.config.BdConfig;
|
||||||
import com.hzs.common.core.constant.CacheConstants;
|
import com.hzs.common.core.constant.CacheConstants;
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.core.enums.EGrade;
|
import com.hzs.common.core.enums.EGrade;
|
||||||
import com.hzs.common.core.enums.EOrderPrefix;
|
|
||||||
import com.hzs.common.core.enums.ESpecialArea;
|
import com.hzs.common.core.enums.ESpecialArea;
|
||||||
import com.hzs.common.core.enums.EYesNo;
|
import com.hzs.common.core.enums.EYesNo;
|
||||||
import com.hzs.common.core.exception.ServiceException;
|
import com.hzs.common.core.exception.ServiceException;
|
||||||
import com.hzs.common.core.service.RedisService;
|
import com.hzs.common.core.service.RedisService;
|
||||||
import com.hzs.common.core.utils.CommonUtil;
|
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.core.web.domain.AjaxResult;
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||||
import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
|
import com.hzs.common.domain.retail.member.ext.CuMemberRetailRegionExt;
|
||||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||||
import com.hzs.common.domain.sale.wares.BdWares;
|
|
||||||
import com.hzs.common.domain.system.config.BdGrade;
|
import com.hzs.common.domain.system.config.BdGrade;
|
||||||
import com.hzs.common.security.service.MemberTokenService;
|
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.member.base.IMemberServiceApi;
|
import com.hzs.member.base.IMemberServiceApi;
|
||||||
import com.hzs.retail.sale.controller.service.IRetailOrderService;
|
import com.hzs.retail.sale.controller.service.IRetailOrderService;
|
||||||
|
|
@ -30,13 +25,10 @@ import com.hzs.retail.sale.param.*;
|
||||||
import com.hzs.retail.sale.vo.*;
|
import com.hzs.retail.sale.vo.*;
|
||||||
import com.hzs.sale.order.param.*;
|
import com.hzs.sale.order.param.*;
|
||||||
import com.hzs.sale.order.service.ISaOrderService;
|
import com.hzs.sale.order.service.ISaOrderService;
|
||||||
import com.hzs.sale.order.service.ISaOrderShareTmpService;
|
|
||||||
import com.hzs.sale.shopping.service.IShoppingCartService;
|
import com.hzs.sale.shopping.service.IShoppingCartService;
|
||||||
import com.hzs.sale.shopping.vo.ProductGroup;
|
import com.hzs.sale.shopping.vo.ProductGroup;
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
||||||
import com.hzs.sale.wares.service.IBdWaresService;
|
|
||||||
import com.hzs.sale.wares.service.IBdWaresSpecsSkuService;
|
|
||||||
import com.hzs.system.base.IAreaServiceApi;
|
import com.hzs.system.base.IAreaServiceApi;
|
||||||
import com.hzs.system.config.IGradeServiceApi;
|
import com.hzs.system.config.IGradeServiceApi;
|
||||||
import com.hzs.system.config.dto.GradeDTO;
|
import com.hzs.system.config.dto.GradeDTO;
|
||||||
|
|
@ -44,14 +36,12 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售订单控制器
|
* 新零售订单控制器
|
||||||
|
|
@ -70,21 +60,12 @@ public class ApiRetailOrderController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBdWaresService iBdWaresService;
|
|
||||||
@Autowired
|
|
||||||
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
|
|
||||||
@Autowired
|
|
||||||
private ISaOrderShareTmpService iSaOrderShareTmpService;
|
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi iMemberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IGradeServiceApi iGradeServiceApi;
|
IGradeServiceApi iGradeServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IAreaServiceApi iAreaServiceApi;
|
IAreaServiceApi iAreaServiceApi;
|
||||||
@Autowired
|
|
||||||
private MemberTokenService memberTokenService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验会员等级
|
* 校验会员等级
|
||||||
|
|
@ -810,111 +791,4 @@ public class ApiRetailOrderController {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确认注册订单
|
|
||||||
*
|
|
||||||
* @param registerParam 订单入参
|
|
||||||
* @param source 数据来源
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RepeatSubmit
|
|
||||||
@PostMapping("/fans-confirm-order")
|
|
||||||
public AjaxResult fansConfirmOrder(@RequestBody RetailOrderRegisterParam registerParam,
|
|
||||||
@RequestHeader("Source") Integer source) {
|
|
||||||
// 设置数据来源
|
|
||||||
registerParam.setSource(source);
|
|
||||||
// 会员ID
|
|
||||||
registerParam.setPkCreator(SecurityUtils.getUserId());
|
|
||||||
// 新零售注册专区
|
|
||||||
registerParam.setSpecialArea(ESpecialArea.RETAIL_REGISTER.getValue());
|
|
||||||
// 系统类型
|
|
||||||
registerParam.setSystemType(SecurityUtils.getSystemType());
|
|
||||||
|
|
||||||
// 获取等级列表
|
|
||||||
List<BdGrade> gradeList = iGradeServiceApi.getRetailGradeList().getData();
|
|
||||||
// 校验注册权限等
|
|
||||||
// String checkStr = this.checkRegistrationPermission(registerParam, gradeList);
|
|
||||||
// if (null != checkStr) {
|
|
||||||
// return AjaxResult.error(checkStr);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 手机号可以重复,不需要进行是否重复校验 -- 已经跳过,此处可以不需要当前判断
|
|
||||||
// // 校验注册关系(是否跨团队) -- 2024.12.24 修改为校验手机号必须唯一
|
|
||||||
// String relationStr = iMemberServiceApi.checkRegisterRelation(registerParam.getPhone(), registerParam.getParentCode()).getData();
|
|
||||||
// if (relationStr != null) {
|
|
||||||
// return AjaxResult.error(relationStr);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 购物车中获取商品信息
|
|
||||||
// registerParam.setOrderItemsParams(convertShoppingCarToSku(registerParam.getPkCreator(), registerParam.getShopList()));
|
|
||||||
|
|
||||||
// 遍历商品,封装订单明细
|
|
||||||
// 订单金额
|
|
||||||
BigDecimal orderAmount = BigDecimal.ZERO;
|
|
||||||
|
|
||||||
// 生成订单编号
|
|
||||||
String orderCode = CommonUtil.createSerialNumber(EOrderPrefix.ORDER_CODE);
|
|
||||||
List<OrderItemsParam> orderItemsParams = new ArrayList<>();
|
|
||||||
for (FansConfirmOrderWaresParam waresParam : registerParam.getWaresList()) {
|
|
||||||
// 遍历sku
|
|
||||||
// 产品价格等map
|
|
||||||
Map<Long, BdWaresSpecsSkuExt> skuMap = iBdWaresSpecsSkuService.queryWaresSpecsSkuList(waresParam.getSkuList().stream().map(FansConfirmOrderSkuParam::getPkWaresSku).collect(Collectors.toList()));
|
|
||||||
|
|
||||||
// 查询商品
|
|
||||||
BdWares bdWares = iBdWaresService.getWares(waresParam.getPkWares());
|
|
||||||
|
|
||||||
// 缓存数据
|
|
||||||
List<WaresItemsParam> itemsParamList = new ArrayList<>(waresParam.getSkuList().size());
|
|
||||||
// 遍历产品信息
|
|
||||||
for (FansConfirmOrderSkuParam skuParam : waresParam.getSkuList()) {
|
|
||||||
BdWaresSpecsSkuExt specsSku = skuMap.get(skuParam.getPkWaresSku());
|
|
||||||
orderAmount = orderAmount.add(specsSku.getPrice().multiply(new BigDecimal(skuParam.getQuantity() * waresParam.getQuantity())));
|
|
||||||
|
|
||||||
itemsParamList.add(WaresItemsParam.builder()
|
|
||||||
.pkWaresSpecsSku(skuParam.getPkWaresSku().intValue())
|
|
||||||
.quantity(skuParam.getQuantity())
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
orderItemsParams.add(OrderItemsParam.builder()
|
|
||||||
.waresCode(bdWares.getWaresCode())
|
|
||||||
.quantity(waresParam.getQuantity())
|
|
||||||
.waresItemsParamList(itemsParamList)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
registerParam.setOrderItemsParams(orderItemsParams);
|
|
||||||
CuMemberShare memberShare = memberTokenService.getLoginMember().getCuMemberShare();
|
|
||||||
registerParam.setCuMemberShare(memberShare);
|
|
||||||
// registerParam.setPkCreator(memberShare.getPkParent());
|
|
||||||
// 确认订单
|
|
||||||
String str = iRetailOrderService.confirmRegOrder(registerParam, gradeList);
|
|
||||||
// redis 拿金额
|
|
||||||
SaOrderExt saOrder = redisService.getCacheObject(CacheConstants.RETAIL_TEMP_ORDER + registerParam.getPkCreator() + registerParam.getOrderCode());
|
|
||||||
return confirmSharedOrderReturn(str, registerParam.getPkCreator(), registerParam.getShopList(), registerParam.getOrderCode(), saOrder.getOrderAmount());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确认订单返回
|
|
||||||
*
|
|
||||||
* @param str 提示信息(null 为成功)
|
|
||||||
* @param pkCreator 订单创建人
|
|
||||||
* @param shopList 购物车ID
|
|
||||||
* @param orderCode 订单编号
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private AjaxResult confirmSharedOrderReturn(String str, Long pkCreator, List<ShoppingCartRedis> shopList, String orderCode, BigDecimal orderAmount) {
|
|
||||||
if (null == str) {
|
|
||||||
// 删除购物车商品数据
|
|
||||||
if (CollectionUtil.isNotEmpty(shopList)) {
|
|
||||||
shoppingCartService.batchDelShopping(pkCreator, ShoppingCartVO.builder()
|
|
||||||
.deleteList(shopList)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
return AjaxResult.success(RetailOrderVO.builder()
|
|
||||||
.orderCode(orderCode)
|
|
||||||
.orderAmount(orderAmount)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
return AjaxResult.error(str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.hzs.retail.sale.controller.service.impl;
|
||||||
import cn.hutool.core.codec.Base64Encoder;
|
import cn.hutool.core.codec.Base64Encoder;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.lang.Validator;
|
import cn.hutool.core.lang.Validator;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
|
|
@ -22,7 +21,6 @@ import com.hzs.common.domain.activity.pick.AcPick;
|
||||||
import com.hzs.common.domain.activity.pick.AcPickMemberLog;
|
import com.hzs.common.domain.activity.pick.AcPickMemberLog;
|
||||||
import com.hzs.common.domain.member.account.CuMemberAccount;
|
import com.hzs.common.domain.member.account.CuMemberAccount;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
|
import com.hzs.common.domain.sale.ext.BdWaresDetailExt;
|
||||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
||||||
|
|
@ -244,13 +242,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ObjectUtil.isNotEmpty(orderParam.getCuMemberShare())){
|
|
||||||
CuMember createMember = orderParam.getCreatorMember();
|
|
||||||
if (null == createMember) {
|
|
||||||
createMember = iMemberServiceApi.getMember(orderParam.getCuMemberShare().getPkParent()).getData();
|
|
||||||
orderParam.setCreatorMember(createMember);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
// 2025.08.04 注册、升级专区,下单支付会员如果是分公司,订单不需要发货,直接放入提货中心
|
// 2025.08.04 注册、升级专区,下单支付会员如果是分公司,订单不需要发货,直接放入提货中心
|
||||||
CuMember createMember = orderParam.getCreatorMember();
|
CuMember createMember = orderParam.getCreatorMember();
|
||||||
if (null == createMember) {
|
if (null == createMember) {
|
||||||
|
|
@ -264,7 +255,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
saOrderExt.setDeliveryWay(EDelivery.PICK.getValue());
|
saOrderExt.setDeliveryWay(EDelivery.PICK.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return saOrderExt;
|
return saOrderExt;
|
||||||
}
|
}
|
||||||
|
|
@ -512,28 +502,16 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
cuMember.setCreationTime(new Date());
|
cuMember.setCreationTime(new Date());
|
||||||
cuMember.setPkCreator(orderParam.getPkCreator());
|
cuMember.setPkCreator(orderParam.getPkCreator());
|
||||||
|
|
||||||
boolean isShared = false;
|
|
||||||
if (null == orderParam.getCreatorMember()) {
|
if (null == orderParam.getCreatorMember()) {
|
||||||
if(ObjectUtil.isNotEmpty(orderParam.getCuMemberShare())){
|
|
||||||
orderParam.setCreatorMember(iMemberServiceApi.getRetailMember(orderParam.getCuMemberShare().getPkParent(), null).getData());
|
|
||||||
cuMember.setPkParent(orderParam.getCuMemberShare().getPkParent());
|
|
||||||
isShared = true;
|
|
||||||
}else{
|
|
||||||
orderParam.setCreatorMember(iMemberServiceApi.getRetailMember(orderParam.getPkCreator(), null).getData());
|
orderParam.setCreatorMember(iMemberServiceApi.getRetailMember(orderParam.getPkCreator(), null).getData());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
cuMember.setPkVertex(orderParam.getCreatorMember().getPkVertex());
|
cuMember.setPkVertex(orderParam.getCreatorMember().getPkVertex());
|
||||||
cuMember.setPkTeamCode(orderParam.getCreatorMember().getPkTeamCode());
|
cuMember.setPkTeamCode(orderParam.getCreatorMember().getPkTeamCode());
|
||||||
// 系统类型使用购买人的
|
// 系统类型使用购买人的
|
||||||
cuMember.setSystemType(orderParam.getCreatorMember().getSystemType());
|
cuMember.setSystemType(orderParam.getCreatorMember().getSystemType());
|
||||||
|
|
||||||
// 获取会员编号、会员主键
|
// 获取会员编号、会员主键
|
||||||
if(isShared){
|
|
||||||
cuMember.setPkId(orderParam.getCuMemberShare().getPkId());
|
|
||||||
cuMember.setMemberCode(orderParam.getCuMemberShare().getMemberCode());
|
|
||||||
}else{
|
|
||||||
cuMember = iMemberServiceApi.createRetailMemberIdAndCode(cuMember).getData();
|
cuMember = iMemberServiceApi.createRetailMemberIdAndCode(cuMember).getData();
|
||||||
}
|
|
||||||
|
|
||||||
return cuMember;
|
return cuMember;
|
||||||
}
|
}
|
||||||
|
|
@ -659,10 +637,6 @@ public class RetailOrderServiceImpl implements IRetailOrderService {
|
||||||
CuMember newMember = this.packageCuMember(registerParam);
|
CuMember newMember = this.packageCuMember(registerParam);
|
||||||
newMember.setPkSettleGrade(registerParam.getPkGrade());
|
newMember.setPkSettleGrade(registerParam.getPkGrade());
|
||||||
newMember.setPkAwards(registerParam.getPkAwards());
|
newMember.setPkAwards(registerParam.getPkAwards());
|
||||||
if(ObjectUtil.isNotEmpty(registerParam.getCuMemberShare())){
|
|
||||||
saOrderExt.setPkReference(registerParam.getCuMemberShare().getPkParent());
|
|
||||||
saOrderExt.setOrderType(EOrderType.RETAIL_REGISTER.getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
saOrderExt.setPkMember(newMember.getPkId());
|
saOrderExt.setPkMember(newMember.getPkId());
|
||||||
saOrderExt.setRegionProvince(registerParam.getRegionProvince());
|
saOrderExt.setRegionProvince(registerParam.getRegionProvince());
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import com.hzs.common.core.constant.CountryConstants;
|
||||||
import com.hzs.common.core.enums.EDelivery;
|
import com.hzs.common.core.enums.EDelivery;
|
||||||
import com.hzs.common.core.enums.ETransportType;
|
import com.hzs.common.core.enums.ETransportType;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.sale.order.param.OrderItemsParam;
|
import com.hzs.sale.order.param.OrderItemsParam;
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
import com.hzs.sale.shopping.vo.ShoppingCartRedis;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
@ -114,9 +113,6 @@ public class RetailOrderParam implements Serializable {
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private CuMember creatorMember;
|
private CuMember creatorMember;
|
||||||
|
|
||||||
// @JsonIgnore
|
|
||||||
private CuMemberShare cuMemberShare;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单编号
|
* 订单编号
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
package com.hzs.retail.sale.param;
|
package com.hzs.retail.sale.param;
|
||||||
|
|
||||||
import com.hzs.sale.order.param.FansConfirmOrderWaresParam;
|
import lombok.Data;
|
||||||
import lombok.*;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售注册订单入参
|
* 新零售注册订单入参
|
||||||
|
|
@ -34,9 +33,4 @@ public class RetailOrderRegisterParam extends RetailOrderParam implements Serial
|
||||||
@Size(max = 20, message = "推荐编号不能超过20位")
|
@Size(max = 20, message = "推荐编号不能超过20位")
|
||||||
private String parentCode;
|
private String parentCode;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品列表
|
|
||||||
*/
|
|
||||||
private List<FansConfirmOrderWaresParam> waresList;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售订单返回VO
|
* 新零售订单返回VO
|
||||||
|
|
@ -49,9 +48,4 @@ public class RetailOrderVO implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String urlAddress;
|
private String urlAddress;
|
||||||
|
|
||||||
/**
|
|
||||||
* 待支付金额
|
|
||||||
*/
|
|
||||||
private BigDecimal orderAmount;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.hzs.retail.wares.controller.api;
|
package com.hzs.retail.wares.controller.api;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
@ -11,13 +10,10 @@ import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.core.enums.EAccount;
|
import com.hzs.common.core.enums.EAccount;
|
||||||
import com.hzs.common.core.enums.ELabelType;
|
import com.hzs.common.core.enums.ELabelType;
|
||||||
import com.hzs.common.core.enums.ESpecialArea;
|
import com.hzs.common.core.enums.ESpecialArea;
|
||||||
import com.hzs.common.core.enums.EWaresType;
|
|
||||||
import com.hzs.common.core.utils.ComputeUtil;
|
import com.hzs.common.core.utils.ComputeUtil;
|
||||||
import com.hzs.common.core.utils.DistinctByKeyUtil;
|
import com.hzs.common.core.utils.DistinctByKeyUtil;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
|
||||||
import com.hzs.common.core.web.controller.BaseController;
|
import com.hzs.common.core.web.controller.BaseController;
|
||||||
import com.hzs.common.core.web.domain.AjaxResult;
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresExt;
|
import com.hzs.common.domain.sale.ext.BdWaresExt;
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
||||||
|
|
@ -29,11 +25,8 @@ import com.hzs.member.base.IMemberServiceApi;
|
||||||
import com.hzs.member.base.dto.ShowWaresDTO;
|
import com.hzs.member.base.dto.ShowWaresDTO;
|
||||||
import com.hzs.retail.wares.param.RetailWaresDetailParam;
|
import com.hzs.retail.wares.param.RetailWaresDetailParam;
|
||||||
import com.hzs.retail.wares.param.RetailWaresParam;
|
import com.hzs.retail.wares.param.RetailWaresParam;
|
||||||
import com.hzs.retail.wares.param.WaresShareParam;
|
|
||||||
import com.hzs.retail.wares.vo.RetailWaresDetailVO;
|
import com.hzs.retail.wares.vo.RetailWaresDetailVO;
|
||||||
import com.hzs.retail.wares.vo.RetailWaresVO;
|
import com.hzs.retail.wares.vo.RetailWaresVO;
|
||||||
import com.hzs.sale.order.service.ISaOrderService;
|
|
||||||
import com.hzs.sale.wares.param.CuWaresParams;
|
|
||||||
import com.hzs.sale.wares.service.IBdWaresLabelService;
|
import com.hzs.sale.wares.service.IBdWaresLabelService;
|
||||||
import com.hzs.sale.wares.service.IBdWaresRangeService;
|
import com.hzs.sale.wares.service.IBdWaresRangeService;
|
||||||
import com.hzs.sale.wares.service.IBdWaresService;
|
import com.hzs.sale.wares.service.IBdWaresService;
|
||||||
|
|
@ -45,7 +38,10 @@ import com.hzs.system.config.dto.AreaCurrencyDTO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -68,8 +64,6 @@ public class ApiRetailWaresController extends BaseController {
|
||||||
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
|
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresRangeService iBdWaresRangeService;
|
private IBdWaresRangeService iBdWaresRangeService;
|
||||||
@Autowired
|
|
||||||
private ISaOrderService iSaOrderService;
|
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ICurrencyServiceApi currencyServiceApi;
|
ICurrencyServiceApi currencyServiceApi;
|
||||||
|
|
@ -383,147 +377,4 @@ public class ApiRetailWaresController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 188分享专区商品列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list-wares-share")
|
|
||||||
public AjaxResult listWaresShare(WaresShareParam param) {
|
|
||||||
param.setSpecialArea(ESpecialArea.REGISTER_AREA.getValue());
|
|
||||||
param.setIsMakerGift(EWaresType.ORDINARY.getValue());
|
|
||||||
param.setPkCountry(CountryConstants.CHINA_COUNTRY);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
List<CuWaresParams> waresParamsList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 查询商品列表
|
|
||||||
List<BdWaresExt> bdWaresExtList = iBdWaresService.listWaresShare(param.getSpecialArea(), param.getIsMakerGift(), param.getPkCountry());
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(bdWaresExtList)) {
|
|
||||||
// 商品主键列表
|
|
||||||
List<Integer> waresIdList = bdWaresExtList.stream().map(BdWares::getPkId).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(param.getShareMemberCode())) {
|
|
||||||
// 分享人ID
|
|
||||||
Long pkMember = Long.parseLong(new String(Base64Decoder.decode(param.getShareMemberCode())));
|
|
||||||
CuMember cuMember = iSaOrderService.getCuMemberByKey(pkMember);
|
|
||||||
// 当前会员编号
|
|
||||||
String memberCode = cuMember.getMemberCode();
|
|
||||||
|
|
||||||
// 检验商品团队信息
|
|
||||||
Map<Integer, List<BdWaresAuthority>> waresAuthorityMap = iBdWaresService.getWaresAuthority(waresIdList);
|
|
||||||
List<ShowWaresDTO> showWaresList = bdWaresExtList.stream().map(we -> getShowWares(we.getPkId(), pkMember, memberCode, waresAuthorityMap)).collect(Collectors.toList());
|
|
||||||
R<Map<Integer, Boolean>> waresShowMapDto = iMemberServiceApi.checkIsShowWares(showWaresList);
|
|
||||||
Map<Integer, Boolean> waresShowMap = waresShowMapDto.getData();
|
|
||||||
|
|
||||||
// 商品标签列表
|
|
||||||
BdWaresLabel waresLabel = new BdWaresLabel();
|
|
||||||
waresLabel.setPkIdList(waresIdList);
|
|
||||||
List<BdLabelExt> list = iBdWaresLabelService.selectByList(waresLabel);
|
|
||||||
// 标签
|
|
||||||
for (BdWaresExt bdWaresExt : bdWaresExtList) {
|
|
||||||
// 保证标签
|
|
||||||
List<BdLabel> ensureLabelList = new ArrayList<>();
|
|
||||||
// 卖点标签
|
|
||||||
List<BdLabel> sellingLabelList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (BdLabelExt bdLabel : list) {
|
|
||||||
if (ELabelType.PREFIX.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 前缀标签
|
|
||||||
bdWaresExt.setPrefixLabelTarget(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.COOL.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 酷炫标签
|
|
||||||
bdWaresExt.setCoolLabelTarget(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.ENSURE.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 保证标签
|
|
||||||
ensureLabelList.add(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.SELLING.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 卖点标签
|
|
||||||
sellingLabelList.add(bdLabel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bdWaresExt.setEnsureLabelList(ensureLabelList.stream().filter(DistinctByKeyUtil.distinctByKey(BdLabel::getPkId)).collect(Collectors.toList()));
|
|
||||||
bdWaresExt.setSellingLabelList(sellingLabelList.stream().filter(DistinctByKeyUtil.distinctByKey(BdLabel::getPkId)).collect(Collectors.toList()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询商品sku 最小值 和数量
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSkuArray = iBdWaresSpecsSkuService.selectByMinWaresSpecsSkuByPkWaresList(waresIdList);
|
|
||||||
Map<Integer, List<BdWaresSpecsSkuExt>> waresSpecsSkuMap = waresSpecsSkuArray.stream().collect(Collectors.groupingBy(BdWaresSpecsSkuExt::getPkWares));
|
|
||||||
|
|
||||||
// 查询默认规格
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSkuList = iBdWaresSpecsSkuService.selectByWaresSpecsSku(waresIdList);
|
|
||||||
|
|
||||||
for (BdWaresExt waresExt : bdWaresExtList) {
|
|
||||||
// 校验团队信息
|
|
||||||
Boolean isShowWares = waresShowMap.get(waresExt.getPkId());
|
|
||||||
if (null == isShowWares || !isShowWares) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CuWaresParams waresParams = BeanUtil.copyProperties(waresExt, CuWaresParams.class);
|
|
||||||
// 价格
|
|
||||||
BigDecimal waresPrice = BigDecimal.ZERO;
|
|
||||||
// 业绩
|
|
||||||
BigDecimal waresAchieve = BigDecimal.ZERO;
|
|
||||||
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSku = waresSpecsSkuMap.get(waresExt.getPkId());
|
|
||||||
waresSpecsSku = waresSpecsSku.stream().peek(a -> a.setProductGift(a.getPkProduct() + "" + a.getIsGift())).collect(Collectors.toList());
|
|
||||||
Map<String, List<BdWaresSpecsSkuExt>> col = waresSpecsSku.stream().collect(Collectors.groupingBy(BdWaresSpecsSkuExt::getProductGift));
|
|
||||||
for (Map.Entry<String, List<BdWaresSpecsSkuExt>> integerListEntry : col.entrySet()) {
|
|
||||||
// 取得每一个商品价格最小值
|
|
||||||
Optional<BdWaresSpecsSkuExt> minBdWaresSpecsSkuExt = integerListEntry.getValue().stream().filter(Objects::nonNull).min(Comparator.comparing(BdWaresSpecsSkuExt::getPrice));
|
|
||||||
BdWaresSpecsSkuExt bdWaresSpecsSkuExt = minBdWaresSpecsSkuExt.get();
|
|
||||||
waresPrice = waresPrice.add(bdWaresSpecsSkuExt.getPrice().multiply(new BigDecimal(bdWaresSpecsSkuExt.getQuantity())));
|
|
||||||
waresAchieve = waresAchieve.add(bdWaresSpecsSkuExt.getAchieve().multiply(new BigDecimal(bdWaresSpecsSkuExt.getQuantity())));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 计算商品列表价格和业绩最小值
|
|
||||||
waresParams.setWaresPrice(waresPrice);
|
|
||||||
waresParams.setWaresAchieve(waresAchieve);
|
|
||||||
// 商品业绩计算汇率
|
|
||||||
if (waresParams.getWaresAchieve() != null) {
|
|
||||||
waresParams.setWaresAchieve(waresParams.getWaresAchieve());
|
|
||||||
waresParams.setWaresPrice(waresParams.getWaresPrice());
|
|
||||||
} else {
|
|
||||||
waresParams.setWaresAchieve(BigDecimal.ZERO);
|
|
||||||
waresParams.setWaresPrice(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询默认规格
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
|
||||||
List<BdWaresSpecsSkuExt> collect = waresSpecsSkuList.stream().filter(DistinctByKeyUtil.distinctByKey(BdWaresSpecsSku::getPkWaresDetail)).collect(Collectors.toList());
|
|
||||||
for (BdWaresSpecsSkuExt bdWaresSpecsSku : collect) {
|
|
||||||
if (bdWaresSpecsSku.getPkWares().equals(waresExt.getPkId())) {
|
|
||||||
JSONObject js = new JSONObject();
|
|
||||||
js.put("pkProduct", bdWaresSpecsSku.getPkProduct());
|
|
||||||
js.put("pkSkuId", bdWaresSpecsSku.getPkId());
|
|
||||||
js.put("quantity", bdWaresSpecsSku.getQuantity());
|
|
||||||
jsonArray.add(js);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
waresParams.setProductGroup(jsonArray);
|
|
||||||
waresParamsList.add(waresParams);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AjaxResult.success(waresParamsList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询团队配置是否展示该商品
|
|
||||||
*
|
|
||||||
* @param pkWares
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public ShowWaresDTO getShowWares(Integer pkWares, Long loginMember, String loginMemberCode, Map<Integer, List<BdWaresAuthority>> waresAuthorityMap) {
|
|
||||||
ShowWaresDTO showWaresDTO = new ShowWaresDTO();
|
|
||||||
showWaresDTO.setPkWares(pkWares);
|
|
||||||
showWaresDTO.setLoginMember(loginMember);
|
|
||||||
showWaresDTO.setLoginMemberCode(loginMemberCode);
|
|
||||||
showWaresDTO.setWaresAuthorityList(waresAuthorityMap.get(pkWares));
|
|
||||||
return showWaresDTO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
package com.hzs.retail.wares.param;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分享商品查询条件
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class WaresShareParam {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分享会员编号
|
|
||||||
*/
|
|
||||||
private String shareMemberCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 所属专区
|
|
||||||
*/
|
|
||||||
private Integer specialArea;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品类型
|
|
||||||
*/
|
|
||||||
private Integer isMakerGift;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 国家
|
|
||||||
*/
|
|
||||||
private Integer pkCountry;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -2,50 +2,25 @@ package com.hzs.sale.order.controller.api;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.hzs.common.core.annotation.RepeatSubmit;
|
import com.hzs.common.core.annotation.RepeatSubmit;
|
||||||
import com.hzs.common.core.constant.CacheConstants;
|
|
||||||
import com.hzs.common.core.constant.HttpStatus;
|
import com.hzs.common.core.constant.HttpStatus;
|
||||||
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
import com.hzs.common.core.constant.msg.MemberMsgConstants;
|
||||||
import com.hzs.common.core.constant.msg.SaOrderMsgConstants;
|
import com.hzs.common.core.constant.msg.SaOrderMsgConstants;
|
||||||
import com.hzs.common.core.enums.*;
|
|
||||||
import com.hzs.common.core.utils.CommonUtil;
|
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
|
||||||
import com.hzs.common.core.web.domain.AjaxResult;
|
import com.hzs.common.core.web.domain.AjaxResult;
|
||||||
import com.hzs.common.domain.member.base.CuMember;
|
import com.hzs.common.domain.member.base.CuMember;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt;
|
|
||||||
import com.hzs.common.domain.sale.ext.SaOrderExt;
|
|
||||||
import com.hzs.common.domain.sale.order.SaOrderShareTmp;
|
|
||||||
import com.hzs.common.domain.sale.wares.BdWares;
|
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.common.util.TransactionUtils;
|
import com.hzs.common.util.TransactionUtils;
|
||||||
import com.hzs.member.base.IMemberServiceApi;
|
import com.hzs.member.base.IMemberServiceApi;
|
||||||
import com.hzs.retail.sale.param.RetailOrderParam;
|
|
||||||
import com.hzs.retail.sale.param.RetailOrderRegisterParam;
|
|
||||||
import com.hzs.sale.order.controller.ParentOrderController;
|
import com.hzs.sale.order.controller.ParentOrderController;
|
||||||
import com.hzs.sale.order.param.*;
|
import com.hzs.sale.order.param.*;
|
||||||
import com.hzs.sale.order.service.ISaOrderService;
|
|
||||||
import com.hzs.sale.order.service.ISaOrderShareTmpService;
|
|
||||||
import com.hzs.sale.order.vo.FansConfirmOrderVO;
|
|
||||||
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
import com.hzs.sale.shopping.vo.ShoppingCartVO;
|
||||||
import com.hzs.sale.wares.service.IBdWaresService;
|
|
||||||
import com.hzs.sale.wares.service.IBdWaresSpecsSkuService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 嗨粉订单
|
* 嗨粉订单
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,15 +29,6 @@ import java.util.stream.Collectors;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ApiFanSaOrderController extends ParentOrderController {
|
public class ApiFanSaOrderController extends ParentOrderController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IBdWaresService iBdWaresService;
|
|
||||||
@Autowired
|
|
||||||
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
|
|
||||||
@Autowired
|
|
||||||
private ISaOrderShareTmpService iSaOrderShareTmpService;
|
|
||||||
@Autowired
|
|
||||||
private ISaOrderService iSaOrderService;
|
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi iMemberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
|
|
||||||
|
|
@ -129,154 +95,4 @@ public class ApiFanSaOrderController extends ParentOrderController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 海粉确认订单
|
|
||||||
// *
|
|
||||||
// * @param param 确认订单入参
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @PostMapping("/fans-confirm-order")
|
|
||||||
// public AjaxResult fansConfirmOrder(@RequestBody FansConfirmOrderParam param) {
|
|
||||||
// // 校验参数
|
|
||||||
// if (StringUtils.isAnyEmpty(param.getMemberName(), param.getPhone(), param.getRecName(), param.getRecPhone(), param.getRecAddress())
|
|
||||||
// || null == param.getPkCountry() || null == param.getRecProvince() || null == param.getRecCity()
|
|
||||||
// || CollectionUtil.isEmpty(param.getWaresList())
|
|
||||||
// ) {
|
|
||||||
// // 缺少参数
|
|
||||||
// return AjaxResult.error("缺少参数");
|
|
||||||
// }
|
|
||||||
// // 校验商品数据
|
|
||||||
// for (FansConfirmOrderWaresParam waresParam : param.getWaresList()) {
|
|
||||||
// if (null == waresParam.getPkWares() || null == waresParam.getQuantity()
|
|
||||||
// || CollectionUtil.isEmpty(waresParam.getSkuList())) {
|
|
||||||
// // 缺少参数
|
|
||||||
// return AjaxResult.error("缺少参数");
|
|
||||||
// }
|
|
||||||
// // 校验产品数据
|
|
||||||
// for (FansConfirmOrderSkuParam skuParam : waresParam.getSkuList()) {
|
|
||||||
// if (null == skuParam.getPkWaresSku() || null == skuParam.getQuantity()) {
|
|
||||||
// // 缺少参数
|
|
||||||
// return AjaxResult.error("缺少参数");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 会员ID
|
|
||||||
// Long userId = SecurityUtils.getUserId();
|
|
||||||
// // 所属国家
|
|
||||||
// Integer pkCountry = SecurityUtils.getPkCountry();
|
|
||||||
//
|
|
||||||
// // 查询临时会员
|
|
||||||
// CuMemberShare cuMemberShare = iMemberServiceApi.queryCuMemberShare(userId).getData();
|
|
||||||
// if (null == cuMemberShare) {
|
|
||||||
// // 会员不存在
|
|
||||||
// return AjaxResult.error("推荐人不存在");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 封装缓存数据
|
|
||||||
// RetailOrderRegisterParam orderParam = RetailOrderRegisterParam.builder()
|
|
||||||
// .memberName(param.getMemberName())
|
|
||||||
// .phone(param.getPhone())
|
|
||||||
// .build();
|
|
||||||
//
|
|
||||||
// // 手机号注册次数校验
|
|
||||||
// AjaxResult ajaxResult = super.validatePhone(orderParam);
|
|
||||||
// if (!ajaxResult.isSuccess()) {
|
|
||||||
// return ajaxResult;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 订单金额
|
|
||||||
// BigDecimal orderAmount = BigDecimal.ZERO;
|
|
||||||
//
|
|
||||||
// // 生成订单编号
|
|
||||||
// String orderCode = CommonUtil.createSerialNumber(EOrderPrefix.ORDER_CODE);
|
|
||||||
//
|
|
||||||
// // 缓存数据
|
|
||||||
// List<OrderItemsParam> orderItemsParams = new ArrayList<>();
|
|
||||||
// // 遍历商品,封装订单明细
|
|
||||||
// for (FansConfirmOrderWaresParam waresParam : param.getWaresList()) {
|
|
||||||
// // 遍历sku
|
|
||||||
// // 产品价格等map
|
|
||||||
// Map<Long, BdWaresSpecsSkuExt> skuMap = iBdWaresSpecsSkuService.queryWaresSpecsSkuList(waresParam.getSkuList().stream().map(FansConfirmOrderSkuParam::getPkWaresSku).collect(Collectors.toList()));
|
|
||||||
//
|
|
||||||
// // 查询商品
|
|
||||||
// BdWares bdWares = iBdWaresService.getWares(waresParam.getPkWares());
|
|
||||||
//
|
|
||||||
// // 缓存数据
|
|
||||||
// List<WaresItemsParam> itemsParamList = new ArrayList<>(waresParam.getSkuList().size());
|
|
||||||
// // 遍历产品信息
|
|
||||||
// for (FansConfirmOrderSkuParam skuParam : waresParam.getSkuList()) {
|
|
||||||
// BdWaresSpecsSkuExt specsSku = skuMap.get(skuParam.getPkWaresSku());
|
|
||||||
// orderAmount = orderAmount.add(specsSku.getPrice().multiply(new BigDecimal(skuParam.getQuantity() * waresParam.getQuantity())));
|
|
||||||
//
|
|
||||||
// itemsParamList.add(WaresItemsParam.builder()
|
|
||||||
// .pkWaresSpecsSku(skuParam.getPkWaresSku().intValue())
|
|
||||||
// .quantity(skuParam.getQuantity())
|
|
||||||
// .build());
|
|
||||||
// }
|
|
||||||
// orderItemsParams.add(OrderItemsParam.builder()
|
|
||||||
// .waresCode(bdWares.getWaresCode())
|
|
||||||
// .quantity(waresParam.getQuantity())
|
|
||||||
// .waresItemsParamList(itemsParamList)
|
|
||||||
// .build());
|
|
||||||
// }
|
|
||||||
// // 封装订单数据
|
|
||||||
// SaOrderExt saOrder = new SaOrderExt();
|
|
||||||
// saOrder.setOrderCode(orderCode);
|
|
||||||
// // 188注册订单实际按复购订单来算
|
|
||||||
// saOrder.setOrderType(EOrderType.REPURCHASE_ORDER.getValue());
|
|
||||||
// saOrder.setOrderTypeExtend(EOrderTypeExtend.REG_REP.getValue());
|
|
||||||
// saOrder.setOrderAmount(orderAmount);
|
|
||||||
// saOrder.setPostage(BigDecimal.ZERO);
|
|
||||||
// saOrder.setRecName(param.getRecName());
|
|
||||||
// saOrder.setRecPhone(param.getRecPhone());
|
|
||||||
// saOrder.setRecProvince(param.getRecProvince());
|
|
||||||
// saOrder.setRecCity(param.getRecCity());
|
|
||||||
// saOrder.setRecCounty(param.getRecCounty());
|
|
||||||
// saOrder.setRecAddress(param.getRecAddress());
|
|
||||||
// saOrder.setRemark(param.getRemark());
|
|
||||||
// saOrder.setPkMember(cuMemberShare.getPkId());
|
|
||||||
// saOrder.setPkReference(cuMemberShare.getPkParent());
|
|
||||||
// saOrder.setDeliveryWay(EDelivery.FAST_MAIL.getValue());
|
|
||||||
// saOrder.setTranType(ETransportType.LAND.getValue());
|
|
||||||
// saOrder.setPkCreator(cuMemberShare.getPkId());
|
|
||||||
// saOrder.setPkCountry(pkCountry);
|
|
||||||
//
|
|
||||||
// orderParam.setOrderCode(orderCode);
|
|
||||||
// orderParam.setSpecialArea(saOrder.getOrderType());
|
|
||||||
// orderParam.setPostage(saOrder.getPostage());
|
|
||||||
// orderParam.setDeliveryWay(saOrder.getDeliveryWay());
|
|
||||||
// orderParam.setTransType(saOrder.getTranType());
|
|
||||||
// orderParam.setRecName(saOrder.getRecName());
|
|
||||||
// orderParam.setRecPhone(saOrder.getRecPhone());
|
|
||||||
// orderParam.setRecProvince(saOrder.getRecProvince());
|
|
||||||
// orderParam.setRecCity(saOrder.getRecCity());
|
|
||||||
// orderParam.setRecCounty(saOrder.getRecCounty());
|
|
||||||
// orderParam.setRecAddress(saOrder.getRecAddress());
|
|
||||||
// orderParam.setOrderItemsParams(orderItemsParams);
|
|
||||||
//
|
|
||||||
// HashMap<String, Object> orderInfo = new HashMap<>();
|
|
||||||
// orderInfo.put("param", param);
|
|
||||||
// orderInfo.put("saOrder", saOrder);
|
|
||||||
// orderInfo.put("orderParam", orderParam);
|
|
||||||
// // 分享会员订单数据
|
|
||||||
// if (iSaOrderShareTmpService.save(SaOrderShareTmp.builder()
|
|
||||||
// .pkId(cuMemberShare.getPkId())
|
|
||||||
// .orderInfo(JSONUtil.toJsonStr(orderInfo))
|
|
||||||
// .build())) {
|
|
||||||
//
|
|
||||||
// // 临时订单直接放入缓存(24小时有效)
|
|
||||||
// redisService.setCacheObject(CacheConstants.RETAIL_TEMP_ORDER + userId + orderCode, saOrder, 24L, TimeUnit.HOURS);
|
|
||||||
// // 临时会员直接放入缓存(24小时有效)
|
|
||||||
// redisService.setCacheObject(CacheConstants.RETAIL_TEMP_REG_PARAM + userId + orderCode, orderParam, 24L, TimeUnit.HOURS);
|
|
||||||
//
|
|
||||||
// return AjaxResult.success(FansConfirmOrderVO.builder()
|
|
||||||
// .orderCode(orderCode)
|
|
||||||
// .orderAmount(saOrder.getOrderAmount().add(saOrder.getPostage()))
|
|
||||||
// .payTime(iSaOrderService.getIsToBePayTime(pkCountry, saOrder.getOrderType()))
|
|
||||||
// .build());
|
|
||||||
// }
|
|
||||||
// return AjaxResult.error();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@ import lombok.Data;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海粉确认订单入参
|
* @Description: 海粉确认订单入参
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2023/9/7 16:56
|
||||||
|
* @Classname: FansConfirmOrder
|
||||||
|
* @PackageName: com.hzs.sale.order.param
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class FansConfirmOrderParam {
|
public class FansConfirmOrderParam {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,11 @@ package com.hzs.sale.order.param;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海粉确认订单产品入参
|
* @Description: 海粉确认订单产品入参
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2023/9/7 19:37
|
||||||
|
* @Classname: FansConfirmOrderSkuParam
|
||||||
|
* @PackageName: com.hzs.sale.order.param
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class FansConfirmOrderSkuParam {
|
public class FansConfirmOrderSkuParam {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@ import lombok.Data;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海粉确认订单商品入参
|
* @Description: 海粉确认订单商品入参
|
||||||
|
* @Author: jiang chao
|
||||||
|
* @Time: 2023/9/7 17:32
|
||||||
|
* @Classname: FansConfirmOrderProductParam
|
||||||
|
* @PackageName: com.hzs.sale.order.param
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class FansConfirmOrderWaresParam {
|
public class FansConfirmOrderWaresParam {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.hzs.sale.wares.controller.api;
|
package com.hzs.sale.wares.controller.api;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.codec.Base64Decoder;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
@ -28,7 +27,6 @@ import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.common.util.TransactionUtils;
|
import com.hzs.common.util.TransactionUtils;
|
||||||
import com.hzs.member.base.IMemberServiceApi;
|
import com.hzs.member.base.IMemberServiceApi;
|
||||||
import com.hzs.member.base.dto.ShowWaresDTO;
|
import com.hzs.member.base.dto.ShowWaresDTO;
|
||||||
import com.hzs.retail.wares.param.WaresShareParam;
|
|
||||||
import com.hzs.sale.order.service.ISaOrderService;
|
import com.hzs.sale.order.service.ISaOrderService;
|
||||||
import com.hzs.sale.shopping.service.IShoppingCartService;
|
import com.hzs.sale.shopping.service.IShoppingCartService;
|
||||||
import com.hzs.sale.shopping.vo.WaresItemWaresInfo;
|
import com.hzs.sale.shopping.vo.WaresItemWaresInfo;
|
||||||
|
|
@ -719,132 +717,4 @@ public class ApiBdWaresController extends BaseController {
|
||||||
return AjaxResult.success(waresInfoVo);
|
return AjaxResult.success(waresInfoVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 188分享专区商品列表
|
|
||||||
*/
|
|
||||||
@GetMapping("/list-wares-share")
|
|
||||||
public AjaxResult listWaresShare(WaresShareParam param) {
|
|
||||||
param.setSpecialArea(ESpecialArea.RETAIL_REGISTER.getValue());
|
|
||||||
param.setIsMakerGift(EWaresType.ORDINARY.getValue());
|
|
||||||
param.setPkCountry(CountryConstants.CHINA_COUNTRY);
|
|
||||||
|
|
||||||
// 返回数据
|
|
||||||
List<CuWaresParams> waresParamsList = new ArrayList<>();
|
|
||||||
|
|
||||||
// 查询商品列表
|
|
||||||
List<BdWaresExt> bdWaresExtList = bdWaresService.listWaresShare(param.getSpecialArea(), param.getIsMakerGift(), param.getPkCountry());
|
|
||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(bdWaresExtList)) {
|
|
||||||
// 商品主键列表
|
|
||||||
List<Integer> waresIdList = bdWaresExtList.stream().map(BdWares::getPkId).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(param.getShareMemberCode())) {
|
|
||||||
// 分享人ID
|
|
||||||
Long pkMember = Long.parseLong(new String(Base64Decoder.decode(param.getShareMemberCode())));
|
|
||||||
CuMember cuMember = saOrderService.getCuMemberByKey(pkMember);
|
|
||||||
// 当前会员编号
|
|
||||||
String memberCode = cuMember.getMemberCode();
|
|
||||||
|
|
||||||
// 检验商品团队信息
|
|
||||||
Map<Integer, List<BdWaresAuthority>> waresAuthorityMap = bdWaresService.getWaresAuthority(waresIdList);
|
|
||||||
List<ShowWaresDTO> showWaresList = bdWaresExtList.stream().map(we -> getShowWares(we.getPkId(), pkMember, memberCode, waresAuthorityMap)).collect(Collectors.toList());
|
|
||||||
R<Map<Integer, Boolean>> waresShowMapDto = memberServiceApi.checkIsShowWares(showWaresList);
|
|
||||||
Map<Integer, Boolean> waresShowMap = waresShowMapDto.getData();
|
|
||||||
|
|
||||||
// 商品标签列表
|
|
||||||
BdWaresLabel waresLabel = new BdWaresLabel();
|
|
||||||
waresLabel.setPkIdList(waresIdList);
|
|
||||||
List<BdLabelExt> list = waresLabelService.selectByList(waresLabel);
|
|
||||||
// 标签
|
|
||||||
for (BdWaresExt bdWaresExt : bdWaresExtList) {
|
|
||||||
// 保证标签
|
|
||||||
List<BdLabel> ensureLabelList = new ArrayList<>();
|
|
||||||
// 卖点标签
|
|
||||||
List<BdLabel> sellingLabelList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (BdLabelExt bdLabel : list) {
|
|
||||||
if (ELabelType.PREFIX.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 前缀标签
|
|
||||||
bdWaresExt.setPrefixLabelTarget(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.COOL.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 酷炫标签
|
|
||||||
bdWaresExt.setCoolLabelTarget(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.ENSURE.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 保证标签
|
|
||||||
ensureLabelList.add(bdLabel);
|
|
||||||
}
|
|
||||||
if (ELabelType.SELLING.getValue() == bdLabel.getLabelType() && bdLabel.getPkWares().equals(bdWaresExt.getPkId())) {
|
|
||||||
// 卖点标签
|
|
||||||
sellingLabelList.add(bdLabel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bdWaresExt.setEnsureLabelList(ensureLabelList.stream().filter(DistinctByKeyUtil.distinctByKey(BdLabel::getPkId)).collect(Collectors.toList()));
|
|
||||||
bdWaresExt.setSellingLabelList(sellingLabelList.stream().filter(DistinctByKeyUtil.distinctByKey(BdLabel::getPkId)).collect(Collectors.toList()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询商品sku 最小值 和数量
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSkuArray = bdWaresSpecsSkuService.selectByMinWaresSpecsSkuByPkWaresList(waresIdList);
|
|
||||||
Map<Integer, List<BdWaresSpecsSkuExt>> waresSpecsSkuMap = waresSpecsSkuArray.stream().collect(Collectors.groupingBy(BdWaresSpecsSkuExt::getPkWares));
|
|
||||||
|
|
||||||
// 查询默认规格
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSkuList = bdWaresSpecsSkuService.selectByWaresSpecsSku(waresIdList);
|
|
||||||
|
|
||||||
for (BdWaresExt waresExt : bdWaresExtList) {
|
|
||||||
// 校验团队信息
|
|
||||||
Boolean isShowWares = waresShowMap.get(waresExt.getPkId());
|
|
||||||
if (null == isShowWares || !isShowWares) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CuWaresParams waresParams = BeanUtil.copyProperties(waresExt, CuWaresParams.class);
|
|
||||||
// 价格
|
|
||||||
BigDecimal waresPrice = BigDecimal.ZERO;
|
|
||||||
// 业绩
|
|
||||||
BigDecimal waresAchieve = BigDecimal.ZERO;
|
|
||||||
|
|
||||||
List<BdWaresSpecsSkuExt> waresSpecsSku = waresSpecsSkuMap.get(waresExt.getPkId());
|
|
||||||
waresSpecsSku = waresSpecsSku.stream().peek(a -> a.setProductGift(a.getPkProduct() + "" + a.getIsGift())).collect(Collectors.toList());
|
|
||||||
Map<String, List<BdWaresSpecsSkuExt>> col = waresSpecsSku.stream().collect(Collectors.groupingBy(BdWaresSpecsSkuExt::getProductGift));
|
|
||||||
for (Map.Entry<String, List<BdWaresSpecsSkuExt>> integerListEntry : col.entrySet()) {
|
|
||||||
// 取得每一个商品价格最小值
|
|
||||||
Optional<BdWaresSpecsSkuExt> minBdWaresSpecsSkuExt = integerListEntry.getValue().stream().filter(Objects::nonNull).min(Comparator.comparing(BdWaresSpecsSkuExt::getPrice));
|
|
||||||
BdWaresSpecsSkuExt bdWaresSpecsSkuExt = minBdWaresSpecsSkuExt.get();
|
|
||||||
waresPrice = waresPrice.add(bdWaresSpecsSkuExt.getPrice().multiply(new BigDecimal(bdWaresSpecsSkuExt.getQuantity())));
|
|
||||||
waresAchieve = waresAchieve.add(bdWaresSpecsSkuExt.getAchieve().multiply(new BigDecimal(bdWaresSpecsSkuExt.getQuantity())));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 计算商品列表价格和业绩最小值
|
|
||||||
waresParams.setWaresPrice(waresPrice);
|
|
||||||
waresParams.setWaresAchieve(waresAchieve);
|
|
||||||
// 商品业绩计算汇率
|
|
||||||
if (waresParams.getWaresAchieve() != null) {
|
|
||||||
waresParams.setWaresAchieve(waresParams.getWaresAchieve());
|
|
||||||
waresParams.setWaresPrice(waresParams.getWaresPrice());
|
|
||||||
} else {
|
|
||||||
waresParams.setWaresAchieve(BigDecimal.ZERO);
|
|
||||||
waresParams.setWaresPrice(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询默认规格
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
|
||||||
List<BdWaresSpecsSkuExt> collect = waresSpecsSkuList.stream().filter(DistinctByKeyUtil.distinctByKey(BdWaresSpecsSku::getPkWaresDetail)).collect(Collectors.toList());
|
|
||||||
for (BdWaresSpecsSkuExt bdWaresSpecsSku : collect) {
|
|
||||||
if (bdWaresSpecsSku.getPkWares().equals(waresExt.getPkId())) {
|
|
||||||
JSONObject js = new JSONObject();
|
|
||||||
js.put("pkProduct", bdWaresSpecsSku.getPkProduct());
|
|
||||||
js.put("pkSkuId", bdWaresSpecsSku.getPkId());
|
|
||||||
js.put("quantity", bdWaresSpecsSku.getQuantity());
|
|
||||||
jsonArray.add(js);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
waresParams.setProductGroup(jsonArray);
|
|
||||||
waresParamsList.add(waresParams);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AjaxResult.success(waresParamsList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface BdWaresMapper extends BaseMapper<BdWares> {
|
public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据条件查询商品信息
|
|
||||||
*
|
|
||||||
* @param specialArea 专区
|
|
||||||
* @param specialArea 专区
|
|
||||||
* @param pkCountry 所属国家
|
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
*/
|
|
||||||
List<BdWaresExt> listWaresShare(@Param("specialArea") Integer specialArea,
|
|
||||||
@Param("isMakerGift") Integer isMakerGift,
|
|
||||||
@Param("pkCountry") Integer pkCountry);
|
|
||||||
/**
|
/**
|
||||||
* 根据条件查询商品信息
|
* 根据条件查询商品信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -109,12 +109,4 @@ public interface BdWaresSpecsSkuMapper extends BaseMapper<BdWaresSpecsSku> {
|
||||||
*/
|
*/
|
||||||
List<BdWaresSpecsSkuExt> selectByMinWaresSpecsSkuByPkWaresList(@Param("pkWaresIds") List<Integer> pkWaresIds);
|
List<BdWaresSpecsSkuExt> selectByMinWaresSpecsSkuByPkWaresList(@Param("pkWaresIds") List<Integer> pkWaresIds);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询SKU价格等信息
|
|
||||||
*
|
|
||||||
* @param skuIdList skuID列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<BdWaresSpecsSkuExt> queryWaresSpecsSkuList(@Param("skuIdList") List<Long> skuIdList);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,6 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface IBdWaresService extends IService<BdWares> {
|
public interface IBdWaresService extends IService<BdWares> {
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据条件查询商品信息
|
|
||||||
*
|
|
||||||
* @param specialArea 专区
|
|
||||||
* @param specialArea 专区
|
|
||||||
* @param pkCountry 所属国家
|
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
*/
|
|
||||||
List<BdWaresExt> listWaresShare(Integer specialArea, Integer isMakerGift, Integer pkCountry);
|
|
||||||
/**
|
/**
|
||||||
* 获取最大排序值
|
* 获取最大排序值
|
||||||
* @return
|
* @return
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import com.hzs.sale.wares.param.CuWaresParams;
|
||||||
import com.hzs.sale.wares.param.SpecsSkuParam;
|
import com.hzs.sale.wares.param.SpecsSkuParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格sku表 服务类
|
* 规格sku表 服务类
|
||||||
|
|
@ -108,12 +107,4 @@ public interface IBdWaresSpecsSkuService extends IService<BdWaresSpecsSku> {
|
||||||
*/
|
*/
|
||||||
RetailWaresDetailVO queryWaresDetail(RetailWaresDetailParam param, Integer pkGrade);
|
RetailWaresDetailVO queryWaresDetail(RetailWaresDetailParam param, Integer pkGrade);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询SKU价格等信息
|
|
||||||
*
|
|
||||||
* @param skuIdList skuID列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Map<Long, BdWaresSpecsSkuExt> queryWaresSpecsSkuList(List<Long> skuIdList);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1173,9 +1173,4 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
return baseMapper.listWaresNoSale(param);
|
return baseMapper.listWaresNoSale(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BdWaresExt> listWaresShare(Integer specialArea, Integer isMakerGift, Integer pkCountry) {
|
|
||||||
return baseMapper.listWaresShare(specialArea, isMakerGift, pkCountry);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -577,15 +577,4 @@ public class BdWaresSpecsSkuServiceImpl extends ServiceImpl<BdWaresSpecsSkuMappe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<Long, BdWaresSpecsSkuExt> queryWaresSpecsSkuList(List<Long> skuIdList) {
|
|
||||||
Map<Long, BdWaresSpecsSkuExt> resultMap = new HashMap<>();
|
|
||||||
|
|
||||||
List<BdWaresSpecsSkuExt> list = baseMapper.queryWaresSpecsSkuList(skuIdList);
|
|
||||||
for (BdWaresSpecsSkuExt waresSpecsSku : list) {
|
|
||||||
resultMap.put(waresSpecsSku.getPkId().longValue(), waresSpecsSku);
|
|
||||||
}
|
|
||||||
return resultMap;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -489,34 +489,4 @@
|
||||||
order by bw.wares_name
|
order by bw.wares_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 分享商品列表 -->
|
|
||||||
<select id="listWaresShare" resultMap="BaseResultMap">
|
|
||||||
select bw.PK_COUNTRY, bw.PK_ID, be.pk_id PK_WARES_EXTEND,
|
|
||||||
be.IS_MAKER_GIFT, bw.WARES_CODE, bw.WARES_NAME,
|
|
||||||
PK_AREA_CLASSIFY, COVER, COVER1, COVER2,
|
|
||||||
bw.WARES_PRICE, bw.WARES_ACHIEVE,
|
|
||||||
SORT, SPECIAL_AREA,
|
|
||||||
IS_PUT_ON, PRE_SALE_STATUS,
|
|
||||||
PREFIX_LABEL, COOL_LABEL, S_LABEL,
|
|
||||||
SALES, IS_SALE, ARRIVAL_TIME, WARN_MESSAGE,
|
|
||||||
be.PK_SPECIAL_CURRENCY
|
|
||||||
from bd_wares bw
|
|
||||||
inner join bd_wares_extend be
|
|
||||||
on bw.pk_id = be.pk_wares
|
|
||||||
where bw.del_flag = 0
|
|
||||||
and be.del_flag = 0
|
|
||||||
and be.is_put_on = 0
|
|
||||||
<!-- 商品必须通过审核后才能显示 -->
|
|
||||||
and bw.wares_status = 5
|
|
||||||
<if test="specialArea != null">
|
|
||||||
and bw.special_area = #{specialArea}
|
|
||||||
</if>
|
|
||||||
<if test="isMakerGift != null">
|
|
||||||
and be.is_maker_gift = #{isMakerGift}
|
|
||||||
</if>
|
|
||||||
<if test="pkCountry != null">
|
|
||||||
and bw.pk_country = #{pkCountry}
|
|
||||||
</if>
|
|
||||||
order by bw.SORT_STATUS desc , bw.sort desc, bw.WARES_PRICE ,bw.CREATION_TIME desc
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -357,23 +357,4 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询SKU价格等信息 -->
|
|
||||||
<select id="queryWaresSpecsSkuList" resultType="com.hzs.common.domain.sale.ext.BdWaresSpecsSkuExt">
|
|
||||||
select bwss.pk_id,
|
|
||||||
bwd.pk_product,
|
|
||||||
bwss.pk_wares_detail,
|
|
||||||
bwss.price,
|
|
||||||
bwss.achieve,
|
|
||||||
bwss.ass_achieve
|
|
||||||
from bd_wares_specs_sku bwss
|
|
||||||
left join BD_WARES_DETAIL bwd
|
|
||||||
on bwd.del_flag = 0
|
|
||||||
and bwd.pk_id = bwss.pk_wares_detail
|
|
||||||
where bwss.del_flag = 0
|
|
||||||
and bwss.pk_id in
|
|
||||||
<foreach collection="skuIdList" item="item" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,18 @@ public class BdConfig {
|
||||||
* PC地址
|
* PC地址
|
||||||
*/
|
*/
|
||||||
private static String pc;
|
private static String pc;
|
||||||
/**
|
// /**
|
||||||
* 公众号地址
|
// * 公众号地址
|
||||||
*/
|
// */
|
||||||
private static String gzh;
|
// private static String gzh;
|
||||||
/**
|
// /**
|
||||||
* IOS地址
|
// * IOS地址
|
||||||
*/
|
// */
|
||||||
private static String ios;
|
// private static String ios;
|
||||||
/**
|
// /**
|
||||||
* android地址
|
// * android地址
|
||||||
*/
|
// */
|
||||||
private static String android;
|
// private static String android;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品同步是否开启(0=开启,1=不开启)
|
* 商品同步是否开启(0=开启,1=不开启)
|
||||||
|
|
@ -70,30 +70,29 @@ public class BdConfig {
|
||||||
BdConfig.pc = pc;
|
BdConfig.pc = pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static String getGzh() {
|
||||||
public static String getGzh() {
|
// return gzh;
|
||||||
return gzh;
|
// }
|
||||||
}
|
//
|
||||||
|
// public void setGzh(String gzh) {
|
||||||
public void setGzh(String gzh) {
|
// HzsConfig.gzh = gzh;
|
||||||
BdConfig.gzh = gzh;
|
// }
|
||||||
}
|
//
|
||||||
|
// public static String getIos() {
|
||||||
public static String getIos() {
|
// return ios;
|
||||||
return ios;
|
// }
|
||||||
}
|
//
|
||||||
|
// public void setIos(String ios) {
|
||||||
public void setIos(String ios) {
|
// HzsConfig.ios = ios;
|
||||||
BdConfig.ios = ios;
|
// }
|
||||||
}
|
//
|
||||||
|
// public static String getAndroid() {
|
||||||
public static String getAndroid() {
|
// return android;
|
||||||
return android;
|
// }
|
||||||
}
|
//
|
||||||
|
// public void setAndroid(String android) {
|
||||||
public void setAndroid(String android) {
|
// HzsConfig.android = android;
|
||||||
BdConfig.android = android;
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
public static Integer getProductSync() {
|
public static Integer getProductSync() {
|
||||||
return productSync;
|
return productSync;
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class SysConstants {
|
public class SysConstants {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 嗨粉前缀
|
|
||||||
*/
|
|
||||||
public static final String HAI_FUN_PREFIX = "HF";
|
|
||||||
/**
|
/**
|
||||||
* 新零售前缀
|
* 新零售前缀
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package com.hzs.common.core.enums;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单扩展类型枚举类
|
|
||||||
*/
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Getter
|
|
||||||
public enum EOrderTypeExtend {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 正常
|
|
||||||
*/
|
|
||||||
NORMAL(0, "正常", 0),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册转复购
|
|
||||||
*/
|
|
||||||
REG_REP(1, "注册转复购", 0),
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实际值
|
|
||||||
*/
|
|
||||||
private final int value;
|
|
||||||
/**
|
|
||||||
* 显示标签
|
|
||||||
*/
|
|
||||||
private final String label;
|
|
||||||
/**
|
|
||||||
* 是否启用(0=是,1=否) -- 来源EYesNo
|
|
||||||
*/
|
|
||||||
private final int enable;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -15,11 +15,6 @@ public enum EShareType {
|
||||||
*/
|
*/
|
||||||
SHARE(1, "分享注册"),
|
SHARE(1, "分享注册"),
|
||||||
|
|
||||||
/**
|
|
||||||
* 188注册
|
|
||||||
*/
|
|
||||||
FANS(2, "188注册"),
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import com.hzs.common.core.utils.ServletUtils;
|
||||||
import com.hzs.common.core.utils.StringUtils;
|
import com.hzs.common.core.utils.StringUtils;
|
||||||
import com.hzs.common.core.utils.ip.IpUtils;
|
import com.hzs.common.core.utils.ip.IpUtils;
|
||||||
import com.hzs.common.core.utils.uuid.IdUtils;
|
import com.hzs.common.core.utils.uuid.IdUtils;
|
||||||
import com.hzs.common.domain.member.base.CuMemberShare;
|
|
||||||
import com.hzs.common.domain.member.ext.CuMemberExt;
|
import com.hzs.common.domain.member.ext.CuMemberExt;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
import com.hzs.member.base.dto.LoginMember;
|
import com.hzs.member.base.dto.LoginMember;
|
||||||
|
|
@ -58,26 +57,16 @@ public class MemberTokenService {
|
||||||
public Map<String, Object> createToken(LoginMember loginMember) {
|
public Map<String, Object> createToken(LoginMember loginMember) {
|
||||||
String token = IdUtils.fastUUID();
|
String token = IdUtils.fastUUID();
|
||||||
|
|
||||||
// 用户ID
|
|
||||||
Long pkId;
|
|
||||||
// 用户编号
|
|
||||||
String memberCode;
|
|
||||||
// 结算国
|
|
||||||
Integer pkCountry;
|
|
||||||
|
|
||||||
if (null != loginMember.getCuMember()) {
|
|
||||||
// 注册用户处理
|
// 注册用户处理
|
||||||
CuMemberExt cuMember = loginMember.getCuMember();
|
CuMemberExt cuMember = loginMember.getCuMember();
|
||||||
pkId = cuMember.getPkId();
|
// 用户ID
|
||||||
memberCode = cuMember.getMemberCode();
|
Long pkId = cuMember.getPkId();
|
||||||
pkCountry = cuMember.getPkSettleCountry();
|
// 用户编号
|
||||||
} else {
|
String memberCode = cuMember.getMemberCode();
|
||||||
// 分享用户处理(临时海粉)
|
// 结算国
|
||||||
CuMemberShare cuMemberShare = loginMember.getCuMemberShare();
|
Integer pkCountry = cuMember.getPkSettleCountry();
|
||||||
pkId = cuMemberShare.getPkId();
|
// 系统类型
|
||||||
memberCode = cuMemberShare.getMemberCode();
|
Integer systemType = cuMember.getSystemType();
|
||||||
pkCountry = cuMemberShare.getPkCountry();
|
|
||||||
}
|
|
||||||
|
|
||||||
loginMember.setToken(token);
|
loginMember.setToken(token);
|
||||||
loginMember.setPkId(pkId);
|
loginMember.setPkId(pkId);
|
||||||
|
|
@ -93,6 +82,7 @@ public class MemberTokenService {
|
||||||
claimsMap.put(SecurityConstants.DETAILS_USERNAME, memberCode);
|
claimsMap.put(SecurityConstants.DETAILS_USERNAME, memberCode);
|
||||||
claimsMap.put(SecurityConstants.DETAILS_USER_TYPE, loginMember.getLoginType());
|
claimsMap.put(SecurityConstants.DETAILS_USER_TYPE, loginMember.getLoginType());
|
||||||
claimsMap.put(SecurityConstants.DETAILS_USER_COUNTRY, pkCountry);
|
claimsMap.put(SecurityConstants.DETAILS_USER_COUNTRY, pkCountry);
|
||||||
|
claimsMap.put(SecurityConstants.SYSTEM_TYPE, systemType);
|
||||||
|
|
||||||
// 接口返回信息
|
// 接口返回信息
|
||||||
Map<String, Object> rspMap = new HashMap<>();
|
Map<String, Object> rspMap = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,6 @@ security:
|
||||||
- /member/api/share/share-register
|
- /member/api/share/share-register
|
||||||
# 新零售白名单
|
# 新零售白名单
|
||||||
- /retail-member/api/retail-auth/*
|
- /retail-member/api/retail-auth/*
|
||||||
# 188分享注册白名单
|
|
||||||
- /member/api/member/fans-convert-code/*
|
|
||||||
- /member/api/member/fans-order/*
|
|
||||||
- /system/api/idempotent/generate
|
|
||||||
- /member/api/retail-auth/auto-login
|
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,6 @@ public class TOnlinePaymentServiceImpl extends ServiceImpl<TOnlinePaymentMapper,
|
||||||
tOnlinePaymentExt.setOrderTypeVal(EOrderType.getLabelByValue(tOnlinePaymentExt.getOrderType()));
|
tOnlinePaymentExt.setOrderTypeVal(EOrderType.getLabelByValue(tOnlinePaymentExt.getOrderType()));
|
||||||
}else{
|
}else{
|
||||||
tOnlinePaymentExt.setOrderTypeVal("充值订单");
|
tOnlinePaymentExt.setOrderTypeVal("充值订单");
|
||||||
if(ObjectUtil.isEmpty(tOnlinePaymentExt.getMemberCode())){
|
|
||||||
tOnlinePaymentExt.setOrderTypeVal("注册订单");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ public class TShareCodeServiceImpl extends ServiceImpl<TShareCodeMapper, TShareC
|
||||||
|
|
||||||
switch (eShareType) {
|
switch (eShareType) {
|
||||||
case SHARE:
|
case SHARE:
|
||||||
case FANS:
|
|
||||||
// 分享注册
|
// 分享注册
|
||||||
resultCode = sharePath + "?code=" + code;
|
resultCode = sharePath + "?code=" + code;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue