Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0c4bc3900f
|
@ -7,11 +7,9 @@ import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品拓展表 Mapper 接口
|
* 商品拓展表 Mapper 接口
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-01
|
|
||||||
*/
|
*/
|
||||||
public interface BdProductExtendMapper extends BaseMapper<BdProductExtend> {
|
public interface BdProductExtendMapper extends BaseMapper<BdProductExtend> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据产品id查询产品拓展
|
* 根据产品id查询产品拓展
|
||||||
*
|
*
|
||||||
|
|
|
@ -5,12 +5,7 @@ import com.hzs.common.domain.sale.ext.BdProductExtendExt;
|
||||||
import com.hzs.common.domain.sale.product.BdProductExtend;
|
import com.hzs.common.domain.sale.product.BdProductExtend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
|
||||||
* 商品拓展表 服务类
|
* 商品拓展表 服务类
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-01
|
|
||||||
*/
|
*/
|
||||||
public interface IBdProductExtendService extends IService<BdProductExtend> {
|
public interface IBdProductExtendService extends IService<BdProductExtend> {
|
||||||
|
|
||||||
|
@ -20,7 +15,7 @@ public interface IBdProductExtendService extends IService<BdProductExtend> {
|
||||||
* @param productId
|
* @param productId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BdProductExtend getProductExtend(Integer productId);
|
BdProductExtend getProductExtend(Integer productId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据产品id 查找当前商品的上一位商品排序
|
* 根据产品id 查找当前商品的上一位商品排序
|
||||||
|
|
|
@ -1,87 +1,43 @@
|
||||||
package com.hzs.sale.product.service.impl;
|
package com.hzs.sale.product.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.hzs.common.core.constant.CacheConstants;
|
|
||||||
import com.hzs.common.core.service.RedisService;
|
|
||||||
import com.hzs.common.domain.sale.ext.BdProductExtendExt;
|
import com.hzs.common.domain.sale.ext.BdProductExtendExt;
|
||||||
import com.hzs.common.domain.sale.product.BdProductExtend;
|
import com.hzs.common.domain.sale.product.BdProductExtend;
|
||||||
import com.hzs.sale.product.mapper.BdProductExtendMapper;
|
import com.hzs.sale.product.mapper.BdProductExtendMapper;
|
||||||
import com.hzs.sale.product.service.IBdProductExtendService;
|
import com.hzs.sale.product.service.IBdProductExtendService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
|
||||||
* 商品拓展表 服务实现类
|
* 商品拓展表 服务实现类
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-01
|
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class BdProductExtendServiceImpl extends ServiceImpl<BdProductExtendMapper, BdProductExtend> implements IBdProductExtendService {
|
public class BdProductExtendServiceImpl extends ServiceImpl<BdProductExtendMapper, BdProductExtend> implements IBdProductExtendService {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisService redisService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品id查询产品拓展
|
|
||||||
*
|
|
||||||
* @param productId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public BdProductExtend getProductExtend(Integer productId) {
|
public BdProductExtend getProductExtend(Integer productId) {
|
||||||
return baseMapper.selectByProductId(productId);
|
return baseMapper.selectByProductId(productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据产品id 查找当前商品的上一位商品排序
|
|
||||||
*
|
|
||||||
* @param productId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Integer selectByMoveUpSort(Integer productId) {
|
public Integer selectByMoveUpSort(Integer productId) {
|
||||||
return baseMapper.selectByMoveUpSort(productId);
|
return baseMapper.selectByMoveUpSort(productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 大于传入编号的全部上移1
|
|
||||||
*
|
|
||||||
* @param sort
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void updateMoveUpBySort(Integer sort) {
|
public void updateMoveUpBySort(Integer sort) {
|
||||||
baseMapper.updateMoveUpBySort(sort);
|
baseMapper.updateMoveUpBySort(sort);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据id 查询当前商品的下一位商品排序
|
|
||||||
*
|
|
||||||
* @param productId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Integer selectByMoveDownSort(Integer productId) {
|
public Integer selectByMoveDownSort(Integer productId) {
|
||||||
return baseMapper.selectByMoveDownSort(productId);
|
return baseMapper.selectByMoveDownSort(productId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 大于传入编号的全部下移1
|
|
||||||
*
|
|
||||||
* @param sort
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void updateMoveDownBySort(Integer sort) {
|
public void updateMoveDownBySort(Integer sort) {
|
||||||
baseMapper.updateMoveDownBySort(sort);
|
baseMapper.updateMoveDownBySort(sort);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询排序最大值
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getMaxProductSort() {
|
public Integer getMaxProductSort() {
|
||||||
return baseMapper.getMaxProductSort();
|
return baseMapper.getMaxProductSort();
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.hzs.common.core.annotation.AccessPermissions;
|
import com.hzs.common.core.annotation.AccessPermissions;
|
||||||
import com.hzs.common.core.annotation.Log;
|
import com.hzs.common.core.annotation.Log;
|
||||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
|
||||||
import com.hzs.common.core.domain.R;
|
import com.hzs.common.core.domain.R;
|
||||||
import com.hzs.common.core.enums.*;
|
import com.hzs.common.core.enums.*;
|
||||||
import com.hzs.common.core.utils.CreateNormsCodeUtils;
|
import com.hzs.common.core.utils.CreateNormsCodeUtils;
|
||||||
|
@ -26,8 +25,6 @@ import com.hzs.common.domain.sale.wares.*;
|
||||||
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
import com.hzs.common.domain.system.config.ext.BdRangeExt;
|
||||||
import com.hzs.common.security.service.UserTokenService;
|
import com.hzs.common.security.service.UserTokenService;
|
||||||
import com.hzs.common.security.utils.SecurityUtils;
|
import com.hzs.common.security.utils.SecurityUtils;
|
||||||
|
|
||||||
import com.hzs.common.service.ITransactionCommonService;
|
|
||||||
import com.hzs.sale.product.service.IBdAreaClassifyService;
|
import com.hzs.sale.product.service.IBdAreaClassifyService;
|
||||||
import com.hzs.sale.product.service.IBdProductExtendService;
|
import com.hzs.sale.product.service.IBdProductExtendService;
|
||||||
import com.hzs.sale.product.service.IBdProductService;
|
import com.hzs.sale.product.service.IBdProductService;
|
||||||
|
@ -36,8 +33,6 @@ import com.hzs.sale.wares.param.WaresDetailParams;
|
||||||
import com.hzs.sale.wares.param.*;
|
import com.hzs.sale.wares.param.*;
|
||||||
import com.hzs.sale.wares.service.*;
|
import com.hzs.sale.wares.service.*;
|
||||||
import com.hzs.sale.wares.vo.*;
|
import com.hzs.sale.wares.vo.*;
|
||||||
import com.hzs.system.base.ICurrencyServiceApi;
|
|
||||||
import com.hzs.system.base.dto.CurrencyDTO;
|
|
||||||
import com.hzs.system.config.IRangeServiceApi;
|
import com.hzs.system.config.IRangeServiceApi;
|
||||||
import com.hzs.system.sys.dto.LoginUser;
|
import com.hzs.system.sys.dto.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -52,61 +47,50 @@ import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2022/9/8 17:04
|
|
||||||
* @Classname: BdWaresController
|
|
||||||
* @PackageName: com.hzs.sale.wares.controller.manage
|
|
||||||
*/
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/manage/wares")
|
@RequestMapping("/manage/wares")
|
||||||
public class BdWaresController extends BaseController {
|
public class BdWaresController extends BaseController {
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ICurrencyServiceApi currencyServiceApi;
|
IRangeServiceApi iRangeServiceApi;
|
||||||
@DubboReference
|
|
||||||
IRangeServiceApi rangeServiceApi;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresAuthorizeService waresAuthorizeService;
|
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresAwardsService waresAwardsService;
|
private IBdWaresAwardsService iBdWaresAwardsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITransactionCommonService iTransactionCommonService;
|
private IBdWaresGradeService iBdWaresGradeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresGradeService waresGradeService;
|
private IBdProductExtendService iBdProductExtendService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdProductExtendService productExtendService;
|
private IBdSpecsService iBdSpecsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdSpecsService specsService;
|
private IBdWaresRangeService iBdWaresRangeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresRangeService waresRangeService;
|
private IBdProductService iBdProductService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdProductService productService;
|
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresSpecsPackService waresSpecsPackService;
|
private IBdWaresService iBdWaresService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresService waresService;
|
private IBdWaresLabelService iBdWaresLabelService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresLabelService waresLabelService;
|
private IBdWaresExtendService iBdWaresExtendService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresExtendService waresExtendService;
|
private IBdWaresDetailService iBdWaresDetailService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresDetailService waresDetailService;
|
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresSpecsSkuService waresSpecsSkuService;
|
private IBdWaresSpecsRelationService iBdWaresSpecsRelationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresSpecsRelationService waresSpecsRelationService;
|
private IBdWaresSpecsService iBdWaresSpecsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresSpecsService waresSpecsService;
|
private IBdWaresAuthorityService iBdWaresAuthorityService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresAuthorityService waresAuthorityService;
|
private IBdAreaClassifyService iBdAreaClassifyService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserTokenService userTokenService;
|
private UserTokenService userTokenService;
|
||||||
@Autowired
|
|
||||||
private IBdAreaClassifyService areaClassifyService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* 查询列表
|
||||||
|
@ -121,26 +105,20 @@ public class BdWaresController extends BaseController {
|
||||||
waresParams.setSystemType(SecurityUtils.getSystemType());
|
waresParams.setSystemType(SecurityUtils.getSystemType());
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
|
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
|
|
||||||
resultList.parallelStream().forEach(waresVo -> {
|
resultList.parallelStream().forEach(waresVo -> {
|
||||||
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||||
if (waresAuthorityVo != null) {
|
if (waresAuthorityVo != null) {
|
||||||
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
||||||
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
|
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumLabelByValue(waresAuthorityVo.getAuthorityType()));
|
||||||
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
|
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
|
||||||
waresVo.setMemberName(waresAuthorityVo.getMemberName());
|
waresVo.setMemberName(waresAuthorityVo.getMemberName());
|
||||||
}
|
}
|
||||||
List<WaresProductDetailVo> waresDetailList = waresDetailService.selectByList(waresVo.getPkWares());
|
List<WaresProductDetailVo> waresDetailList = iBdWaresDetailService.selectByList(waresVo.getPkWares());
|
||||||
waresVo.setWaresDetailList(waresDetailList);
|
waresVo.setWaresDetailList(waresDetailList);
|
||||||
if (waresVo.getIsMakerGift() != null) {
|
if (waresVo.getIsMakerGift() != null) {
|
||||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
waresVo.setIsMakerGiftVal(EWaresType.getEnumLabelByValue(waresVo.getIsMakerGift()));
|
||||||
}
|
|
||||||
if (null != waresVo.getMakerIncome()) {
|
|
||||||
// 处理发起人收益
|
|
||||||
waresVo.setMakerIncome(waresVo.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -156,28 +134,24 @@ public class BdWaresController extends BaseController {
|
||||||
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
||||||
waresParams.setSystemType(SecurityUtils.getSystemType());
|
waresParams.setSystemType(SecurityUtils.getSystemType());
|
||||||
|
|
||||||
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
|
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
|
||||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
// 获取需要翻译的枚举翻译
|
|
||||||
Map<String, String> transactionMap = iTransactionCommonService.exportEnumTransaction(ESpecialArea.values(), EYesNo.values(), ESupplyWay.values(), EPresaleStatus.values());
|
|
||||||
|
|
||||||
resultList.parallelStream().forEach(waresVo -> {
|
resultList.parallelStream().forEach(waresVo -> {
|
||||||
// 所属专区
|
// 所属专区
|
||||||
waresVo.setSpecialAreaVal(transactionMap.get(EnumsPrefixConstants.SPECIAL_AREA + waresVo.getSpecialArea()));
|
waresVo.setSpecialAreaVal(ESpecialArea.getESpecialArea(waresVo.getSpecialArea()));
|
||||||
// 供应方式
|
// 供应方式
|
||||||
waresVo.setOperateScopeVal(transactionMap.get(EnumsPrefixConstants.SUPPLY_WAY + waresVo.getOperateScope()));
|
waresVo.setOperateScopeVal(ESupplyWay.getEnumLabelByValue(waresVo.getOperateScope()));
|
||||||
// 预售状态
|
// 预售状态
|
||||||
waresVo.setPreSaleStatusVal(transactionMap.get(EnumsPrefixConstants.PRESALE_STATUS + waresVo.getPreSaleStatus()));
|
waresVo.setPreSaleStatusVal(EPresaleStatus.getEnumLabelByValue(waresVo.getPreSaleStatus()));
|
||||||
|
|
||||||
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
|
||||||
if (waresAuthorityVo != null) {
|
if (waresAuthorityVo != null) {
|
||||||
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
|
||||||
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
|
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumLabelByValue(waresAuthorityVo.getAuthorityType()));
|
||||||
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
|
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
|
||||||
waresVo.setMemberName(waresAuthorityVo.getMemberName());
|
waresVo.setMemberName(waresAuthorityVo.getMemberName());
|
||||||
}
|
}
|
||||||
List<WaresProductDetailVo> waresDetailList = waresDetailService.selectByList(waresVo.getPkWares());
|
List<WaresProductDetailVo> waresDetailList = iBdWaresDetailService.selectByList(waresVo.getPkWares());
|
||||||
waresVo.setWaresDetailList(waresDetailList);
|
waresVo.setWaresDetailList(waresDetailList);
|
||||||
if (waresDetailList.size() > 0) {
|
if (waresDetailList.size() > 0) {
|
||||||
StringBuilder productNames = new StringBuilder();
|
StringBuilder productNames = new StringBuilder();
|
||||||
|
@ -192,13 +166,9 @@ public class BdWaresController extends BaseController {
|
||||||
waresVo.setProductCodes(productCodes.toString());
|
waresVo.setProductCodes(productCodes.toString());
|
||||||
waresVo.setProductQuantitys(productQuantitys.toString());
|
waresVo.setProductQuantitys(productQuantitys.toString());
|
||||||
if (waresVo.getIsMakerGift() != null) {
|
if (waresVo.getIsMakerGift() != null) {
|
||||||
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
|
waresVo.setIsMakerGiftVal(EWaresType.getEnumLabelByValue(waresVo.getIsMakerGift()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (null != waresVo.getMakerIncome()) {
|
|
||||||
// 处理发起人收益
|
|
||||||
waresVo.setMakerIncome(waresVo.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
|
ExcelUtil<WaresVo> util = new ExcelUtil<>(WaresVo.class);
|
||||||
|
@ -216,27 +186,27 @@ public class BdWaresController extends BaseController {
|
||||||
if (StringUtils.isBlank(wares.getWaresName())) {
|
if (StringUtils.isBlank(wares.getWaresName())) {
|
||||||
return AjaxResult.error("商品名称不存在");
|
return AjaxResult.error("商品名称不存在");
|
||||||
}
|
}
|
||||||
// 预售状态必传
|
|
||||||
if (wares.getPreSaleStatus() == null) {
|
if (wares.getPreSaleStatus() == null) {
|
||||||
return AjaxResult.error("预售状态必传");
|
return AjaxResult.error("预售状态必传");
|
||||||
}
|
}
|
||||||
if (wares.getWaresPrice() == null) {
|
if (wares.getWaresPrice() == null) {
|
||||||
return AjaxResult.error("商品价格必填");
|
return AjaxResult.error("商品价格必填");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(wares.getWaresCode())) {
|
|
||||||
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(BdWares::getWaresCode, wares.getWaresCode());
|
|
||||||
queryWrapper.eq(BdWares::getSpecialArea, wares.getSpecialArea());
|
|
||||||
if (waresService.count(queryWrapper) > 0) {
|
|
||||||
return AjaxResult.error("商品编号重复");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (wares.getPkAreaClassify() == null) {
|
if (wares.getPkAreaClassify() == null) {
|
||||||
return AjaxResult.error("商品分类不能为空");
|
return AjaxResult.error("商品分类不能为空");
|
||||||
}
|
}
|
||||||
if (wares.getCover1() == null) {
|
if (wares.getCover1() == null) {
|
||||||
return AjaxResult.error("商品图片必传");
|
return AjaxResult.error("商品图片必传");
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(wares.getWaresCode())) {
|
||||||
|
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BdWares::getWaresCode, wares.getWaresCode());
|
||||||
|
queryWrapper.eq(BdWares::getSpecialArea, wares.getSpecialArea());
|
||||||
|
if (iBdWaresService.count(queryWrapper) > 0) {
|
||||||
|
return AjaxResult.error("商品编号重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 是否陆运
|
// 是否陆运
|
||||||
int isLandTrans = 1;
|
int isLandTrans = 1;
|
||||||
// 是否空运
|
// 是否空运
|
||||||
|
@ -245,7 +215,7 @@ public class BdWaresController extends BaseController {
|
||||||
int isOceanTrans = 1;
|
int isOceanTrans = 1;
|
||||||
if (wares.getWaresDetailList().size() > 0) {
|
if (wares.getWaresDetailList().size() > 0) {
|
||||||
for (WaresDetailParams waresDetailParams : wares.getWaresDetailList()) {
|
for (WaresDetailParams waresDetailParams : wares.getWaresDetailList()) {
|
||||||
BdProductExtend productExtend = productExtendService.getProductExtend(waresDetailParams.getPkProduct());
|
BdProductExtend productExtend = iBdProductExtendService.getProductExtend(waresDetailParams.getPkProduct());
|
||||||
// 是否陆运
|
// 是否陆运
|
||||||
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
|
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
|
||||||
isLandTrans = EYesNo.YES.getIntValue();
|
isLandTrans = EYesNo.YES.getIntValue();
|
||||||
|
@ -328,7 +298,7 @@ public class BdWaresController extends BaseController {
|
||||||
return AjaxResult.error("产品规格至少有一个上架");
|
return AjaxResult.error("产品规格至少有一个上架");
|
||||||
}
|
}
|
||||||
wares.setSort(0);
|
wares.setSort(0);
|
||||||
waresService.saveWares(wares, userTokenService.getLoginUser());
|
iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
|
||||||
return AjaxResult.success(wares.getWaresCode());
|
return AjaxResult.success(wares.getWaresCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,8 +311,6 @@ public class BdWaresController extends BaseController {
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.UPDATE)
|
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.UPDATE)
|
||||||
public AjaxResult update(@RequestBody WaresParams waresParams) {
|
public AjaxResult update(@RequestBody WaresParams waresParams) {
|
||||||
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
|
||||||
waresParams.setSystemType(SecurityUtils.getSystemType());
|
|
||||||
if (StringUtils.isBlank(waresParams.getWaresCode())) {
|
if (StringUtils.isBlank(waresParams.getWaresCode())) {
|
||||||
return AjaxResult.error("商品编号不存在");
|
return AjaxResult.error("商品编号不存在");
|
||||||
}
|
}
|
||||||
|
@ -350,16 +318,6 @@ public class BdWaresController extends BaseController {
|
||||||
if (waresParams.getPreSaleStatus() == null) {
|
if (waresParams.getPreSaleStatus() == null) {
|
||||||
return AjaxResult.error("预售状态必传");
|
return AjaxResult.error("预售状态必传");
|
||||||
}
|
}
|
||||||
// 商品编号 重复
|
|
||||||
if (StringUtils.isNotBlank(waresParams.getWaresCode())) {
|
|
||||||
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
queryWrapper.eq(BdWares::getWaresCode, waresParams.getWaresCode());
|
|
||||||
queryWrapper.eq(BdWares::getSpecialArea, waresParams.getSpecialArea());
|
|
||||||
queryWrapper.notIn(BdWares::getPkId, waresParams.getWaresId());
|
|
||||||
if (waresService.count(queryWrapper) > 0) {
|
|
||||||
return AjaxResult.error("商品编号重复");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (StringUtils.isBlank(waresParams.getWaresName())) {
|
if (StringUtils.isBlank(waresParams.getWaresName())) {
|
||||||
return AjaxResult.error("商品名称不存在");
|
return AjaxResult.error("商品名称不存在");
|
||||||
}
|
}
|
||||||
|
@ -372,6 +330,19 @@ public class BdWaresController extends BaseController {
|
||||||
if (waresParams.getCover1() == null) {
|
if (waresParams.getCover1() == null) {
|
||||||
return AjaxResult.error("商品图片必传");
|
return AjaxResult.error("商品图片必传");
|
||||||
}
|
}
|
||||||
|
// 商品编号 重复
|
||||||
|
if (StringUtils.isNotBlank(waresParams.getWaresCode())) {
|
||||||
|
LambdaQueryWrapper<BdWares> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(BdWares::getWaresCode, waresParams.getWaresCode());
|
||||||
|
queryWrapper.eq(BdWares::getSpecialArea, waresParams.getSpecialArea());
|
||||||
|
queryWrapper.notIn(BdWares::getPkId, waresParams.getWaresId());
|
||||||
|
if (iBdWaresService.count(queryWrapper) > 0) {
|
||||||
|
return AjaxResult.error("商品编号重复");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
waresParams.setPkCountry(SecurityUtils.getPkCountry());
|
||||||
|
waresParams.setSystemType(SecurityUtils.getSystemType());
|
||||||
|
|
||||||
// 是否陆运
|
// 是否陆运
|
||||||
int isLandTrans = 1;
|
int isLandTrans = 1;
|
||||||
|
@ -381,7 +352,7 @@ public class BdWaresController extends BaseController {
|
||||||
int isOceanTrans = 1;
|
int isOceanTrans = 1;
|
||||||
if (waresParams.getWaresDetailList().size() > 0) {
|
if (waresParams.getWaresDetailList().size() > 0) {
|
||||||
for (WaresDetailParams waresDetailParams : waresParams.getWaresDetailList()) {
|
for (WaresDetailParams waresDetailParams : waresParams.getWaresDetailList()) {
|
||||||
BdProductExtend productExtend = productExtendService.getProductExtend(waresDetailParams.getPkProduct());
|
BdProductExtend productExtend = iBdProductExtendService.getProductExtend(waresDetailParams.getPkProduct());
|
||||||
// 是否陆运
|
// 是否陆运
|
||||||
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
|
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
|
||||||
isLandTrans = EYesNo.YES.getIntValue();
|
isLandTrans = EYesNo.YES.getIntValue();
|
||||||
|
@ -459,7 +430,7 @@ public class BdWaresController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
waresParams.setSort(0);
|
waresParams.setSort(0);
|
||||||
waresService.updateWares(waresParams, userTokenService.getLoginUser());
|
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
|
||||||
return AjaxResult.success(waresParams.getWaresCode());
|
return AjaxResult.success(waresParams.getWaresCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +443,7 @@ public class BdWaresController extends BaseController {
|
||||||
@DeleteMapping("/{pkId}")
|
@DeleteMapping("/{pkId}")
|
||||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE)
|
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE)
|
||||||
public AjaxResult remove(@PathVariable Integer pkId) {
|
public AjaxResult remove(@PathVariable Integer pkId) {
|
||||||
waresService.removeWares(pkId, userTokenService.getLoginUser());
|
iBdWaresService.removeWares(pkId, userTokenService.getLoginUser());
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,14 +455,14 @@ public class BdWaresController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public AjaxResult detail(Long pkId) {
|
public AjaxResult detail(Long pkId) {
|
||||||
R<List<BdRangeExt>> rangeDto = rangeServiceApi.queryRange(SecurityUtils.getPkCountry());
|
R<List<BdRangeExt>> rangeDto = iRangeServiceApi.queryRange(SecurityUtils.getPkCountry());
|
||||||
List<BdRangeExt> rsList = rangeDto.getData();
|
List<BdRangeExt> rsList = rangeDto.getData();
|
||||||
Map<Integer, BdRangeExt> rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity()));
|
Map<Integer, BdRangeExt> rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity()));
|
||||||
|
|
||||||
BdWares wares = waresService.getById(pkId);
|
BdWares wares = iBdWaresService.getById(pkId);
|
||||||
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BdWaresExtend::getPkWares, pkId);
|
queryWrapper.eq(BdWaresExtend::getPkWares, pkId);
|
||||||
BdWaresExtend waresExtend = waresExtendService.getOne(queryWrapper);
|
BdWaresExtend waresExtend = iBdWaresExtendService.getOne(queryWrapper);
|
||||||
WaresParams waresParams = new WaresParams();
|
WaresParams waresParams = new WaresParams();
|
||||||
waresParams.setWaresId(wares.getPkId());
|
waresParams.setWaresId(wares.getPkId());
|
||||||
waresParams.setIsPreSale(wares.getIsPreSale());
|
waresParams.setIsPreSale(wares.getIsPreSale());
|
||||||
|
@ -542,12 +513,9 @@ public class BdWaresController extends BaseController {
|
||||||
waresParams.setSortStatus(wares.getSortStatus());
|
waresParams.setSortStatus(wares.getSortStatus());
|
||||||
waresParams.setSystemType(waresExtend.getSystemType());
|
waresParams.setSystemType(waresExtend.getSystemType());
|
||||||
waresParams.setAreaIncome(wares.getAreaIncome());
|
waresParams.setAreaIncome(wares.getAreaIncome());
|
||||||
if (waresExtend.getMakerIncome() != null) {
|
waresParams.setBoxNum(wares.getBoxNum());
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
|
|
||||||
waresParams.setMakerIncome(waresExtend.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
|
|
||||||
}
|
|
||||||
|
|
||||||
BdAreaClassify parentAreaClassify = areaClassifyService.getAreaClassify(wares.getPkAreaClassify());
|
BdAreaClassify parentAreaClassify = iBdAreaClassifyService.getAreaClassify(wares.getPkAreaClassify());
|
||||||
if (parentAreaClassify != null) {
|
if (parentAreaClassify != null) {
|
||||||
if (parentAreaClassify.getPkParent() == 0) {
|
if (parentAreaClassify.getPkParent() == 0) {
|
||||||
waresParams.setParentPkAreaClassify(null);
|
waresParams.setParentPkAreaClassify(null);
|
||||||
|
@ -558,7 +526,7 @@ public class BdWaresController extends BaseController {
|
||||||
// 标签
|
// 标签
|
||||||
LambdaQueryWrapper<BdWaresLabel> waresLabelWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresLabel> waresLabelWrapper = new LambdaQueryWrapper<>();
|
||||||
waresLabelWrapper.eq(BdWaresLabel::getPkWares, pkId);
|
waresLabelWrapper.eq(BdWaresLabel::getPkWares, pkId);
|
||||||
List<BdWaresLabel> labelList = waresLabelService.list(waresLabelWrapper);
|
List<BdWaresLabel> labelList = iBdWaresLabelService.list(waresLabelWrapper);
|
||||||
// 保证标签
|
// 保证标签
|
||||||
List<Integer> pkGuaranteeLabel = new ArrayList<>();
|
List<Integer> pkGuaranteeLabel = new ArrayList<>();
|
||||||
// 卖点标签
|
// 卖点标签
|
||||||
|
@ -587,7 +555,7 @@ public class BdWaresController extends BaseController {
|
||||||
//包装和规格
|
//包装和规格
|
||||||
LambdaQueryWrapper<BdWaresSpecsPack> waresSpecsPackWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsPack> waresSpecsPackWrapper = new LambdaQueryWrapper<>();
|
||||||
waresSpecsPackWrapper.eq(BdWaresSpecsPack::getPkWares, pkId);
|
waresSpecsPackWrapper.eq(BdWaresSpecsPack::getPkWares, pkId);
|
||||||
List<BdWaresSpecsPack> list = waresSpecsPackService.list(waresSpecsPackWrapper);
|
List<BdWaresSpecsPack> list = iBdWaresSpecsPackService.list(waresSpecsPackWrapper);
|
||||||
List<WaresSpecsPackParams> waresSpecsPackList = new ArrayList<>();
|
List<WaresSpecsPackParams> waresSpecsPackList = new ArrayList<>();
|
||||||
for (BdWaresSpecsPack bdWaresSpecsPack : list) {
|
for (BdWaresSpecsPack bdWaresSpecsPack : list) {
|
||||||
WaresSpecsPackParams waresSpecsPackParams = BeanUtil.copyProperties(bdWaresSpecsPack, WaresSpecsPackParams.class);
|
WaresSpecsPackParams waresSpecsPackParams = BeanUtil.copyProperties(bdWaresSpecsPack, WaresSpecsPackParams.class);
|
||||||
|
@ -598,14 +566,14 @@ public class BdWaresController extends BaseController {
|
||||||
//产品详情列表
|
//产品详情列表
|
||||||
LambdaQueryWrapper<BdWaresDetail> waresDetailWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresDetail> waresDetailWrapper = new LambdaQueryWrapper<>();
|
||||||
waresDetailWrapper.eq(BdWaresDetail::getPkWares, pkId);
|
waresDetailWrapper.eq(BdWaresDetail::getPkWares, pkId);
|
||||||
List<BdWaresDetail> waresDetailList = waresDetailService.list(waresDetailWrapper);
|
List<BdWaresDetail> waresDetailList = iBdWaresDetailService.list(waresDetailWrapper);
|
||||||
// 商品详情
|
// 商品详情
|
||||||
List<WaresDetailParams> detailList = new ArrayList<>();
|
List<WaresDetailParams> detailList = new ArrayList<>();
|
||||||
// 商品sku
|
// 商品sku
|
||||||
List<WaresSpecsSkuParams> waresSpecsSkuList = new ArrayList<>();
|
List<WaresSpecsSkuParams> waresSpecsSkuList = new ArrayList<>();
|
||||||
for (BdWaresDetail bd : waresDetailList) {
|
for (BdWaresDetail bd : waresDetailList) {
|
||||||
WaresDetailParams waresDetailParams = BeanUtil.copyProperties(bd, WaresDetailParams.class);
|
WaresDetailParams waresDetailParams = BeanUtil.copyProperties(bd, WaresDetailParams.class);
|
||||||
BdProduct product = productService.getProduct(bd.getPkProduct());
|
BdProduct product = iBdProductService.getProduct(bd.getPkProduct());
|
||||||
if (product != null) {
|
if (product != null) {
|
||||||
waresDetailParams.setProductCode(product.getProductCode());
|
waresDetailParams.setProductCode(product.getProductCode());
|
||||||
waresDetailParams.setProductName(product.getProductName());
|
waresDetailParams.setProductName(product.getProductName());
|
||||||
|
@ -617,7 +585,7 @@ public class BdWaresController extends BaseController {
|
||||||
LambdaQueryWrapper<BdWaresSpecsSku> specsSku = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsSku> specsSku = new LambdaQueryWrapper<>();
|
||||||
specsSku.eq(BdWaresSpecsSku::getPkWares, pkId);
|
specsSku.eq(BdWaresSpecsSku::getPkWares, pkId);
|
||||||
specsSku.eq(BdWaresSpecsSku::getPkWaresDetail, bd.getPkId());
|
specsSku.eq(BdWaresSpecsSku::getPkWaresDetail, bd.getPkId());
|
||||||
List<BdWaresSpecsSku> specsSkuList = waresSpecsSkuService.list(specsSku);
|
List<BdWaresSpecsSku> specsSkuList = iBdWaresSpecsSkuService.list(specsSku);
|
||||||
for (BdWaresSpecsSku bdWaresSpecsSku : specsSkuList) {
|
for (BdWaresSpecsSku bdWaresSpecsSku : specsSkuList) {
|
||||||
WaresSpecsSkuParams specsSkuParams = new WaresSpecsSkuParams();
|
WaresSpecsSkuParams specsSkuParams = new WaresSpecsSkuParams();
|
||||||
specsSkuParams.setPkWaresSpecsSku(bdWaresSpecsSku.getPkId());
|
specsSkuParams.setPkWaresSpecsSku(bdWaresSpecsSku.getPkId());
|
||||||
|
@ -634,10 +602,10 @@ public class BdWaresController extends BaseController {
|
||||||
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
||||||
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresSpecsSku.getPkId());
|
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresSpecsSku.getPkId());
|
||||||
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
|
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
|
||||||
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
||||||
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
||||||
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
|
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
|
||||||
if (specs != null) {
|
if (specs != null) {
|
||||||
waresSpecs.setSpecsName(specs.getSpecsName());
|
waresSpecs.setSpecsName(specs.getSpecsName());
|
||||||
}
|
}
|
||||||
|
@ -652,7 +620,7 @@ public class BdWaresController extends BaseController {
|
||||||
// 团队配置
|
// 团队配置
|
||||||
LambdaQueryWrapper<BdWaresAuthority> authorityWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresAuthority> authorityWrapper = new LambdaQueryWrapper<>();
|
||||||
authorityWrapper.eq(BdWaresAuthority::getPkWares, pkId);
|
authorityWrapper.eq(BdWaresAuthority::getPkWares, pkId);
|
||||||
List<BdWaresAuthority> authList = waresAuthorityService.list(authorityWrapper);
|
List<BdWaresAuthority> authList = iBdWaresAuthorityService.list(authorityWrapper);
|
||||||
List<WaresAuthorityParam> waresAuthorityList = new ArrayList<>();
|
List<WaresAuthorityParam> waresAuthorityList = new ArrayList<>();
|
||||||
for (BdWaresAuthority bdWaresAuthority : authList) {
|
for (BdWaresAuthority bdWaresAuthority : authList) {
|
||||||
WaresAuthorityParam waresAuthorityParam = BeanUtil.copyProperties(bdWaresAuthority, WaresAuthorityParam.class);
|
WaresAuthorityParam waresAuthorityParam = BeanUtil.copyProperties(bdWaresAuthority, WaresAuthorityParam.class);
|
||||||
|
@ -661,10 +629,10 @@ public class BdWaresController extends BaseController {
|
||||||
waresParams.setWaresAuthorityList(waresAuthorityList);
|
waresParams.setWaresAuthorityList(waresAuthorityList);
|
||||||
// 极差
|
// 极差
|
||||||
List<WaresRangeParams> waresRangeList = new ArrayList<>();
|
List<WaresRangeParams> waresRangeList = new ArrayList<>();
|
||||||
List<BdWaresRange> rangeList = waresRangeService.queryWaresList(pkId, SecurityUtils.getPkCountry());
|
List<BdWaresRange> rangeList = iBdWaresRangeService.queryWaresList(pkId, SecurityUtils.getPkCountry());
|
||||||
LambdaQueryWrapper<BdWaresRange> waresRangeWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresRange> waresRangeWrapper = new LambdaQueryWrapper<>();
|
||||||
waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId);
|
waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId);
|
||||||
int waresRangeCount = waresRangeService.count(waresRangeWrapper);
|
int waresRangeCount = iBdWaresRangeService.count(waresRangeWrapper);
|
||||||
List<Integer> rgList = new ArrayList<>();
|
List<Integer> rgList = new ArrayList<>();
|
||||||
for (BdWaresRange bdWaresRange : rangeList) {
|
for (BdWaresRange bdWaresRange : rangeList) {
|
||||||
if (bdWaresRange.getPkId() != null) {
|
if (bdWaresRange.getPkId() != null) {
|
||||||
|
@ -675,10 +643,10 @@ public class BdWaresController extends BaseController {
|
||||||
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
||||||
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
|
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
|
||||||
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
|
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
|
||||||
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
||||||
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
||||||
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
|
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
|
||||||
if (specs != null) {
|
if (specs != null) {
|
||||||
waresSpecs.setSpecsName(specs.getSpecsName());
|
waresSpecs.setSpecsName(specs.getSpecsName());
|
||||||
}
|
}
|
||||||
|
@ -691,7 +659,7 @@ public class BdWaresController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
waresRangeParams.setRangeName(null);
|
waresRangeParams.setRangeName(null);
|
||||||
}
|
}
|
||||||
BdProduct product = productService.getProduct(bdWaresRange.getPkProduct());
|
BdProduct product = iBdProductService.getProduct(bdWaresRange.getPkProduct());
|
||||||
waresRangeParams.setProductCode(product.getProductCode());
|
waresRangeParams.setProductCode(product.getProductCode());
|
||||||
waresRangeParams.setProductName(product.getProductName());
|
waresRangeParams.setProductName(product.getProductName());
|
||||||
waresRangeParams.setProductCover(product.getCover());
|
waresRangeParams.setProductCover(product.getCover());
|
||||||
|
@ -711,7 +679,7 @@ public class BdWaresController extends BaseController {
|
||||||
for (BdWaresDetail bdWaresDetail : waresDetailList) {
|
for (BdWaresDetail bdWaresDetail : waresDetailList) {
|
||||||
WaresRangeParams waresRangeParams = new WaresRangeParams();
|
WaresRangeParams waresRangeParams = new WaresRangeParams();
|
||||||
waresRangeParams.setPkRange(rg);
|
waresRangeParams.setPkRange(rg);
|
||||||
BdProduct product = productService.getProduct(bdWaresDetail.getPkProduct());
|
BdProduct product = iBdProductService.getProduct(bdWaresDetail.getPkProduct());
|
||||||
waresRangeParams.setPkProduct(product.getPkId());
|
waresRangeParams.setPkProduct(product.getPkId());
|
||||||
waresRangeParams.setProductCode(product.getProductCode());
|
waresRangeParams.setProductCode(product.getProductCode());
|
||||||
waresRangeParams.setProductName(product.getProductName());
|
waresRangeParams.setProductName(product.getProductName());
|
||||||
|
@ -725,16 +693,16 @@ public class BdWaresController extends BaseController {
|
||||||
LambdaQueryWrapper<BdWaresRange> qe = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresRange> qe = new LambdaQueryWrapper<>();
|
||||||
qe.eq(BdWaresRange::getPkWares, bdWaresDetail.getPkWares());
|
qe.eq(BdWaresRange::getPkWares, bdWaresDetail.getPkWares());
|
||||||
qe.eq(BdWaresRange::getPkWaresDetail, bdWaresDetail.getPkId());
|
qe.eq(BdWaresRange::getPkWaresDetail, bdWaresDetail.getPkId());
|
||||||
List<BdWaresRange> wrList = waresRangeService.list(qe);
|
List<BdWaresRange> wrList = iBdWaresRangeService.list(qe);
|
||||||
// 查询每一个sku 的所有规格
|
// 查询每一个sku 的所有规格
|
||||||
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
|
||||||
for (BdWaresRange bdWaresRange : wrList) {
|
for (BdWaresRange bdWaresRange : wrList) {
|
||||||
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
|
||||||
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
|
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
|
||||||
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
|
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
|
||||||
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
|
||||||
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
|
||||||
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
|
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
|
||||||
if (specs != null) {
|
if (specs != null) {
|
||||||
waresSpecs.setSpecsName(specs.getSpecsName());
|
waresSpecs.setSpecsName(specs.getSpecsName());
|
||||||
}
|
}
|
||||||
|
@ -755,19 +723,19 @@ public class BdWaresController extends BaseController {
|
||||||
// 查询商品级别
|
// 查询商品级别
|
||||||
LambdaQueryWrapper<BdWaresGrade> qw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresGrade> qw = new LambdaQueryWrapper<>();
|
||||||
qw.eq(BdWaresGrade::getPkWares, pkId);
|
qw.eq(BdWaresGrade::getPkWares, pkId);
|
||||||
List<BdWaresGrade> waresGradeIds = waresGradeService.list(qw);
|
List<BdWaresGrade> waresGradeIds = iBdWaresGradeService.list(qw);
|
||||||
List<Integer> ids = waresGradeIds.stream().map(BdWaresGrade::getPkRange).collect(Collectors.toList());
|
List<Integer> ids = waresGradeIds.stream().map(BdWaresGrade::getPkRange).collect(Collectors.toList());
|
||||||
waresParams.setWaresGradeIds(ids);
|
waresParams.setWaresGradeIds(ids);
|
||||||
// 查询商品奖衔
|
// 查询商品奖衔
|
||||||
LambdaQueryWrapper<BdWaresAwards> qe = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresAwards> qe = new LambdaQueryWrapper<>();
|
||||||
qe.eq(BdWaresAwards::getPkWares, pkId);
|
qe.eq(BdWaresAwards::getPkWares, pkId);
|
||||||
List<BdWaresAwards> waresAwardsIds = waresAwardsService.list(qe);
|
List<BdWaresAwards> waresAwardsIds = iBdWaresAwardsService.list(qe);
|
||||||
List<Integer> waresAwardsArray = waresAwardsIds.stream().map(BdWaresAwards::getPkAwards).collect(Collectors.toList());
|
List<Integer> waresAwardsArray = waresAwardsIds.stream().map(BdWaresAwards::getPkAwards).collect(Collectors.toList());
|
||||||
waresParams.setWaresAwardsIds(waresAwardsArray);
|
waresParams.setWaresAwardsIds(waresAwardsArray);
|
||||||
// 查询商品权限配置
|
// 查询商品权限配置
|
||||||
LambdaQueryWrapper<BdWaresAuthorize> qa = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresAuthorize> qa = new LambdaQueryWrapper<>();
|
||||||
qa.eq(BdWaresAuthorize::getPkWares, pkId);
|
qa.eq(BdWaresAuthorize::getPkWares, pkId);
|
||||||
List<BdWaresAuthorize> waresAuthoritys = waresAuthorizeService.list(qa);
|
List<BdWaresAuthorize> waresAuthoritys = iBdWaresAuthorizeService.list(qa);
|
||||||
List<Integer> waresAuthorizeList = waresAuthoritys.stream().map(BdWaresAuthorize::getValue).collect(Collectors.toList());
|
List<Integer> waresAuthorizeList = waresAuthoritys.stream().map(BdWaresAuthorize::getValue).collect(Collectors.toList());
|
||||||
waresParams.setWaresMemberAuthorizeList(waresAuthorizeList);
|
waresParams.setWaresMemberAuthorizeList(waresAuthorizeList);
|
||||||
return AjaxResult.success(waresParams);
|
return AjaxResult.success(waresParams);
|
||||||
|
@ -784,7 +752,7 @@ public class BdWaresController extends BaseController {
|
||||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.UP_MOVE)
|
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.UP_MOVE)
|
||||||
public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) {
|
public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) {
|
||||||
LoginUser loginUser = userTokenService.getLoginUser();
|
LoginUser loginUser = userTokenService.getLoginUser();
|
||||||
waresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
|
iBdWaresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -799,7 +767,7 @@ public class BdWaresController extends BaseController {
|
||||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.TOP)
|
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.TOP)
|
||||||
public AjaxResult floatingRoof(Integer waresId) {
|
public AjaxResult floatingRoof(Integer waresId) {
|
||||||
LoginUser loginUser = userTokenService.getLoginUser();
|
LoginUser loginUser = userTokenService.getLoginUser();
|
||||||
waresService.floatingRoof(waresId, loginUser);
|
iBdWaresService.floatingRoof(waresId, loginUser);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,7 +779,7 @@ public class BdWaresController extends BaseController {
|
||||||
@GetMapping("/botton-up")
|
@GetMapping("/botton-up")
|
||||||
public AjaxResult bottomUp(Integer waresId) {
|
public AjaxResult bottomUp(Integer waresId) {
|
||||||
LoginUser loginUser = userTokenService.getLoginUser();
|
LoginUser loginUser = userTokenService.getLoginUser();
|
||||||
waresService.bottomUp(waresId, loginUser);
|
iBdWaresService.bottomUp(waresId, loginUser);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -822,7 +790,7 @@ public class BdWaresController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/create-wares-code")
|
@GetMapping("/create-wares-code")
|
||||||
public AjaxResult createWaresCode() {
|
public AjaxResult createWaresCode() {
|
||||||
String waresCode = CreateNormsCodeUtils.createWaresCode(waresService.getLastWaresCode());
|
String waresCode = CreateNormsCodeUtils.createWaresCode(iBdWaresService.getLastWaresCode());
|
||||||
return AjaxResult.success(waresCode);
|
return AjaxResult.success(waresCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -834,7 +802,7 @@ public class BdWaresController extends BaseController {
|
||||||
@GetMapping("/create-wares-sort")
|
@GetMapping("/create-wares-sort")
|
||||||
public AjaxResult createWaresSort() {
|
public AjaxResult createWaresSort() {
|
||||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||||
Integer maxSort = waresService.getMaxSort(pkCountry);
|
Integer maxSort = iBdWaresService.getMaxSort(pkCountry);
|
||||||
if (maxSort == null) {
|
if (maxSort == null) {
|
||||||
maxSort = 0;
|
maxSort = 0;
|
||||||
}
|
}
|
||||||
|
@ -851,7 +819,7 @@ public class BdWaresController extends BaseController {
|
||||||
queryWrapper.eq(BdWares::getWaresName, waresName);
|
queryWrapper.eq(BdWares::getWaresName, waresName);
|
||||||
}
|
}
|
||||||
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
||||||
List<BdWares> list = waresService.list(queryWrapper);
|
List<BdWares> list = iBdWaresService.list(queryWrapper);
|
||||||
List<WaresEntnyOrderVo> resultList = new ArrayList<>();
|
List<WaresEntnyOrderVo> resultList = new ArrayList<>();
|
||||||
for (BdWares bdWares : list) {
|
for (BdWares bdWares : list) {
|
||||||
WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo();
|
WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo();
|
||||||
|
@ -862,7 +830,7 @@ public class BdWaresController extends BaseController {
|
||||||
waresEntnyOrderVo.setWaresPrice(bdWares.getWaresPrice());
|
waresEntnyOrderVo.setWaresPrice(bdWares.getWaresPrice());
|
||||||
waresEntnyOrderVo.setWaresAchieve(bdWares.getWaresAchieve());
|
waresEntnyOrderVo.setWaresAchieve(bdWares.getWaresAchieve());
|
||||||
|
|
||||||
List<BdWaresDetailExt> waresDetailList = waresDetailService.selectByPkWares(bdWares.getPkId());
|
List<BdWaresDetailExt> waresDetailList = iBdWaresDetailService.selectByPkWares(bdWares.getPkId());
|
||||||
List<ProductEntnyOrderVo> productEntnyOrderList = new ArrayList<>();
|
List<ProductEntnyOrderVo> productEntnyOrderList = new ArrayList<>();
|
||||||
for (BdWaresDetailExt bdWaresDetail : waresDetailList) {
|
for (BdWaresDetailExt bdWaresDetail : waresDetailList) {
|
||||||
ProductEntnyOrderVo productEntnyOrderVo = new ProductEntnyOrderVo();
|
ProductEntnyOrderVo productEntnyOrderVo = new ProductEntnyOrderVo();
|
||||||
|
@ -871,12 +839,12 @@ public class BdWaresController extends BaseController {
|
||||||
productEntnyOrderVo.setProductName(bdWaresDetail.getProductName());
|
productEntnyOrderVo.setProductName(bdWaresDetail.getProductName());
|
||||||
LambdaQueryWrapper<BdWaresSpecsSku> qw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsSku> qw = new LambdaQueryWrapper<>();
|
||||||
qw.eq(BdWaresSpecsSku::getPkWaresDetail, bdWaresDetail.getPkId());
|
qw.eq(BdWaresSpecsSku::getPkWaresDetail, bdWaresDetail.getPkId());
|
||||||
List<BdWaresSpecsSku> waresSpecsSkuList = waresSpecsSkuService.list(qw);
|
List<BdWaresSpecsSku> waresSpecsSkuList = iBdWaresSpecsSkuService.list(qw);
|
||||||
List<WaresSpecsEntnyOrterVo> waresSpecsEntnyOrterVoList = new ArrayList<>();
|
List<WaresSpecsEntnyOrterVo> waresSpecsEntnyOrterVoList = new ArrayList<>();
|
||||||
for (BdWaresSpecsSku bdWaresSpecsSku : waresSpecsSkuList) {
|
for (BdWaresSpecsSku bdWaresSpecsSku : waresSpecsSkuList) {
|
||||||
WaresSpecsEntnyOrterVo waresSpecsEntnyOrterVo = new WaresSpecsEntnyOrterVo();
|
WaresSpecsEntnyOrterVo waresSpecsEntnyOrterVo = new WaresSpecsEntnyOrterVo();
|
||||||
|
|
||||||
List<BdWaresSpecsRelationExt> waresSpecsRelation = waresSpecsRelationService.selectByWaresSpecsSku(bdWaresSpecsSku.getPkId());
|
List<BdWaresSpecsRelationExt> waresSpecsRelation = iBdWaresSpecsRelationService.selectByWaresSpecsSku(bdWaresSpecsSku.getPkId());
|
||||||
List<String> specsList = new ArrayList<>();
|
List<String> specsList = new ArrayList<>();
|
||||||
List<Integer> specsIds = new ArrayList<>();
|
List<Integer> specsIds = new ArrayList<>();
|
||||||
for (BdWaresSpecsRelationExt bdWaresSpecsRelation : waresSpecsRelation) {
|
for (BdWaresSpecsRelationExt bdWaresSpecsRelation : waresSpecsRelation) {
|
||||||
|
@ -906,7 +874,7 @@ public class BdWaresController extends BaseController {
|
||||||
public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) {
|
public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) {
|
||||||
List<EmptyOrderWares> resultList = new ArrayList<>();
|
List<EmptyOrderWares> resultList = new ArrayList<>();
|
||||||
for (int i = 0; i < emptyOrderWares.getPkWaresSpecsSkus().size(); i++) {
|
for (int i = 0; i < emptyOrderWares.getPkWaresSpecsSkus().size(); i++) {
|
||||||
BdWaresSpecsSkuExt ws = waresSpecsSkuService.selectByPkWaresSpecsSku(emptyOrderWares.getPkWaresSpecsSkus().get(i).getPkWaresSpecsSku());
|
BdWaresSpecsSkuExt ws = iBdWaresSpecsSkuService.selectByPkWaresSpecsSku(emptyOrderWares.getPkWaresSpecsSkus().get(i).getPkWaresSpecsSku());
|
||||||
EmptyOrderWares eo = new EmptyOrderWares();
|
EmptyOrderWares eo = new EmptyOrderWares();
|
||||||
eo.setSort(i + 1);
|
eo.setSort(i + 1);
|
||||||
eo.setPkWares(ws.getPkWares());
|
eo.setPkWares(ws.getPkWares());
|
||||||
|
@ -925,10 +893,10 @@ public class BdWaresController extends BaseController {
|
||||||
eo.setProductName(ws.getProductName());
|
eo.setProductName(ws.getProductName());
|
||||||
LambdaQueryWrapper<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
|
||||||
qer.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, ws.getPkId());
|
qer.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, ws.getPkId());
|
||||||
List<BdWaresSpecsRelation> waresSpecsRelation = waresSpecsRelationService.list(qer);
|
List<BdWaresSpecsRelation> waresSpecsRelation = iBdWaresSpecsRelationService.list(qer);
|
||||||
List<String> specsList = new ArrayList<>();
|
List<String> specsList = new ArrayList<>();
|
||||||
for (BdWaresSpecsRelation bdWaresSpecsRelation : waresSpecsRelation) {
|
for (BdWaresSpecsRelation bdWaresSpecsRelation : waresSpecsRelation) {
|
||||||
BdWaresSpecs waresSpecs = waresSpecsService.selectByPkId(bdWaresSpecsRelation.getPkWaresSpecs());
|
BdWaresSpecs waresSpecs = iBdWaresSpecsService.selectByPkId(bdWaresSpecsRelation.getPkWaresSpecs());
|
||||||
specsList.add(waresSpecs.getSpecsName());
|
specsList.add(waresSpecs.getSpecsName());
|
||||||
}
|
}
|
||||||
eo.setSpecsName(StringUtils.join(specsList, ","));
|
eo.setSpecsName(StringUtils.join(specsList, ","));
|
||||||
|
@ -953,7 +921,7 @@ public class BdWaresController extends BaseController {
|
||||||
}
|
}
|
||||||
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
|
||||||
queryWrapper.eq(BdWares::getSystemType, SecurityUtils.getSystemType());
|
queryWrapper.eq(BdWares::getSystemType, SecurityUtils.getSystemType());
|
||||||
List<BdWares> list = waresService.list(queryWrapper);
|
List<BdWares> list = iBdWaresService.list(queryWrapper);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -965,7 +933,7 @@ public class BdWaresController extends BaseController {
|
||||||
for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) {
|
for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) {
|
||||||
computeWaresPrice.setPkWares(computhParams.getPkWares());
|
computeWaresPrice.setPkWares(computhParams.getPkWares());
|
||||||
}
|
}
|
||||||
return AjaxResult.success(waresService.computeWaresPrice(computhParams.getComputeWaresPriceList(), computhParams.getSpecialArea()));
|
return AjaxResult.success(iBdWaresService.computeWaresPrice(computhParams.getComputeWaresPriceList(), computhParams.getSpecialArea()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -977,7 +945,7 @@ public class BdWaresController extends BaseController {
|
||||||
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.APPROVAL, remark = "商品新増审批")
|
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.APPROVAL, remark = "商品新増审批")
|
||||||
@PostMapping("/wares-approve")
|
@PostMapping("/wares-approve")
|
||||||
public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) {
|
public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) {
|
||||||
waresService.update(Wrappers.<BdWares>lambdaUpdate()
|
iBdWaresService.update(Wrappers.<BdWares>lambdaUpdate()
|
||||||
.eq(BdWares::getPkId, param.getPkWares())
|
.eq(BdWares::getPkId, param.getPkWares())
|
||||||
.eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue())
|
.eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue())
|
||||||
.set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue())
|
.set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue())
|
||||||
|
|
|
@ -16,9 +16,6 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品 Mapper 接口
|
* 商品 Mapper 接口
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-08
|
|
||||||
*/
|
*/
|
||||||
public interface BdWaresMapper extends BaseMapper<BdWares> {
|
public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
|
|
||||||
|
@ -32,9 +29,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
* @param waresCodeInList 包含的商品编号列表 -- 可为null
|
* @param waresCodeInList 包含的商品编号列表 -- 可为null
|
||||||
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
|
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
|
||||||
* @param pkCountry 所属国家
|
* @param pkCountry 所属国家
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/9/16 11:13
|
|
||||||
*/
|
*/
|
||||||
List<BdWaresExt> queryWaresByCondition(@Param("specialArea") Integer specialArea,
|
List<BdWaresExt> queryWaresByCondition(@Param("specialArea") Integer specialArea,
|
||||||
@Param("pkAreaClassify") Integer pkAreaClassify,
|
@Param("pkAreaClassify") Integer pkAreaClassify,
|
||||||
|
@ -115,9 +109,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
* @param pkAreaClassify 所属分类
|
* @param pkAreaClassify 所属分类
|
||||||
* @param waresName 名称
|
* @param waresName 名称
|
||||||
* @param pkCountry 所属国家
|
* @param pkCountry 所属国家
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/9/19 9:05
|
|
||||||
*/
|
*/
|
||||||
List<BdWaresExt> queryRecommendWaresByCondition(@Param("specialArea") Integer specialArea, @Param("pkAreaClassify") Integer pkAreaClassify,
|
List<BdWaresExt> queryRecommendWaresByCondition(@Param("specialArea") Integer specialArea, @Param("pkAreaClassify") Integer pkAreaClassify,
|
||||||
@Param("waresCode") String waresCode, @Param("waresName") String waresName, @Param("pkCountry") Integer pkCountry);
|
@Param("waresCode") String waresCode, @Param("waresName") String waresName, @Param("pkCountry") Integer pkCountry);
|
||||||
|
@ -141,7 +132,7 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
|
||||||
/**
|
/**
|
||||||
* 新零售查询商品列表
|
* 新零售查询商品列表
|
||||||
*
|
*
|
||||||
* @param param 查询参数
|
* @param param 查询参数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<BdWaresExt> listRetailWaresByCondition(@Param("param") RetailWaresParam param);
|
List<BdWaresExt> listRetailWaresByCondition(@Param("param") RetailWaresParam param);
|
||||||
|
|
|
@ -394,11 +394,6 @@ public class WaresParams implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer sortStatus;
|
private Integer sortStatus;
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起人收益(目前复购使用)
|
|
||||||
*/
|
|
||||||
private BigDecimal makerIncome;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统类型(2=新零售,3=美业)
|
* 系统类型(2=新零售,3=美业)
|
||||||
*/
|
*/
|
||||||
|
@ -414,4 +409,9 @@ public class WaresParams implements Serializable {
|
||||||
*/
|
*/
|
||||||
private BigDecimal areaIncome;
|
private BigDecimal areaIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
private BigDecimal boxNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,6 @@ import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品 服务类
|
* 商品 服务类
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-08
|
|
||||||
*/
|
*/
|
||||||
public interface IBdWaresService extends IService<BdWares> {
|
public interface IBdWaresService extends IService<BdWares> {
|
||||||
|
|
||||||
|
@ -58,9 +55,6 @@ public interface IBdWaresService extends IService<BdWares> {
|
||||||
* @param waresCodeInList 包含的商品编号列表 -- 可为null
|
* @param waresCodeInList 包含的商品编号列表 -- 可为null
|
||||||
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
|
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
|
||||||
* @param pkCountry 所属国家
|
* @param pkCountry 所属国家
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/9/19 9:05
|
|
||||||
*/
|
*/
|
||||||
List<BdWaresExt> queryWaresByCondition(Integer specialArea,
|
List<BdWaresExt> queryWaresByCondition(Integer specialArea,
|
||||||
Integer pkAreaClassify,
|
Integer pkAreaClassify,
|
||||||
|
@ -76,9 +70,6 @@ public interface IBdWaresService extends IService<BdWares> {
|
||||||
* @param pkAreaClassify 所属分类
|
* @param pkAreaClassify 所属分类
|
||||||
* @param waresName 名称
|
* @param waresName 名称
|
||||||
* @param pkCountry 所属国家
|
* @param pkCountry 所属国家
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/9/19 9:05
|
|
||||||
*/
|
*/
|
||||||
List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer pkCountry);
|
List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer pkCountry);
|
||||||
|
|
||||||
|
@ -147,11 +138,7 @@ public interface IBdWaresService extends IService<BdWares> {
|
||||||
void updateByAutoStartAndAutoStart(Date currentTime);
|
void updateByAutoStartAndAutoStart(Date currentTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 修改商品预售状态
|
* 修改商品预售状态
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2024/10/24 16:10
|
|
||||||
* @param: []
|
|
||||||
* @return: void
|
|
||||||
**/
|
**/
|
||||||
void waresPreSale();
|
void waresPreSale();
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RabbitTemplate rabbitTemplate;
|
private RabbitTemplate rabbitTemplate;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdSpecsService specsService;
|
private IBdSpecsService specsService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdWaresAuthorizeService waresAuthorizeService;
|
private IBdWaresAuthorizeService waresAuthorizeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -83,17 +83,17 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
private IBdWaresAuthorityService waresAuthorityService;
|
private IBdWaresAuthorityService waresAuthorityService;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ILabelServiceApi labelService;
|
ILabelServiceApi iLabelServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IMemberServiceApi memberServiceApi;
|
IMemberServiceApi iMemberServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ICurrencyServiceApi currencyServiceApi;
|
ICurrencyServiceApi iCurrencyServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IAwardsServiceApi awardsServiceApi;
|
IAwardsServiceApi iAwardsServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
IRangeServiceApi rangeServiceApi;
|
IRangeServiceApi iRangeServiceApi;
|
||||||
@DubboReference
|
@DubboReference
|
||||||
ITransactionServiceApi transactionServiceApi;
|
ITransactionServiceApi iTransactionServiceApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@ -101,9 +101,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
// 设置 wares 对象的值
|
// 设置 wares 对象的值
|
||||||
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
||||||
wares.setPkId(waresParams.getWaresId());
|
wares.setPkId(waresParams.getWaresId());
|
||||||
R<Integer> transaction = transactionServiceApi.createTransaction(user.getDataCountry(), ETransactionKey.SPEC, waresParams.getWaresName(), EYesNo.NO, EYesNo.NO);
|
|
||||||
wares.setWaresCode(waresParams.getWaresCode());
|
wares.setWaresCode(waresParams.getWaresCode());
|
||||||
wares.setPkTransaction(transaction.getData());
|
|
||||||
wares.setPkCreator(user.getUserId());
|
wares.setPkCreator(user.getUserId());
|
||||||
wares.setPkCountry(user.getDataCountry());
|
wares.setPkCountry(user.getDataCountry());
|
||||||
wares.setSystemType(user.getSystemType());
|
wares.setSystemType(user.getSystemType());
|
||||||
|
@ -115,17 +113,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
wares.setRemovalTime(DateUtils.currentDateTime());
|
wares.setRemovalTime(DateUtils.currentDateTime());
|
||||||
}
|
}
|
||||||
this.save(wares);
|
this.save(wares);
|
||||||
|
|
||||||
// 商品拓展表
|
// 商品拓展表
|
||||||
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
||||||
// 存入要转化美金
|
|
||||||
if (!waresParams.getSpecialArea().equals(ESpecialArea.REPURCHASE_AREA.getValue())) {
|
|
||||||
waresParams.setMakerIncome(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
if (null != waresParams.getMakerIncome()) {
|
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(user.getDataCountry());
|
|
||||||
waresExtend.setMakerIncome(waresParams.getMakerIncome().divide(currencyDto.getData().getInExchangeRate(), 6, BigDecimal.ROUND_HALF_UP));
|
|
||||||
}
|
|
||||||
// 处理系统类型
|
|
||||||
waresExtend.setSystemType(user.getSystemType());
|
waresExtend.setSystemType(user.getSystemType());
|
||||||
waresExtend.setPkWares(wares.getPkId());
|
waresExtend.setPkWares(wares.getPkId());
|
||||||
waresExtend.setPkCreator(user.getUserId());
|
waresExtend.setPkCreator(user.getUserId());
|
||||||
|
@ -148,9 +138,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
waresExtendService.save(waresExtend);
|
waresExtendService.save(waresExtend);
|
||||||
|
|
||||||
// 标签关联记录
|
// 标签关联记录
|
||||||
saveWaresLabel(wares, prefixLabel, coolLabel, waresParams.getPkGuaranteeLabel(), waresParams.getPkSellingPoint(), user);
|
saveWaresLabel(wares, prefixLabel, coolLabel, waresParams.getPkGuaranteeLabel(), waresParams.getPkSellingPoint(), user);
|
||||||
|
|
||||||
// 生成产品明细
|
// 生成产品明细
|
||||||
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
|
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
|
||||||
// 生成规格sku 表
|
// 生成规格sku 表
|
||||||
|
@ -363,7 +353,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
for (WaresAuthorityParam waresAuthorityParam : waresAuthorityList) {
|
for (WaresAuthorityParam waresAuthorityParam : waresAuthorityList) {
|
||||||
Long memberId = null;
|
Long memberId = null;
|
||||||
if (StringUtils.isNotBlank(waresAuthorityParam.getMemberCode())) {
|
if (StringUtils.isNotBlank(waresAuthorityParam.getMemberCode())) {
|
||||||
R<CuMember> member = memberServiceApi.getMember(waresAuthorityParam.getMemberCode());
|
R<CuMember> member = iMemberServiceApi.getMember(waresAuthorityParam.getMemberCode());
|
||||||
if (member.getData() == null) {
|
if (member.getData() == null) {
|
||||||
throw new BaseException("查询会员失败");
|
throw new BaseException("查询会员失败");
|
||||||
}
|
}
|
||||||
|
@ -524,19 +514,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改商品基础信息
|
|
||||||
*
|
|
||||||
* @param waresParams
|
|
||||||
* @param user
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateWares(WaresParams waresParams, LoginUser user) {
|
public void updateWares(WaresParams waresParams, LoginUser user) {
|
||||||
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
|
||||||
wares.setPkId(waresParams.getWaresId());
|
wares.setPkId(waresParams.getWaresId());
|
||||||
R<Integer> transaction = transactionServiceApi.createTransaction(user.getDataCountry(), ETransactionKey.SPEC, waresParams.getWaresName(), EYesNo.NO, EYesNo.NO);
|
|
||||||
wares.setPkTransaction(transaction.getData());
|
|
||||||
if (waresParams.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
|
if (waresParams.getIsPutOn().equals(EYesNo.YES.getIntValue())) {
|
||||||
wares.setListingTime(DateUtils.currentDateTime());
|
wares.setListingTime(DateUtils.currentDateTime());
|
||||||
}
|
}
|
||||||
|
@ -550,19 +532,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
|
|
||||||
// 商品拓展表
|
// 商品拓展表
|
||||||
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
BdWaresExtend waresExtend = BeanUtil.copyProperties(waresParams, BdWaresExtend.class);
|
||||||
// 存入要转化美金
|
|
||||||
if (!waresParams.getSpecialArea().equals(ESpecialArea.REPURCHASE_AREA.getValue())) {
|
|
||||||
waresParams.setMakerIncome(BigDecimal.ZERO);
|
|
||||||
}
|
|
||||||
if (null != waresParams.getMakerIncome()) {
|
|
||||||
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(user.getDataCountry());
|
|
||||||
waresExtend.setMakerIncome(waresParams.getMakerIncome().divide(currencyDto.getData().getInExchangeRate(), 6, BigDecimal.ROUND_HALF_UP));
|
|
||||||
}
|
|
||||||
// 处理系统类型
|
|
||||||
waresExtend.setSystemType(user.getSystemType());
|
waresExtend.setSystemType(user.getSystemType());
|
||||||
waresExtend.setPkWares(wares.getPkId());
|
waresExtend.setPkWares(wares.getPkId());
|
||||||
waresExtend.setPkModified(user.getUserId());
|
waresExtend.setPkModified(user.getUserId());
|
||||||
waresExtend.setModifiedTime(new Date());
|
waresExtend.setModifiedTime(new Date());
|
||||||
|
|
||||||
// 根据商品id 修改信息
|
// 根据商品id 修改信息
|
||||||
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(BdWaresExtend::getPkWares, wares.getPkId());
|
queryWrapper.eq(BdWaresExtend::getPkWares, wares.getPkId());
|
||||||
|
@ -593,12 +567,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
saveWaresLabel(wares, prefixLabel, coolLabel, waresParams.getPkGuaranteeLabel(), waresParams.getPkSellingPoint(), user);
|
saveWaresLabel(wares, prefixLabel, coolLabel, waresParams.getPkGuaranteeLabel(), waresParams.getPkSellingPoint(), user);
|
||||||
// 生成产品明细
|
// 生成产品明细
|
||||||
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
|
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
|
||||||
|
|
||||||
// 生成规格sku 表
|
// 生成规格sku 表
|
||||||
saveWaresSpecsSku(wares, waresParams.getWaresSpecsSkuList(), user);
|
saveWaresSpecsSku(wares, waresParams.getWaresSpecsSkuList(), user);
|
||||||
// 团队配置
|
// 团队配置
|
||||||
saveWaresAuthority(wares, waresParams.getWaresAuthorityList(), user);
|
saveWaresAuthority(wares, waresParams.getWaresAuthorityList(), user);
|
||||||
|
// 生成商品级差
|
||||||
saveWaresRange(wares, waresParams.getWaresRangeList(), user);
|
saveWaresRange(wares, waresParams.getWaresRangeList(), user);
|
||||||
|
|
||||||
// 产品包装新增
|
// 产品包装新增
|
||||||
|
@ -626,7 +599,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
queryWrapper1.eq(BdWaresAwards::getPkWares, wares.getPkId());
|
queryWrapper1.eq(BdWaresAwards::getPkWares, wares.getPkId());
|
||||||
waresAwardsService.remove(queryWrapper1);
|
waresAwardsService.remove(queryWrapper1);
|
||||||
// 校验奖衔id 是否存在
|
// 校验奖衔id 是否存在
|
||||||
R<List<BdAwards>> awardsDto = awardsServiceApi.queryAwards(waresParams.getPkCountry());
|
R<List<BdAwards>> awardsDto = iAwardsServiceApi.queryAwards(waresParams.getPkCountry());
|
||||||
List<BdAwards> awardsList = awardsDto.getData();
|
List<BdAwards> awardsList = awardsDto.getData();
|
||||||
List<Integer> waresAwardsIdList = new ArrayList<>();
|
List<Integer> waresAwardsIdList = new ArrayList<>();
|
||||||
for (BdAwards bdAwards : awardsList) {
|
for (BdAwards bdAwards : awardsList) {
|
||||||
|
@ -752,11 +725,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, log);
|
rabbitTemplate.convertAndSend(RabbitMqConstants.BUSINESS_LOG_EXCHANGE, RabbitMqConstants.BUSINESS_LOG_KEY, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除商品
|
|
||||||
*
|
|
||||||
* @param pkId
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void removeWares(Integer pkId, LoginUser loginUser) {
|
public void removeWares(Integer pkId, LoginUser loginUser) {
|
||||||
|
@ -846,22 +814,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据商品外键查询商品
|
|
||||||
*
|
|
||||||
* @param waresId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public BdWares getWares(Integer waresId) {
|
public BdWares getWares(Integer waresId) {
|
||||||
return baseMapper.selectById(waresId);
|
return baseMapper.selectById(waresId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询最末商品编号
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getLastWaresCode() {
|
public String getLastWaresCode() {
|
||||||
return baseMapper.getLastWaresCode();
|
return baseMapper.getLastWaresCode();
|
||||||
|
@ -872,13 +829,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
return baseMapper.selectByWaresInfo(waresParams);
|
return baseMapper.selectByWaresInfo(waresParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 上移 下移
|
|
||||||
*
|
|
||||||
* @param waresId
|
|
||||||
* @param waresMoveType
|
|
||||||
* @param specialArea 所属专区
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void waresMove(Integer waresId, Integer waresMoveType, LoginUser loginUser, Integer specialArea) {
|
public void waresMove(Integer waresId, Integer waresMoveType, LoginUser loginUser, Integer specialArea) {
|
||||||
BdWares bdWares = baseMapper.selectById(waresId);
|
BdWares bdWares = baseMapper.selectById(waresId);
|
||||||
|
@ -975,13 +925,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
return baseMapper.selectByMoveDownSort(waresId, specialArea);
|
return baseMapper.selectByMoveDownSort(waresId, specialArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 置顶
|
|
||||||
*
|
|
||||||
* @param waresId
|
|
||||||
* @param loginUser
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void floatingRoof(Integer waresId, LoginUser loginUser) {
|
public void floatingRoof(Integer waresId, LoginUser loginUser) {
|
||||||
BdWares bdWares = new BdWares();
|
BdWares bdWares = new BdWares();
|
||||||
|
@ -990,22 +933,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
this.updateById(bdWares);
|
this.updateById(bdWares);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取最大商品序号
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getMaxSort(Integer pkCountry) {
|
public Integer getMaxSort(Integer pkCountry) {
|
||||||
return baseMapper.getMaxSort(pkCountry);
|
return baseMapper.getMaxSort(pkCountry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据商品编号查询商品信息
|
|
||||||
*
|
|
||||||
* @param waresCodeList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<BdAgreement> selectByWaresCodeList(List<String> waresCodeList) {
|
public List<BdAgreement> selectByWaresCodeList(List<String> waresCodeList) {
|
||||||
return baseMapper.selectByWaresCodeList(waresCodeList);
|
return baseMapper.selectByWaresCodeList(waresCodeList);
|
||||||
|
@ -1017,17 +949,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
return baseMapper.queryWaresByCondition(specialArea, pkAreaClassify, null, waresName, waresCodeInList, waresCodeNotInList, pkCountry);
|
return baseMapper.queryWaresByCondition(specialArea, pkAreaClassify, null, waresName, waresCodeInList, waresCodeNotInList, pkCountry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据条件查询推荐商品 ,专区商品列表
|
|
||||||
*
|
|
||||||
* @param specialArea 所属专区
|
|
||||||
* @param pkAreaClassify 所属分类
|
|
||||||
* @param waresName 名称
|
|
||||||
* @param pkCountry 所属国家
|
|
||||||
* @return: List<BdWaresExt>
|
|
||||||
* @Author: sui q
|
|
||||||
* @Date: 2022/9/19 9:05
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer pkCountry) {
|
public List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer pkCountry) {
|
||||||
return baseMapper.queryRecommendWaresByCondition(specialArea, pkAreaClassify, null, waresName, pkCountry);
|
return baseMapper.queryRecommendWaresByCondition(specialArea, pkAreaClassify, null, waresName, pkCountry);
|
||||||
|
@ -1035,7 +956,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
|
|
||||||
private BdLabel getBdLabel(Integer pkId) {
|
private BdLabel getBdLabel(Integer pkId) {
|
||||||
BdLabel bdLabel;
|
BdLabel bdLabel;
|
||||||
R<LabelConfigDTO> result = labelService.getByPkId(pkId);
|
R<LabelConfigDTO> result = iLabelServiceApi.getByPkId(pkId);
|
||||||
if (result.isSuccess()) {
|
if (result.isSuccess()) {
|
||||||
bdLabel = BeanUtil.copyProperties(result.getData(), BdLabel.class);
|
bdLabel = BeanUtil.copyProperties(result.getData(), BdLabel.class);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1044,53 +965,30 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
|
||||||
return bdLabel;
|
return bdLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改自动上下架状态(自动上架)
|
|
||||||
*
|
|
||||||
* @param currentTime 当前时间
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void updateByAutoStartAndAutoStart(Date currentTime) {
|
public void updateByAutoStartAndAutoStart(Date currentTime) {
|
||||||
baseMapper.updateByAutoStartAndAutoStart(currentTime);
|
baseMapper.updateByAutoStartAndAutoStart(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @description: 修改商品预售状态
|
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2024/10/24 16:10
|
|
||||||
* @param: []
|
|
||||||
* @return: void
|
|
||||||
**/
|
|
||||||
@Override
|
@Override
|
||||||
public void waresPreSale() {
|
public void waresPreSale() {
|
||||||
baseMapper.waresPreSale();
|
baseMapper.waresPreSale();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改自动上下架状态(自动下架)
|
|
||||||
*
|
|
||||||
* @param currentTime 当前时间
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void updateByAutoStartAndAutoEnd(Date currentTime) {
|
public void updateByAutoStartAndAutoEnd(Date currentTime) {
|
||||||
baseMapper.updateByAutoStartAndAutoEnd(currentTime);
|
baseMapper.updateByAutoStartAndAutoEnd(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算商品业绩
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, Integer specialArea) {
|
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, Integer specialArea) {
|
||||||
// 极差
|
// 极差
|
||||||
R<List<BdRangeExt>> rangeDto = rangeServiceApi.queryRange(SecurityUtils.getPkCountry());
|
R<List<BdRangeExt>> rangeDto = iRangeServiceApi.queryRange(SecurityUtils.getPkCountry());
|
||||||
List<BdRangeExt> rangeList = rangeDto.getData();
|
List<BdRangeExt> rangeList = rangeDto.getData();
|
||||||
rangeList = rangeList.stream().filter(range -> range.getSystemType().equals(ESystemType.DEFAULT.getValue())).collect(Collectors.toList());
|
rangeList = rangeList.stream().filter(range -> range.getSystemType().equals(ESystemType.DEFAULT.getValue())).collect(Collectors.toList());
|
||||||
return computeWaresPrice(computeWaresPriceList, rangeList);
|
return computeWaresPrice(computeWaresPriceList, rangeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算商品业绩
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, List<BdRangeExt> rangeList) {
|
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, List<BdRangeExt> rangeList) {
|
||||||
// 极差
|
// 极差
|
||||||
|
|
|
@ -1,21 +1,7 @@
|
||||||
package com.hzs.sale.wares.vo;/**
|
package com.hzs.sale.wares.vo;
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2024/9/11 13:24
|
|
||||||
* @Classname: WaresDetailVo
|
|
||||||
* @PackageName: com.hzs.sale.wares.vo
|
|
||||||
*/
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
|
||||||
*@BelongsProject: hzs_cloud
|
|
||||||
*@BelongsPackage: com.hzs.sale.wares.vo
|
|
||||||
*@Author: yh
|
|
||||||
*@CreateTime: 2024-09-11 13:24
|
|
||||||
*@Description: TODO
|
|
||||||
*@Version: 1.0
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class WaresProductDetailVo {
|
public class WaresProductDetailVo {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,13 +11,6 @@ import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description:
|
|
||||||
* @Author: yuhui
|
|
||||||
* @Time: 2022/11/9 11:02
|
|
||||||
* @Classname: WaresVo
|
|
||||||
* @PackageName: com.hzs.sale.wares.vo
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
public class WaresVo {
|
public class WaresVo {
|
||||||
|
|
||||||
|
@ -65,14 +58,6 @@ public class WaresVo {
|
||||||
@BigDecimalFormat("#0.0000")
|
@BigDecimalFormat("#0.0000")
|
||||||
private BigDecimal waresAchieve;
|
private BigDecimal waresAchieve;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发起人收益(目前复购使用)
|
|
||||||
*/
|
|
||||||
@Excel(name = "发起人收益(¥)", scale = 2)
|
|
||||||
@BigDecimalFormat
|
|
||||||
private BigDecimal makerIncome;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付比例名称
|
* 支付比例名称
|
||||||
*/
|
*/
|
||||||
|
@ -116,16 +101,17 @@ public class WaresVo {
|
||||||
*/
|
*/
|
||||||
@Excel(name = "产品数量")
|
@Excel(name = "产品数量")
|
||||||
private String productQuantitys;
|
private String productQuantitys;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属专区
|
* 所属专区
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer specialArea;
|
private Integer specialArea;
|
||||||
/**
|
/**
|
||||||
* 所属专区
|
* 所属专区
|
||||||
*/
|
*/
|
||||||
@Excel(name = "所属专区")
|
@Excel(name = "所属专区")
|
||||||
private String specialAreaVal;
|
private String specialAreaVal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否单品
|
* 是否单品
|
||||||
*/
|
*/
|
||||||
|
@ -163,16 +149,17 @@ public class WaresVo {
|
||||||
* 是否推荐
|
* 是否推荐
|
||||||
*/
|
*/
|
||||||
private String isRecommendVal;
|
private String isRecommendVal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应方式(经营范围)
|
* 供应方式(经营范围)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer operateScope;
|
private Integer operateScope;
|
||||||
/**
|
/**
|
||||||
* 供应方式(经营范围)
|
* 供应方式(经营范围)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "供应方式")
|
@Excel(name = "供应方式")
|
||||||
private String operateScopeVal;
|
private String operateScopeVal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否出售
|
* 是否出售
|
||||||
*/
|
*/
|
||||||
|
@ -184,12 +171,11 @@ public class WaresVo {
|
||||||
*/
|
*/
|
||||||
@Excel(name = "上架状态", readConverterExp = "0=上架,1=下架")
|
@Excel(name = "上架状态", readConverterExp = "0=上架,1=下架")
|
||||||
private Integer isPutOn;
|
private Integer isPutOn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预售状态
|
* 预售状态
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer preSaleStatus;
|
private Integer preSaleStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预售状态
|
* 预售状态
|
||||||
*/
|
*/
|
||||||
|
@ -305,4 +291,14 @@ public class WaresVo {
|
||||||
*/
|
*/
|
||||||
private Date waresApprovalTime;
|
private Date waresApprovalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复购区域分红
|
||||||
|
*/
|
||||||
|
private BigDecimal areaIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
private BigDecimal boxNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,6 @@
|
||||||
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
||||||
<result column="EDIT_FLAG" property="editFlag"/>
|
<result column="EDIT_FLAG" property="editFlag"/>
|
||||||
<result column="WARES_CODE" property="waresCode"/>
|
<result column="WARES_CODE" property="waresCode"/>
|
||||||
<result column="MAKER_INCOME" property="makerIncome"/>
|
|
||||||
<result column="ITEM_PK_STOREHOUSE" property="pkStorehouse"/>
|
<result column="ITEM_PK_STOREHOUSE" property="pkStorehouse"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
|
@ -4,39 +4,56 @@
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.product.BdProductExtend">
|
<resultMap id="BaseResultMap" type="com.hzs.common.domain.sale.product.BdProductExtend">
|
||||||
<id column="PK_ID" property="pkId" />
|
<id column="PK_ID" property="pkId"/>
|
||||||
<result column="PK_PRODUCT" property="pkProduct" />
|
<result column="PK_PRODUCT" property="pkProduct"/>
|
||||||
<result column="IS_PICK_UP" property="isPickUp" />
|
<result column="IS_PICK_UP" property="isPickUp"/>
|
||||||
<result column="IS_PRIZE" property="isPrize" />
|
<result column="IS_PRIZE" property="isPrize"/>
|
||||||
<result column="IS_BAR_CODE" property="isBarCode" />
|
<result column="IS_BAR_CODE" property="isBarCode"/>
|
||||||
<result column="IS_MERGE" property="isMerge" />
|
<result column="IS_MERGE" property="isMerge"/>
|
||||||
<result column="IS_GIFT" property="isGift" />
|
<result column="IS_GIFT" property="isGift"/>
|
||||||
<result column="IS_PUT_ON" property="isPutOn" />
|
<result column="IS_PUT_ON" property="isPutOn"/>
|
||||||
<result column="WARNING_QUANTITY" property="warningQuantity" />
|
<result column="WARNING_QUANTITY" property="warningQuantity"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectByProductId" resultMap="BaseResultMap">
|
<select id="selectByProductId" resultMap="BaseResultMap">
|
||||||
select * from BD_PRODUCT_EXTEND where PK_PRODUCT = #{pkProduct} and DEL_FLAG = '0'
|
select *
|
||||||
|
from BD_PRODUCT_EXTEND
|
||||||
|
where PK_PRODUCT = #{pkProduct}
|
||||||
|
and DEL_FLAG = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByMoveUpSort" resultType="integer">
|
<select id="selectByMoveUpSort" resultType="integer">
|
||||||
select min(ex.SORT) FROM BD_PRODUCT_EXTEND ex where ex.SORT > (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct} ) and DEL_FLAG = '0'
|
select min(ex.SORT)
|
||||||
|
FROM BD_PRODUCT_EXTEND ex
|
||||||
|
where ex.SORT > (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct})
|
||||||
|
and DEL_FLAG = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateMoveUpBySort">
|
<update id="updateMoveUpBySort">
|
||||||
update BD_PRODUCT_EXTEND set sort = sort+1 where sort >= #{sort} and DEL_FLAG = '0'
|
update BD_PRODUCT_EXTEND
|
||||||
|
set sort = sort + 1
|
||||||
|
where sort >= #{sort}
|
||||||
|
and DEL_FLAG = '0'
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectByMoveDownSort" resultType="integer">
|
<select id="selectByMoveDownSort" resultType="integer">
|
||||||
select max(ex.SORT) FROM BD_PRODUCT_EXTEND ex where ex.SORT < (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct} ) and DEL_FLAG = '0'
|
select max(ex.SORT)
|
||||||
|
FROM BD_PRODUCT_EXTEND ex
|
||||||
|
where ex.SORT < (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct})
|
||||||
|
and DEL_FLAG = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateMoveDownBySort">
|
<update id="updateMoveDownBySort">
|
||||||
update BD_PRODUCT_EXTEND set sort = sort-1 where sort <= #{sort} and DEL_FLAG = '0'
|
update BD_PRODUCT_EXTEND
|
||||||
|
set sort = sort - 1
|
||||||
|
where sort <= #{sort}
|
||||||
|
and DEL_FLAG = '0'
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getMaxProductSort" resultType="integer">
|
<select id="getMaxProductSort" resultType="integer">
|
||||||
select max(sort) from BD_PRODUCT_EXTEND where DEL_FLAG = '0'
|
select max(sort)
|
||||||
|
from BD_PRODUCT_EXTEND
|
||||||
|
where DEL_FLAG = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询产品扩展以及产品信息 -->
|
<!-- 查询产品扩展以及产品信息 -->
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<result column="PK_SPECIAL_CURRENCY" property="pkSpecialCurrency"/>
|
<result column="PK_SPECIAL_CURRENCY" property="pkSpecialCurrency"/>
|
||||||
<result column="SYSTEM_TYPE" property="systemType"/>
|
<result column="SYSTEM_TYPE" property="systemType"/>
|
||||||
<result column="AREA_INCOME" property="areaIncome"/>
|
<result column="AREA_INCOME" property="areaIncome"/>
|
||||||
|
<result column="BOX_NUM" property="boxNum"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="resultMap" type="com.hzs.sale.wares.vo.WaresVo">
|
<resultMap id="resultMap" type="com.hzs.sale.wares.vo.WaresVo">
|
||||||
|
@ -81,11 +82,12 @@
|
||||||
<result column="SORT_STATUS" property="sortStatus"/>
|
<result column="SORT_STATUS" property="sortStatus"/>
|
||||||
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
|
||||||
<result column="TEMP_NAME" property="tempName"/>
|
<result column="TEMP_NAME" property="tempName"/>
|
||||||
<result column="MAKER_INCOME" property="makerIncome"/>
|
|
||||||
<result column="SYSTEM_TYPE" property="systemType"/>
|
<result column="SYSTEM_TYPE" property="systemType"/>
|
||||||
<result column="WARES_STATUS" property="waresStatus"/>
|
<result column="WARES_STATUS" property="waresStatus"/>
|
||||||
<result column="WARES_APPROVER" property="waresApprover"/>
|
<result column="WARES_APPROVER" property="waresApprover"/>
|
||||||
<result column="WARES_APPROVAL_TIME" property="waresApprovalTime"/>
|
<result column="WARES_APPROVAL_TIME" property="waresApprovalTime"/>
|
||||||
|
<result column="AREA_INCOME" property="areaIncome"/>
|
||||||
|
<result column="BOX_NUM" property="boxNum"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 根据条件查询商品信息 -->
|
<!-- 根据条件查询商品信息 -->
|
||||||
|
@ -156,7 +158,8 @@
|
||||||
bw.SORT,bw.COVER,bw.WARES_NAME,bw.WARES_CODE,bw.WARES_PRICE,bw.WARES_ACHIEVE,bw.SPECIAL_AREA ,bw.IS_SINGLE,bw.IS_FREE_MAIL,
|
bw.SORT,bw.COVER,bw.WARES_NAME,bw.WARES_CODE,bw.WARES_PRICE,bw.WARES_ACHIEVE,bw.SPECIAL_AREA ,bw.IS_SINGLE,bw.IS_FREE_MAIL,
|
||||||
ac.CLASSIFY_NAME,we.OPERATE_SCOPE,we.IS_SALE,we.IS_PUT_ON,we.PRE_SALE_STATUS,bw.PK_ID,we.ARRIVAL_TIME,we.PUT_ON_TIME,we.PUT_OFF_TIME,
|
ac.CLASSIFY_NAME,we.OPERATE_SCOPE,we.IS_SALE,we.IS_PUT_ON,we.PRE_SALE_STATUS,bw.PK_ID,we.ARRIVAL_TIME,we.PUT_ON_TIME,we.PUT_OFF_TIME,
|
||||||
we.SALES actualSales,we.SALES,bw.CREATION_TIME,bw.IS_RECOMMEND,bw.LISTING_TIME,bw.REMOVAL_TIME,bw.SORT_STATUS,we.IS_MAKER_GIFT,
|
we.SALES actualSales,we.SALES,bw.CREATION_TIME,bw.IS_RECOMMEND,bw.LISTING_TIME,bw.REMOVAL_TIME,bw.SORT_STATUS,we.IS_MAKER_GIFT,
|
||||||
sc.TEMP_NAME, we.maker_income, nvl(we.SYSTEM_TYPE, 2) SYSTEM_TYPE, bw.WARES_STATUS
|
sc.TEMP_NAME, we.maker_income, nvl(we.SYSTEM_TYPE, 2) SYSTEM_TYPE, bw.WARES_STATUS,
|
||||||
|
AREA_INCOME, BOX_NUM
|
||||||
from bd_wares bw
|
from bd_wares bw
|
||||||
left join BD_WARES_EXTEND we on we.PK_WARES = bw.PK_ID
|
left join BD_WARES_EXTEND we on we.PK_WARES = bw.PK_ID
|
||||||
left join BD_AREA_CLASSIFY ac on ac.PK_ID = bw.PK_AREA_CLASSIFY
|
left join BD_AREA_CLASSIFY ac on ac.PK_ID = bw.PK_AREA_CLASSIFY
|
||||||
|
|
|
@ -44,23 +44,18 @@ import java.util.stream.Collectors;
|
||||||
@RequestMapping("/pub/enums")
|
@RequestMapping("/pub/enums")
|
||||||
public class EnumsController extends BaseController {
|
public class EnumsController extends BaseController {
|
||||||
|
|
||||||
private IBdSystemConfigService bdSystemConfigService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setBdSystemConfigService(IBdSystemConfigService bdSystemConfigService) {
|
private IBdSystemConfigService iBdSystemConfigService;
|
||||||
this.bdSystemConfigService = bdSystemConfigService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdAccountService iBdAccountService;
|
private IBdAccountService iBdAccountService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdGradeService gradeService;
|
private IBdGradeService iBdGradeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdAwardsService awardsService;
|
private IBdAwardsService iBdAwardsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdCountryService countryService;
|
private IBdCountryService iBdCountryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdServiceChargeService serviceChargeService;
|
private IBdServiceChargeService iBdServiceChargeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdDeliveryService iBdDeliveryService;
|
private IBdDeliveryService iBdDeliveryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -226,11 +221,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 奖衔级别
|
* 奖衔级别
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/10/17 10:53
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/awardsLevelList")
|
@GetMapping("/awardsLevelList")
|
||||||
public AjaxResult awardsLevelList() {
|
public AjaxResult awardsLevelList() {
|
||||||
|
@ -416,11 +407,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 直推配置取值枚举
|
* 直推配置取值枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/6/2 16:32
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/take-value-type")
|
@GetMapping("/take-value-type")
|
||||||
public AjaxResult takeValueType() {
|
public AjaxResult takeValueType() {
|
||||||
|
@ -432,29 +419,21 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 专区枚举list
|
* 专区枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/29 16:29
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/special-area")
|
@GetMapping("/special-area")
|
||||||
public AjaxResult specialArea() {
|
public AjaxResult specialArea() {
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (ESpecialArea value : ESpecialArea.values()) {
|
for (ESpecialArea value : ESpecialArea.values()) {
|
||||||
if (value.getEnable() == EnableStatus.ENABLE.getValue()) {
|
if (value.getEnable() == EnableStatus.ENABLE.getValue()) {
|
||||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.SPECIAL_AREA));
|
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success(enumEntityList);
|
return AjaxResult.success(enumEntityList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 控制类型枚举
|
* 控制类型枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2024/6/24 10:47
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/authority-control-type")
|
@GetMapping("/authority-control-type")
|
||||||
public AjaxResult authorityControlType() {
|
public AjaxResult authorityControlType() {
|
||||||
|
@ -466,11 +445,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 地区类型枚举
|
* 地区类型枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/29 16:29
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.page.TableDataInfo
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/areaType")
|
@GetMapping("/areaType")
|
||||||
public AjaxResult areaType() {
|
public AjaxResult areaType() {
|
||||||
|
@ -484,11 +459,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 专区枚举-消费配置专用
|
* 专区枚举-消费配置专用
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/5/8 15:10
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/special-area-consume")
|
@GetMapping("/special-area-consume")
|
||||||
public AjaxResult specialAreaConsume() {
|
public AjaxResult specialAreaConsume() {
|
||||||
|
@ -500,11 +471,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 注水业绩枚举
|
* 注水业绩枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/3/28 17:52
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/member-achieve")
|
@GetMapping("/member-achieve")
|
||||||
public AjaxResult memberAchieve() {
|
public AjaxResult memberAchieve() {
|
||||||
|
@ -516,11 +483,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 注水方式枚举
|
* 注水方式枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2023/4/11 14:52
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/member-watertype")
|
@GetMapping("/member-watertype")
|
||||||
public AjaxResult watertype() {
|
public AjaxResult watertype() {
|
||||||
|
@ -532,11 +495,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 统计值枚举
|
* 统计值枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 14:30
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult STATISTICAL_VALUE
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/statistical-value")
|
@GetMapping("/statistical-value")
|
||||||
public AjaxResult statisticalValue() {
|
public AjaxResult statisticalValue() {
|
||||||
|
@ -548,11 +507,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 注册权限
|
* 注册权限
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 14:57
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/registration-authority")
|
@GetMapping("/registration-authority")
|
||||||
public AjaxResult registrationAuthority() {
|
public AjaxResult registrationAuthority() {
|
||||||
|
@ -564,11 +519,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 关系类型
|
* 关系类型
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 14:59
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/relation-type")
|
@GetMapping("/relation-type")
|
||||||
public AjaxResult relationType() {
|
public AjaxResult relationType() {
|
||||||
|
@ -580,11 +531,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 极差类型
|
* 级差类型
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 15:18
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/range-type")
|
@GetMapping("/range-type")
|
||||||
public AjaxResult rangeType() {
|
public AjaxResult rangeType() {
|
||||||
|
@ -597,11 +544,7 @@ public class EnumsController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 计算类型
|
* 计算类型
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 15:24
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/cal-type")
|
@GetMapping("/cal-type")
|
||||||
public AjaxResult calType() {
|
public AjaxResult calType() {
|
||||||
|
@ -613,11 +556,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 货币种类
|
* 货币种类
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 15:34
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/account")
|
@GetMapping("/account")
|
||||||
public AjaxResult account() {
|
public AjaxResult account() {
|
||||||
|
@ -629,11 +568,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 账户状态(会员登录账户)
|
* 账户状态(会员登录账户)
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 15:38
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/account-status")
|
@GetMapping("/account-status")
|
||||||
public AjaxResult accountStatus() {
|
public AjaxResult accountStatus() {
|
||||||
|
@ -645,11 +580,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 活动类型
|
* 活动类型
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2022/9/30 15:40
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/activity-type")
|
@GetMapping("/activity-type")
|
||||||
public AjaxResult activityType() {
|
public AjaxResult activityType() {
|
||||||
|
@ -664,7 +595,8 @@ public class EnumsController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 条码状态
|
* 条码状态
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/9/30 15:52
|
* @date: 2022/9/30 15:52
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -680,7 +612,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 会员类型
|
* 会员类型
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/9/30 16:26
|
* @date: 2022/9/30 16:26
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -696,7 +629,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 发货方式
|
* 发货方式
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/9/30 16:28
|
* @date: 2022/9/30 16:28
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -720,7 +654,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 发货状态
|
* 发货状态
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/9/30 16:30
|
* @date: 2022/9/30 16:30
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -736,7 +671,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 首页banner类型枚举类
|
* 首页banner类型枚举类
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/13 11:27
|
* @date: 2022/10/13 11:27
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -752,7 +688,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 转账特殊设置枚举
|
* 转账特殊设置枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 9:58
|
* @date: 2022/10/21 9:58
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -768,7 +705,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 用户状态枚举
|
* 用户状态枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 17:39
|
* @date: 2022/10/21 17:39
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -784,7 +722,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 钱包状态枚举
|
* 钱包状态枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 17:41
|
* @date: 2022/10/21 17:41
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -800,7 +739,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 商品权限类型枚举
|
* 商品权限类型枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 17:44
|
* @date: 2022/10/21 17:44
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -816,7 +756,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 是否经销商枚举类
|
* 是否经销商枚举类
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 17:46
|
* @date: 2022/10/21 17:46
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -832,7 +773,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 系统是否枚举类
|
* 系统是否枚举类
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/10/21 17:46
|
* @date: 2022/10/21 17:46
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -859,7 +801,7 @@ public class EnumsController extends BaseController {
|
||||||
if (pkCountry == null) {
|
if (pkCountry == null) {
|
||||||
pkCountry = SecurityUtils.getPkCountry();
|
pkCountry = SecurityUtils.getPkCountry();
|
||||||
}
|
}
|
||||||
return AjaxResult.success(bdSystemConfigService.getTransportTypeEnumEntity(pkCountry));
|
return AjaxResult.success(iBdSystemConfigService.getTransportTypeEnumEntity(pkCountry));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -869,7 +811,7 @@ public class EnumsController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/manager-transport-type")
|
@GetMapping("/manager-transport-type")
|
||||||
public AjaxResult getManagerTransportTypeList() {
|
public AjaxResult getManagerTransportTypeList() {
|
||||||
return AjaxResult.success(bdSystemConfigService.getTransportTypeEnumEntity(SecurityUtils.getPkCountry()));
|
return AjaxResult.success(iBdSystemConfigService.getTransportTypeEnumEntity(SecurityUtils.getPkCountry()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1139,7 +1081,7 @@ public class EnumsController extends BaseController {
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (EOrderType value : EOrderType.values()) {
|
for (EOrderType value : EOrderType.values()) {
|
||||||
if (value.getEnable() == EYesNo.YES.getIntValue()) {
|
if (value.getEnable() == EYesNo.YES.getIntValue()) {
|
||||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel(), EnumsPrefixConstants.ORDER_TYPE));
|
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.success(enumEntityList);
|
return AjaxResult.success(enumEntityList);
|
||||||
|
@ -1221,7 +1163,8 @@ public class EnumsController extends BaseController {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 奖项枚举类
|
* 奖项枚举类
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/9 19:54
|
* @date: 2022/11/9 19:54
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1255,7 +1198,8 @@ public class EnumsController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 公布日期、发布日期、可提现日期 枚举
|
* 公布日期、发布日期、可提现日期 枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/9 19:55
|
* @date: 2022/11/9 19:55
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1271,7 +1215,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 奖结算周期枚举
|
* 奖结算周期枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/9 19:56
|
* @date: 2022/11/9 19:56
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1345,7 +1290,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 订单来源枚举
|
* 订单来源枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/17 14:56
|
* @date: 2022/11/17 14:56
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1361,7 +1307,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 是否认证枚举
|
* 是否认证枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/17 15:05
|
* @date: 2022/11/17 15:05
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1377,7 +1324,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 会员有效状态枚举
|
* 会员有效状态枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/17 15:05
|
* @date: 2022/11/17 15:05
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1393,7 +1341,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 是否上传枚举
|
* 是否上传枚举
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/11/17 15:09
|
* @date: 2022/11/17 15:09
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1409,7 +1358,8 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 钱包账户状态
|
* 钱包账户状态
|
||||||
|
*
|
||||||
* @author: zhang jing
|
* @author: zhang jing
|
||||||
* @date: 2022/9/30 15:38
|
* @date: 2022/9/30 15:38
|
||||||
* @param: []
|
* @param: []
|
||||||
|
@ -1772,7 +1722,7 @@ public class EnumsController extends BaseController {
|
||||||
pkCountry = SecurityUtils.getPkCountry();
|
pkCountry = SecurityUtils.getPkCountry();
|
||||||
}
|
}
|
||||||
// 查询国家等级列表
|
// 查询国家等级列表
|
||||||
List<BdGrade> gradeList = gradeService.queryGradeConfigByCondition(pkCountry);
|
List<BdGrade> gradeList = iBdGradeService.queryGradeConfigByCondition(pkCountry);
|
||||||
gradeList.sort(Comparator.comparing(BdGrade::getGradeValue));
|
gradeList.sort(Comparator.comparing(BdGrade::getGradeValue));
|
||||||
|
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
|
@ -1794,7 +1744,7 @@ public class EnumsController extends BaseController {
|
||||||
pkCountry = SecurityUtils.getPkCountry();
|
pkCountry = SecurityUtils.getPkCountry();
|
||||||
}
|
}
|
||||||
// 查询国家奖衔列表
|
// 查询国家奖衔列表
|
||||||
List<BdAwards> awardList = awardsService.queryAwards(pkCountry);
|
List<BdAwards> awardList = iBdAwardsService.queryAwards(pkCountry);
|
||||||
|
|
||||||
// 获取翻译内容
|
// 获取翻译内容
|
||||||
Map<Integer, String> tranMap = iTransactionCommonService.enumTransactionByDBFromPkId(awardList.stream().map(BdAwards::getPkTransaction).collect(Collectors.toList()));
|
Map<Integer, String> tranMap = iTransactionCommonService.enumTransactionByDBFromPkId(awardList.stream().map(BdAwards::getPkTransaction).collect(Collectors.toList()));
|
||||||
|
@ -1947,7 +1897,7 @@ public class EnumsController extends BaseController {
|
||||||
//变更会员姓名
|
//变更会员姓名
|
||||||
if (value.getValue() == EApprovalBusiness.CHANGE_NAME.getValue()) {
|
if (value.getValue() == EApprovalBusiness.CHANGE_NAME.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -1963,7 +1913,7 @@ public class EnumsController extends BaseController {
|
||||||
//变更联系方式
|
//变更联系方式
|
||||||
} else if (value.getValue() == EApprovalBusiness.CHANGE_PHONE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.CHANGE_PHONE.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -1979,7 +1929,7 @@ public class EnumsController extends BaseController {
|
||||||
//重置会员密码
|
//重置会员密码
|
||||||
} else if (value.getValue() == EApprovalBusiness.RESET_LOGIN_PASSWORD.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.RESET_LOGIN_PASSWORD.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -1995,7 +1945,7 @@ public class EnumsController extends BaseController {
|
||||||
//实名认证
|
//实名认证
|
||||||
} else if (value.getValue() == EApprovalBusiness.REAL_NAME_AUTHENTICATION.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.REAL_NAME_AUTHENTICATION.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2011,7 +1961,7 @@ public class EnumsController extends BaseController {
|
||||||
//重置银行信息
|
//重置银行信息
|
||||||
} else if (value.getValue() == EApprovalBusiness.RESET_BANK.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.RESET_BANK.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2027,7 +1977,7 @@ public class EnumsController extends BaseController {
|
||||||
//修改注册等级
|
//修改注册等级
|
||||||
} else if (value.getValue() == EApprovalBusiness.CHANGE_REGISTER_GRADE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.CHANGE_REGISTER_GRADE.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2036,7 +1986,7 @@ public class EnumsController extends BaseController {
|
||||||
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
|
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
|
||||||
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||||
queryWrapperGr.orderByAsc("GRADE_VALUE");
|
queryWrapperGr.orderByAsc("GRADE_VALUE");
|
||||||
List<BdGrade> grList = gradeService.list(queryWrapperGr);
|
List<BdGrade> grList = iBdGradeService.list(queryWrapperGr);
|
||||||
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
||||||
for (BdGrade gr : grList) {
|
for (BdGrade gr : grList) {
|
||||||
enumEntityList1.add(new EnumEntity(gr.getPkId(), gr.getGradeName(), EnumsPrefixConstants.KEY_GRADE));
|
enumEntityList1.add(new EnumEntity(gr.getPkId(), gr.getGradeName(), EnumsPrefixConstants.KEY_GRADE));
|
||||||
|
@ -2047,7 +1997,7 @@ public class EnumsController extends BaseController {
|
||||||
//修改结算等级
|
//修改结算等级
|
||||||
} else if (value.getValue() == EApprovalBusiness.CHANGE_SETTLEMENT_GRADE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.CHANGE_SETTLEMENT_GRADE.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2056,7 +2006,7 @@ public class EnumsController extends BaseController {
|
||||||
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
|
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
|
||||||
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
|
||||||
queryWrapperGr.orderByAsc("GRADE_VALUE");
|
queryWrapperGr.orderByAsc("GRADE_VALUE");
|
||||||
List<BdGrade> grList = gradeService.list(queryWrapperGr);
|
List<BdGrade> grList = iBdGradeService.list(queryWrapperGr);
|
||||||
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
||||||
for (BdGrade gr : grList) {
|
for (BdGrade gr : grList) {
|
||||||
enumEntityList1.add(new EnumEntity(gr.getPkId(), gr.getGradeName(), EnumsPrefixConstants.KEY_GRADE));
|
enumEntityList1.add(new EnumEntity(gr.getPkId(), gr.getGradeName(), EnumsPrefixConstants.KEY_GRADE));
|
||||||
|
@ -2067,7 +2017,7 @@ public class EnumsController extends BaseController {
|
||||||
//修改奖衔
|
//修改奖衔
|
||||||
} else if (value.getValue() == EApprovalBusiness.CHANGE_AWARDS.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.CHANGE_AWARDS.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2078,7 +2028,7 @@ public class EnumsController extends BaseController {
|
||||||
queryWrapperAw.eq("ENABLE_STATE", EnableStatus.ENABLE.getValue());
|
queryWrapperAw.eq("ENABLE_STATE", EnableStatus.ENABLE.getValue());
|
||||||
queryWrapperAw.orderByAsc("AWARDS_VALUE");
|
queryWrapperAw.orderByAsc("AWARDS_VALUE");
|
||||||
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
||||||
List<BdAwards> list = awardsService.list(queryWrapperAw);
|
List<BdAwards> list = iBdAwardsService.list(queryWrapperAw);
|
||||||
for (BdAwards ba : list) {
|
for (BdAwards ba : list) {
|
||||||
enumEntityList1.add(new EnumEntity(ba.getPkId(), ba.getAwardsName(), EnumsPrefixConstants.AWARDS));
|
enumEntityList1.add(new EnumEntity(ba.getPkId(), ba.getAwardsName(), EnumsPrefixConstants.AWARDS));
|
||||||
}
|
}
|
||||||
|
@ -2089,14 +2039,14 @@ public class EnumsController extends BaseController {
|
||||||
} else if (value.getValue() == EApprovalBusiness.CHANGE_NATURAL_COUNTRY.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.CHANGE_NATURAL_COUNTRY.getValue()) {
|
||||||
//修改自然国家
|
//修改自然国家
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
handleBusinessEnumVO.setBusinessType(value.getValue());
|
handleBusinessEnumVO.setBusinessType(value.getValue());
|
||||||
handleBusinessEnumVO.setEditTypeName(value.getLabel());
|
handleBusinessEnumVO.setEditTypeName(value.getLabel());
|
||||||
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
List<EnumEntity> enumEntityList1 = new ArrayList<>();
|
||||||
List<BdCountry> list = countryService.list();
|
List<BdCountry> list = iBdCountryService.list();
|
||||||
for (BdCountry value1 : list) {
|
for (BdCountry value1 : list) {
|
||||||
enumEntityList1.add(new EnumEntity(value1.getPkId(), value1.getName()));
|
enumEntityList1.add(new EnumEntity(value1.getPkId(), value1.getName()));
|
||||||
}
|
}
|
||||||
|
@ -2106,7 +2056,7 @@ public class EnumsController extends BaseController {
|
||||||
//修改登录状态
|
//修改登录状态
|
||||||
} else if (value.getValue() == EApprovalBusiness.SIGN_IN_STATE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.SIGN_IN_STATE.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2122,7 +2072,7 @@ public class EnumsController extends BaseController {
|
||||||
//修改收益状态
|
//修改收益状态
|
||||||
} else if (value.getValue() == EApprovalBusiness.PROFIT_STATE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.PROFIT_STATE.getValue()) {
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2139,7 +2089,7 @@ public class EnumsController extends BaseController {
|
||||||
} else if (value.getValue() == EApprovalBusiness.WALLET_STATE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.WALLET_STATE.getValue()) {
|
||||||
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
|
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2156,7 +2106,7 @@ public class EnumsController extends BaseController {
|
||||||
} else if (value.getValue() == EApprovalBusiness.FREE_ASSESSMENT_STATE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.FREE_ASSESSMENT_STATE.getValue()) {
|
||||||
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
|
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2172,7 +2122,7 @@ public class EnumsController extends BaseController {
|
||||||
} else if (value.getValue() == EApprovalBusiness.IS_REGION.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.IS_REGION.getValue()) {
|
||||||
//是否收益区域
|
//是否收益区域
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2188,7 +2138,7 @@ public class EnumsController extends BaseController {
|
||||||
} else if (value.getValue() == EApprovalBusiness.IS_ACTIVATE.getValue()) {
|
} else if (value.getValue() == EApprovalBusiness.IS_ACTIVATE.getValue()) {
|
||||||
//是否激活
|
//是否激活
|
||||||
queryWrapper.eq("TYPE", value.getValue());
|
queryWrapper.eq("TYPE", value.getValue());
|
||||||
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
|
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
|
||||||
if (StringUtils.isNotNull(bdServiceCharge)) {
|
if (StringUtils.isNotNull(bdServiceCharge)) {
|
||||||
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
|
||||||
}
|
}
|
||||||
|
@ -2680,10 +2630,8 @@ public class EnumsController extends BaseController {
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("quantity-mode-list")
|
@GetMapping("/quantity-mode-list")
|
||||||
public AjaxResult quantityModeList() {
|
public AjaxResult quantityModeList() {
|
||||||
|
|
||||||
|
|
||||||
List<EnumEntity> enumEntityList = new ArrayList<>();
|
List<EnumEntity> enumEntityList = new ArrayList<>();
|
||||||
for (EPostageMode value : EPostageMode.values()) {
|
for (EPostageMode value : EPostageMode.values()) {
|
||||||
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
enumEntityList.add(new EnumEntity(value.getValue(), value.getLabel()));
|
||||||
|
@ -2762,11 +2710,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 结算方式枚举
|
* 结算方式枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2024/3/29 11:54
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/settle-Type")
|
@GetMapping("/settle-Type")
|
||||||
public AjaxResult settleType() {
|
public AjaxResult settleType() {
|
||||||
|
@ -2837,11 +2781,7 @@ public class EnumsController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 联创数据报表类型枚举
|
* 联创数据报表类型枚举
|
||||||
* @author: zhang jing
|
|
||||||
* @date: 2025/2/27 10:46
|
|
||||||
* @param: []
|
|
||||||
* @return: com.hzs.common.core.web.domain.AjaxResult
|
|
||||||
**/
|
**/
|
||||||
@GetMapping("/sheetType")
|
@GetMapping("/sheetType")
|
||||||
public AjaxResult sheetType() {
|
public AjaxResult sheetType() {
|
||||||
|
|
|
@ -80,7 +80,6 @@ public enum EOrderType {
|
||||||
|
|
||||||
RETAIL_PICK(46, "提货订单", 0, EnumsPrefixConstants.ORDER_TYPE + 46),
|
RETAIL_PICK(46, "提货订单", 0, EnumsPrefixConstants.ORDER_TYPE + 46),
|
||||||
|
|
||||||
RETAIL_SHOP_ORDER(47, "店铺订单", 0, EnumsPrefixConstants.ORDER_TYPE + 47),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,11 +4,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 件数方式
|
* 件数方式
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2024/4/15 16:13
|
|
||||||
* @Classname: EPostageMode
|
|
||||||
* @PackageName: com.hzs.common.core.enums
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -17,12 +13,12 @@ public enum EPostageMode {
|
||||||
/**
|
/**
|
||||||
* 产品
|
* 产品
|
||||||
*/
|
*/
|
||||||
PRODUCT(1, "产品"),
|
PRODUCT(1, "产品"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品
|
* 商品
|
||||||
*/
|
*/
|
||||||
WARES(2, "商品"),
|
WARES(2, "商品"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 预售状态
|
* 预售状态
|
||||||
* @Author: jiang chao
|
|
||||||
* @Time: 2022/11/4 14:05
|
|
||||||
* @Classname: EPresaleStatus
|
|
||||||
* @PackageName: com.hzs.common.core.enums
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -25,11 +21,6 @@ public enum EPresaleStatus {
|
||||||
*/
|
*/
|
||||||
PRESALE(1, "预售", 0, EnumsPrefixConstants.PRESALE_STATUS + "1"),
|
PRESALE(1, "预售", 0, EnumsPrefixConstants.PRESALE_STATUS + "1"),
|
||||||
|
|
||||||
/**
|
|
||||||
* 已售罄 2.0删除该项 已对接过设计
|
|
||||||
*/
|
|
||||||
// SOLD_OUT(2, "已售罄", 0, EnumsPrefixConstants.PRESALE_STATUS + "2"),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缺货
|
* 缺货
|
||||||
*/
|
*/
|
||||||
|
@ -54,13 +45,25 @@ public enum EPresaleStatus {
|
||||||
*/
|
*/
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
public static EPresaleStatus getEPresaleStatus(int value ){
|
public static EPresaleStatus getEPresaleStatus(int value) {
|
||||||
for (EPresaleStatus ePresaleStatus : EPresaleStatus.values()) {
|
for (EPresaleStatus ePresaleStatus : EPresaleStatus.values()) {
|
||||||
if (ePresaleStatus.getValue() == value){
|
if (ePresaleStatus.getValue() == value) {
|
||||||
return ePresaleStatus;
|
return ePresaleStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
|
if (null == value) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (EPresaleStatus enums : EPresaleStatus.values()) {
|
||||||
|
if (enums.value == value) {
|
||||||
|
return enums.getLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,47 +14,42 @@ public enum ESpecialArea {
|
||||||
/**
|
/**
|
||||||
* 注册专区
|
* 注册专区
|
||||||
*/
|
*/
|
||||||
REGISTER_AREA(1, "注册专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "1", 3, EMenuDetail.REGISTER.getValue()),
|
REGISTER_AREA(1, "注册专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "1", 3, EMenuDetail.REGISTER.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 升级专区
|
* 升级专区
|
||||||
*/
|
*/
|
||||||
UPGRADE_AREA(2, "升级专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "2", 4, EMenuDetail.UPGRADE.getValue()),
|
UPGRADE_AREA(2, "升级专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "2", 4, EMenuDetail.UPGRADE.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复购专区 名字修改为自营专区(复购自营)
|
* 复购专区 名字修改为自营专区(复购自营)
|
||||||
*/
|
*/
|
||||||
REPURCHASE_AREA(3, "复购自营", 0, EnumsPrefixConstants.SPECIAL_AREA + "3", 5, EMenuDetail.REPURCHASE.getValue()),
|
REPURCHASE_AREA(3, "复购自营", 1, EnumsPrefixConstants.SPECIAL_AREA + "3", 5, EMenuDetail.REPURCHASE.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重消专区
|
* 重消专区
|
||||||
*/
|
*/
|
||||||
RESCISSION_AREA(10, "重消专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "10", 8, EMenuDetail.REPEATED_CONSUMPTION.getValue()),
|
RESCISSION_AREA(10, "重消专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "10", 8, EMenuDetail.REPEATED_CONSUMPTION.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 积分专区
|
* 积分专区
|
||||||
*/
|
*/
|
||||||
INTEGRAL_AREA(11, "积分专区", 0, EnumsPrefixConstants.SPECIAL_AREA + "11", 13, EMenuDetail.INTEGRAL_AREA.getValue()),
|
INTEGRAL_AREA(11, "积分专区", 1, EnumsPrefixConstants.SPECIAL_AREA + "11", 13, EMenuDetail.INTEGRAL_AREA.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 福利专区
|
* 福利专区
|
||||||
*/
|
*/
|
||||||
WELFARE_AREA(13, "福利专区", 0, EnumsPrefixConstants.SPECIAL_AREA + 13, 9, EMenuDetail.WELFARE_AREA.getValue()),
|
WELFARE_AREA(13, "福利专区", 1, EnumsPrefixConstants.SPECIAL_AREA + 13, 9, EMenuDetail.WELFARE_AREA.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播专区
|
* 直播专区
|
||||||
*/
|
*/
|
||||||
LIVE_BROADCAST(14, "直播专区", 0, EnumsPrefixConstants.SPECIAL_AREA + 14, 14, EMenuDetail.LIVE.getValue()),
|
LIVE_BROADCAST(14, "直播专区", 1, EnumsPrefixConstants.SPECIAL_AREA + 14, 14, EMenuDetail.LIVE.getValue()),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复购合作 团队带过来的产品
|
* 复购合作 团队带过来的产品
|
||||||
*/
|
*/
|
||||||
COOPERATE_AREA(22, "复购合作", 0, EnumsPrefixConstants.SPECIAL_AREA + 22, 6, EMenuDetail.COOPERATE.getValue()),
|
COOPERATE_AREA(22, "复购合作", 1, EnumsPrefixConstants.SPECIAL_AREA + 22, 6, EMenuDetail.COOPERATE.getValue()),
|
||||||
|
|
||||||
/**
|
|
||||||
* 海粉升级
|
|
||||||
*/
|
|
||||||
HAI_FUN_UPGRADE_ORDER(27, "海粉升级", 0, EnumsPrefixConstants.ORDER_TYPE + 27, 20, EMenuDetail.UPGRADE_HAI_FUN.getValue()),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新零售会员专区(注册)
|
* 新零售会员专区(注册)
|
||||||
|
@ -104,22 +99,16 @@ public enum ESpecialArea {
|
||||||
*/
|
*/
|
||||||
private final int menuDetailValue;
|
private final int menuDetailValue;
|
||||||
|
|
||||||
public static String getESpecialArea(int value) {
|
public static String getESpecialArea(Integer value) {
|
||||||
|
if (null == value) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
|
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
|
||||||
if (eSpecialArea.getValue() == value) {
|
if (eSpecialArea.getValue() == value) {
|
||||||
return eSpecialArea.getLabel();
|
return eSpecialArea.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return "";
|
||||||
}
|
|
||||||
|
|
||||||
public static ESpecialArea getESpecialAreaEnum(int value) {
|
|
||||||
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
|
|
||||||
if (eSpecialArea.getValue() == value) {
|
|
||||||
return eSpecialArea;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,13 +40,25 @@ public enum ESupplyWay {
|
||||||
*/
|
*/
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
public static ESupplyWay getESupplyWay(int value){
|
public static ESupplyWay getESupplyWay(int value) {
|
||||||
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
for (ESupplyWay eSupplyWay : ESupplyWay.values()) {
|
||||||
if (eSupplyWay.value == value){
|
if (eSupplyWay.value == value) {
|
||||||
return eSupplyWay;
|
return eSupplyWay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
|
if (null == value) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (ESupplyWay enums : ESupplyWay.values()) {
|
||||||
|
if (enums.value == value) {
|
||||||
|
return enums.getLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,6 @@ import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品权限类型枚举
|
* 商品权限类型枚举
|
||||||
*
|
|
||||||
* @author: sui q
|
|
||||||
* @time: 2022/8/27 10:26
|
|
||||||
* @description: 商品权限类型
|
|
||||||
* @classname: EWaresPermissionType
|
|
||||||
* @package_name: com.hzs.common.core.enums
|
|
||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -59,18 +53,16 @@ public enum EWaresPermissionType {
|
||||||
*/
|
*/
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
/**
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
*
|
if (null == value) {
|
||||||
*
|
return "";
|
||||||
* @param value 枚举值
|
}
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static EWaresPermissionType getEnumByValue(int value) {
|
|
||||||
for (EWaresPermissionType permissionType : EWaresPermissionType.values()) {
|
for (EWaresPermissionType permissionType : EWaresPermissionType.values()) {
|
||||||
if (permissionType.getValue() == value) {
|
if (permissionType.getValue() == value) {
|
||||||
return permissionType;
|
return permissionType.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,18 +32,16 @@ public enum EWaresType {
|
||||||
*/
|
*/
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
/**
|
public static String getEnumLabelByValue(Integer value) {
|
||||||
* 根据枚举值获取枚举
|
if (null == value) {
|
||||||
*
|
return "";
|
||||||
* @param value 枚举值
|
}
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static EWaresType getEnumByValue(int value) {
|
|
||||||
for (EWaresType eApproveStatus : EWaresType.values()) {
|
for (EWaresType eApproveStatus : EWaresType.values()) {
|
||||||
if (eApproveStatus.getValue() == value) {
|
if (eApproveStatus.getValue().equals(value)) {
|
||||||
return eApproveStatus;
|
return eApproveStatus.getLabel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import com.hzs.common.core.web.domain.BaseEntity;
|
import com.hzs.common.core.web.domain.BaseEntity;
|
||||||
|
@ -12,12 +13,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
|
||||||
* 商品拓展表
|
* 商品拓展表
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author hzs
|
|
||||||
* @since 2022-09-01
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
|
|
@ -222,4 +222,11 @@ public class BdWares extends BaseEntity {
|
||||||
@TableField("AREA_INCOME")
|
@TableField("AREA_INCOME")
|
||||||
private BigDecimal areaIncome;
|
private BigDecimal areaIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品上传盒数
|
||||||
|
*/
|
||||||
|
@TableField("BOX_NUM")
|
||||||
|
private BigDecimal boxNum;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue