Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
sangelxiu1 2025-06-30 14:33:13 +08:00
commit 0c4bc3900f
23 changed files with 333 additions and 607 deletions

View File

@ -7,11 +7,9 @@ import org.apache.ibatis.annotations.Param;
/**
* 商品拓展表 Mapper 接口
*
* @author hzs
* @since 2022-09-01
*/
public interface BdProductExtendMapper extends BaseMapper<BdProductExtend> {
/**
* 根据产品id查询产品拓展
*

View File

@ -5,12 +5,7 @@ import com.hzs.common.domain.sale.ext.BdProductExtendExt;
import com.hzs.common.domain.sale.product.BdProductExtend;
/**
* <p>
* 商品拓展表 服务类
* </p>
*
* @author hzs
* @since 2022-09-01
*/
public interface IBdProductExtendService extends IService<BdProductExtend> {
@ -20,7 +15,7 @@ public interface IBdProductExtendService extends IService<BdProductExtend> {
* @param productId
* @return
*/
public BdProductExtend getProductExtend(Integer productId);
BdProductExtend getProductExtend(Integer productId);
/**
* 根据产品id 查找当前商品的上一位商品排序

View File

@ -1,87 +1,43 @@
package com.hzs.sale.product.service.impl;
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.product.BdProductExtend;
import com.hzs.sale.product.mapper.BdProductExtendMapper;
import com.hzs.sale.product.service.IBdProductExtendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 商品拓展表 服务实现类
* </p>
*
* @author hzs
* @since 2022-09-01
*/
@Service
public class BdProductExtendServiceImpl extends ServiceImpl<BdProductExtendMapper, BdProductExtend> implements IBdProductExtendService {
@Autowired
private RedisService redisService;
/**
* 根据产品id查询产品拓展
*
* @param productId
* @return
*/
@Override
public BdProductExtend getProductExtend(Integer productId) {
return baseMapper.selectByProductId(productId);
}
/**
* 根据产品id 查找当前商品的上一位商品排序
*
* @param productId
* @return
*/
@Override
public Integer selectByMoveUpSort(Integer productId) {
return baseMapper.selectByMoveUpSort(productId);
}
/**
* 大于传入编号的全部上移1
*
* @param sort
*/
@Override
public void updateMoveUpBySort(Integer sort) {
baseMapper.updateMoveUpBySort(sort);
}
/**
* 根据id 查询当前商品的下一位商品排序
*
* @param productId
* @return
*/
@Override
public Integer selectByMoveDownSort(Integer productId) {
return baseMapper.selectByMoveDownSort(productId);
}
/**
* 大于传入编号的全部下移1
*
* @param sort
*/
@Override
public void updateMoveDownBySort(Integer sort) {
baseMapper.updateMoveDownBySort(sort);
}
/**
* 查询排序最大值
*
* @return
*/
@Override
public Integer getMaxProductSort() {
return baseMapper.getMaxProductSort();

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hzs.common.core.annotation.AccessPermissions;
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.enums.*;
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.security.service.UserTokenService;
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.IBdProductExtendService;
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.service.*;
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.sys.dto.LoginUser;
import lombok.extern.slf4j.Slf4j;
@ -52,61 +47,50 @@ import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @Description:
* @Author: yuhui
* @Time: 2022/9/8 17:04
* @Classname: BdWaresController
* @PackageName: com.hzs.sale.wares.controller.manage
*/
@Slf4j
@RestController
@RequestMapping("/manage/wares")
public class BdWaresController extends BaseController {
@DubboReference
ICurrencyServiceApi currencyServiceApi;
@DubboReference
IRangeServiceApi rangeServiceApi;
IRangeServiceApi iRangeServiceApi;
@Autowired
private IBdWaresAuthorizeService waresAuthorizeService;
private IBdWaresAuthorizeService iBdWaresAuthorizeService;
@Autowired
private IBdWaresAwardsService waresAwardsService;
private IBdWaresAwardsService iBdWaresAwardsService;
@Autowired
private ITransactionCommonService iTransactionCommonService;
private IBdWaresGradeService iBdWaresGradeService;
@Autowired
private IBdWaresGradeService waresGradeService;
private IBdProductExtendService iBdProductExtendService;
@Autowired
private IBdProductExtendService productExtendService;
private IBdSpecsService iBdSpecsService;
@Autowired
private IBdSpecsService specsService;
private IBdWaresRangeService iBdWaresRangeService;
@Autowired
private IBdWaresRangeService waresRangeService;
private IBdProductService iBdProductService;
@Autowired
private IBdProductService productService;
private IBdWaresSpecsPackService iBdWaresSpecsPackService;
@Autowired
private IBdWaresSpecsPackService waresSpecsPackService;
private IBdWaresService iBdWaresService;
@Autowired
private IBdWaresService waresService;
private IBdWaresLabelService iBdWaresLabelService;
@Autowired
private IBdWaresLabelService waresLabelService;
private IBdWaresExtendService iBdWaresExtendService;
@Autowired
private IBdWaresExtendService waresExtendService;
private IBdWaresDetailService iBdWaresDetailService;
@Autowired
private IBdWaresDetailService waresDetailService;
private IBdWaresSpecsSkuService iBdWaresSpecsSkuService;
@Autowired
private IBdWaresSpecsSkuService waresSpecsSkuService;
private IBdWaresSpecsRelationService iBdWaresSpecsRelationService;
@Autowired
private IBdWaresSpecsRelationService waresSpecsRelationService;
private IBdWaresSpecsService iBdWaresSpecsService;
@Autowired
private IBdWaresSpecsService waresSpecsService;
private IBdWaresAuthorityService iBdWaresAuthorityService;
@Autowired
private IBdWaresAuthorityService waresAuthorityService;
private IBdAreaClassifyService iBdAreaClassifyService;
@Autowired
private UserTokenService userTokenService;
@Autowired
private IBdAreaClassifyService areaClassifyService;
/**
* 查询列表
@ -121,26 +105,20 @@ public class BdWaresController extends BaseController {
waresParams.setSystemType(SecurityUtils.getSystemType());
startPage();
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
if (CollectionUtil.isNotEmpty(resultList)) {
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
resultList.parallelStream().forEach(waresVo -> {
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
WaresAuthorityVo waresAuthorityVo = iBdWaresService.getWaresAuthorityFirst(waresVo.getPkWares());
if (waresAuthorityVo != null) {
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumLabelByValue(waresAuthorityVo.getAuthorityType()));
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
waresVo.setMemberName(waresAuthorityVo.getMemberName());
}
List<WaresProductDetailVo> waresDetailList = waresDetailService.selectByList(waresVo.getPkWares());
List<WaresProductDetailVo> waresDetailList = iBdWaresDetailService.selectByList(waresVo.getPkWares());
waresVo.setWaresDetailList(waresDetailList);
if (waresVo.getIsMakerGift() != null) {
waresVo.setIsMakerGiftVal(EWaresType.getEnumByValue(waresVo.getIsMakerGift()).getLabel());
}
if (null != waresVo.getMakerIncome()) {
// 处理发起人收益
waresVo.setMakerIncome(waresVo.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
waresVo.setIsMakerGiftVal(EWaresType.getEnumLabelByValue(waresVo.getIsMakerGift()));
}
});
}
@ -156,28 +134,24 @@ public class BdWaresController extends BaseController {
waresParams.setPkCountry(SecurityUtils.getPkCountry());
waresParams.setSystemType(SecurityUtils.getSystemType());
List<WaresVo> resultList = waresService.selectByWaresInfo(waresParams);
List<WaresVo> resultList = iBdWaresService.selectByWaresInfo(waresParams);
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 -> {
// 所属专区
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) {
waresVo.setAuthorityType(waresAuthorityVo.getAuthorityType());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumByValue(waresAuthorityVo.getAuthorityType()).getLabel());
waresVo.setAuthorityTypeVal(EWaresPermissionType.getEnumLabelByValue(waresAuthorityVo.getAuthorityType()));
waresVo.setMemberCode(waresAuthorityVo.getMemberCode());
waresVo.setMemberName(waresAuthorityVo.getMemberName());
}
List<WaresProductDetailVo> waresDetailList = waresDetailService.selectByList(waresVo.getPkWares());
List<WaresProductDetailVo> waresDetailList = iBdWaresDetailService.selectByList(waresVo.getPkWares());
waresVo.setWaresDetailList(waresDetailList);
if (waresDetailList.size() > 0) {
StringBuilder productNames = new StringBuilder();
@ -192,13 +166,9 @@ public class BdWaresController extends BaseController {
waresVo.setProductCodes(productCodes.toString());
waresVo.setProductQuantitys(productQuantitys.toString());
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);
@ -216,27 +186,27 @@ public class BdWaresController extends BaseController {
if (StringUtils.isBlank(wares.getWaresName())) {
return AjaxResult.error("商品名称不存在");
}
// 预售状态必传
if (wares.getPreSaleStatus() == null) {
return AjaxResult.error("预售状态必传");
}
if (wares.getWaresPrice() == null) {
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) {
return AjaxResult.error("商品分类不能为空");
}
if (wares.getCover1() == null) {
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;
// 是否空运
@ -245,7 +215,7 @@ public class BdWaresController extends BaseController {
int isOceanTrans = 1;
if (wares.getWaresDetailList().size() > 0) {
for (WaresDetailParams waresDetailParams : wares.getWaresDetailList()) {
BdProductExtend productExtend = productExtendService.getProductExtend(waresDetailParams.getPkProduct());
BdProductExtend productExtend = iBdProductExtendService.getProductExtend(waresDetailParams.getPkProduct());
// 是否陆运
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
isLandTrans = EYesNo.YES.getIntValue();
@ -328,7 +298,7 @@ public class BdWaresController extends BaseController {
return AjaxResult.error("产品规格至少有一个上架");
}
wares.setSort(0);
waresService.saveWares(wares, userTokenService.getLoginUser());
iBdWaresService.saveWares(wares, userTokenService.getLoginUser());
return AjaxResult.success(wares.getWaresCode());
}
@ -341,8 +311,6 @@ public class BdWaresController extends BaseController {
@PostMapping("/update")
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.WARES_LIST, method = EOperationMethod.UPDATE)
public AjaxResult update(@RequestBody WaresParams waresParams) {
waresParams.setPkCountry(SecurityUtils.getPkCountry());
waresParams.setSystemType(SecurityUtils.getSystemType());
if (StringUtils.isBlank(waresParams.getWaresCode())) {
return AjaxResult.error("商品编号不存在");
}
@ -350,16 +318,6 @@ public class BdWaresController extends BaseController {
if (waresParams.getPreSaleStatus() == null) {
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())) {
return AjaxResult.error("商品名称不存在");
}
@ -372,6 +330,19 @@ public class BdWaresController extends BaseController {
if (waresParams.getCover1() == null) {
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;
@ -381,7 +352,7 @@ public class BdWaresController extends BaseController {
int isOceanTrans = 1;
if (waresParams.getWaresDetailList().size() > 0) {
for (WaresDetailParams waresDetailParams : waresParams.getWaresDetailList()) {
BdProductExtend productExtend = productExtendService.getProductExtend(waresDetailParams.getPkProduct());
BdProductExtend productExtend = iBdProductExtendService.getProductExtend(waresDetailParams.getPkProduct());
// 是否陆运
if (productExtend.getIsLandTrans() == EYesNo.YES.getIntValue()) {
isLandTrans = EYesNo.YES.getIntValue();
@ -459,7 +430,7 @@ public class BdWaresController extends BaseController {
}
waresParams.setSort(0);
waresService.updateWares(waresParams, userTokenService.getLoginUser());
iBdWaresService.updateWares(waresParams, userTokenService.getLoginUser());
return AjaxResult.success(waresParams.getWaresCode());
}
@ -472,7 +443,7 @@ public class BdWaresController extends BaseController {
@DeleteMapping("/{pkId}")
@Log(module = EOperationModule.WARES_LIST, business = EOperationBusiness.THIRD_WARES_LIST, method = EOperationMethod.DELETE)
public AjaxResult remove(@PathVariable Integer pkId) {
waresService.removeWares(pkId, userTokenService.getLoginUser());
iBdWaresService.removeWares(pkId, userTokenService.getLoginUser());
return AjaxResult.success();
}
@ -484,14 +455,14 @@ public class BdWaresController extends BaseController {
*/
@GetMapping("/detail")
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();
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<>();
queryWrapper.eq(BdWaresExtend::getPkWares, pkId);
BdWaresExtend waresExtend = waresExtendService.getOne(queryWrapper);
BdWaresExtend waresExtend = iBdWaresExtendService.getOne(queryWrapper);
WaresParams waresParams = new WaresParams();
waresParams.setWaresId(wares.getPkId());
waresParams.setIsPreSale(wares.getIsPreSale());
@ -542,12 +513,9 @@ public class BdWaresController extends BaseController {
waresParams.setSortStatus(wares.getSortStatus());
waresParams.setSystemType(waresExtend.getSystemType());
waresParams.setAreaIncome(wares.getAreaIncome());
if (waresExtend.getMakerIncome() != null) {
R<CurrencyDTO> currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
waresParams.setMakerIncome(waresExtend.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
}
waresParams.setBoxNum(wares.getBoxNum());
BdAreaClassify parentAreaClassify = areaClassifyService.getAreaClassify(wares.getPkAreaClassify());
BdAreaClassify parentAreaClassify = iBdAreaClassifyService.getAreaClassify(wares.getPkAreaClassify());
if (parentAreaClassify != null) {
if (parentAreaClassify.getPkParent() == 0) {
waresParams.setParentPkAreaClassify(null);
@ -558,7 +526,7 @@ public class BdWaresController extends BaseController {
// 标签
LambdaQueryWrapper<BdWaresLabel> waresLabelWrapper = new LambdaQueryWrapper<>();
waresLabelWrapper.eq(BdWaresLabel::getPkWares, pkId);
List<BdWaresLabel> labelList = waresLabelService.list(waresLabelWrapper);
List<BdWaresLabel> labelList = iBdWaresLabelService.list(waresLabelWrapper);
// 保证标签
List<Integer> pkGuaranteeLabel = new ArrayList<>();
// 卖点标签
@ -587,7 +555,7 @@ public class BdWaresController extends BaseController {
//包装和规格
LambdaQueryWrapper<BdWaresSpecsPack> waresSpecsPackWrapper = new LambdaQueryWrapper<>();
waresSpecsPackWrapper.eq(BdWaresSpecsPack::getPkWares, pkId);
List<BdWaresSpecsPack> list = waresSpecsPackService.list(waresSpecsPackWrapper);
List<BdWaresSpecsPack> list = iBdWaresSpecsPackService.list(waresSpecsPackWrapper);
List<WaresSpecsPackParams> waresSpecsPackList = new ArrayList<>();
for (BdWaresSpecsPack bdWaresSpecsPack : list) {
WaresSpecsPackParams waresSpecsPackParams = BeanUtil.copyProperties(bdWaresSpecsPack, WaresSpecsPackParams.class);
@ -598,14 +566,14 @@ public class BdWaresController extends BaseController {
//产品详情列表
LambdaQueryWrapper<BdWaresDetail> waresDetailWrapper = new LambdaQueryWrapper<>();
waresDetailWrapper.eq(BdWaresDetail::getPkWares, pkId);
List<BdWaresDetail> waresDetailList = waresDetailService.list(waresDetailWrapper);
List<BdWaresDetail> waresDetailList = iBdWaresDetailService.list(waresDetailWrapper);
// 商品详情
List<WaresDetailParams> detailList = new ArrayList<>();
// 商品sku
List<WaresSpecsSkuParams> waresSpecsSkuList = new ArrayList<>();
for (BdWaresDetail bd : waresDetailList) {
WaresDetailParams waresDetailParams = BeanUtil.copyProperties(bd, WaresDetailParams.class);
BdProduct product = productService.getProduct(bd.getPkProduct());
BdProduct product = iBdProductService.getProduct(bd.getPkProduct());
if (product != null) {
waresDetailParams.setProductCode(product.getProductCode());
waresDetailParams.setProductName(product.getProductName());
@ -617,7 +585,7 @@ public class BdWaresController extends BaseController {
LambdaQueryWrapper<BdWaresSpecsSku> specsSku = new LambdaQueryWrapper<>();
specsSku.eq(BdWaresSpecsSku::getPkWares, pkId);
specsSku.eq(BdWaresSpecsSku::getPkWaresDetail, bd.getPkId());
List<BdWaresSpecsSku> specsSkuList = waresSpecsSkuService.list(specsSku);
List<BdWaresSpecsSku> specsSkuList = iBdWaresSpecsSkuService.list(specsSku);
for (BdWaresSpecsSku bdWaresSpecsSku : specsSkuList) {
WaresSpecsSkuParams specsSkuParams = new WaresSpecsSkuParams();
specsSkuParams.setPkWaresSpecsSku(bdWaresSpecsSku.getPkId());
@ -634,10 +602,10 @@ public class BdWaresController extends BaseController {
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresSpecsSku.getPkId());
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
if (specs != null) {
waresSpecs.setSpecsName(specs.getSpecsName());
}
@ -652,7 +620,7 @@ public class BdWaresController extends BaseController {
// 团队配置
LambdaQueryWrapper<BdWaresAuthority> authorityWrapper = new LambdaQueryWrapper<>();
authorityWrapper.eq(BdWaresAuthority::getPkWares, pkId);
List<BdWaresAuthority> authList = waresAuthorityService.list(authorityWrapper);
List<BdWaresAuthority> authList = iBdWaresAuthorityService.list(authorityWrapper);
List<WaresAuthorityParam> waresAuthorityList = new ArrayList<>();
for (BdWaresAuthority bdWaresAuthority : authList) {
WaresAuthorityParam waresAuthorityParam = BeanUtil.copyProperties(bdWaresAuthority, WaresAuthorityParam.class);
@ -661,10 +629,10 @@ public class BdWaresController extends BaseController {
waresParams.setWaresAuthorityList(waresAuthorityList);
// 极差
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<>();
waresRangeWrapper.eq(BdWaresRange::getPkWares, pkId);
int waresRangeCount = waresRangeService.count(waresRangeWrapper);
int waresRangeCount = iBdWaresRangeService.count(waresRangeWrapper);
List<Integer> rgList = new ArrayList<>();
for (BdWaresRange bdWaresRange : rangeList) {
if (bdWaresRange.getPkId() != null) {
@ -675,10 +643,10 @@ public class BdWaresController extends BaseController {
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
if (specs != null) {
waresSpecs.setSpecsName(specs.getSpecsName());
}
@ -691,7 +659,7 @@ public class BdWaresController extends BaseController {
} else {
waresRangeParams.setRangeName(null);
}
BdProduct product = productService.getProduct(bdWaresRange.getPkProduct());
BdProduct product = iBdProductService.getProduct(bdWaresRange.getPkProduct());
waresRangeParams.setProductCode(product.getProductCode());
waresRangeParams.setProductName(product.getProductName());
waresRangeParams.setProductCover(product.getCover());
@ -711,7 +679,7 @@ public class BdWaresController extends BaseController {
for (BdWaresDetail bdWaresDetail : waresDetailList) {
WaresRangeParams waresRangeParams = new WaresRangeParams();
waresRangeParams.setPkRange(rg);
BdProduct product = productService.getProduct(bdWaresDetail.getPkProduct());
BdProduct product = iBdProductService.getProduct(bdWaresDetail.getPkProduct());
waresRangeParams.setPkProduct(product.getPkId());
waresRangeParams.setProductCode(product.getProductCode());
waresRangeParams.setProductName(product.getProductName());
@ -725,16 +693,16 @@ public class BdWaresController extends BaseController {
LambdaQueryWrapper<BdWaresRange> qe = new LambdaQueryWrapper<>();
qe.eq(BdWaresRange::getPkWares, bdWaresDetail.getPkWares());
qe.eq(BdWaresRange::getPkWaresDetail, bdWaresDetail.getPkId());
List<BdWaresRange> wrList = waresRangeService.list(qe);
List<BdWaresRange> wrList = iBdWaresRangeService.list(qe);
// 查询每一个sku 的所有规格
List<BdWaresSpecs> waresSpecsList = new ArrayList<>();
for (BdWaresRange bdWaresRange : wrList) {
LambdaQueryWrapper<BdWaresSpecsRelation> waresSpecsRelation = new LambdaQueryWrapper<>();
waresSpecsRelation.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, bdWaresRange.getPkWaresSpecsSku());
List<BdWaresSpecsRelation> rslist = waresSpecsRelationService.list(waresSpecsRelation);
List<BdWaresSpecsRelation> rslist = iBdWaresSpecsRelationService.list(waresSpecsRelation);
for (BdWaresSpecsRelation bdWaresSpecsRelation : rslist) {
BdWaresSpecs waresSpecs = waresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = specsService.getSpecs(waresSpecs.getPkSpecs());
BdWaresSpecs waresSpecs = iBdWaresSpecsService.getById(bdWaresSpecsRelation.getPkWaresSpecs());
BdSpecs specs = iBdSpecsService.getSpecs(waresSpecs.getPkSpecs());
if (specs != null) {
waresSpecs.setSpecsName(specs.getSpecsName());
}
@ -755,19 +723,19 @@ public class BdWaresController extends BaseController {
// 查询商品级别
LambdaQueryWrapper<BdWaresGrade> qw = new LambdaQueryWrapper<>();
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());
waresParams.setWaresGradeIds(ids);
// 查询商品奖衔
LambdaQueryWrapper<BdWaresAwards> qe = new LambdaQueryWrapper<>();
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());
waresParams.setWaresAwardsIds(waresAwardsArray);
// 查询商品权限配置
LambdaQueryWrapper<BdWaresAuthorize> qa = new LambdaQueryWrapper<>();
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());
waresParams.setWaresMemberAuthorizeList(waresAuthorizeList);
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)
public AjaxResult move(Integer waresId, Integer waresMoveType, Integer specialArea) {
LoginUser loginUser = userTokenService.getLoginUser();
waresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
iBdWaresService.waresMove(waresId, waresMoveType, loginUser, specialArea);
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)
public AjaxResult floatingRoof(Integer waresId) {
LoginUser loginUser = userTokenService.getLoginUser();
waresService.floatingRoof(waresId, loginUser);
iBdWaresService.floatingRoof(waresId, loginUser);
return AjaxResult.success();
}
@ -811,7 +779,7 @@ public class BdWaresController extends BaseController {
@GetMapping("/botton-up")
public AjaxResult bottomUp(Integer waresId) {
LoginUser loginUser = userTokenService.getLoginUser();
waresService.bottomUp(waresId, loginUser);
iBdWaresService.bottomUp(waresId, loginUser);
return AjaxResult.success();
}
@ -822,7 +790,7 @@ public class BdWaresController extends BaseController {
*/
@GetMapping("/create-wares-code")
public AjaxResult createWaresCode() {
String waresCode = CreateNormsCodeUtils.createWaresCode(waresService.getLastWaresCode());
String waresCode = CreateNormsCodeUtils.createWaresCode(iBdWaresService.getLastWaresCode());
return AjaxResult.success(waresCode);
}
@ -834,7 +802,7 @@ public class BdWaresController extends BaseController {
@GetMapping("/create-wares-sort")
public AjaxResult createWaresSort() {
Integer pkCountry = SecurityUtils.getPkCountry();
Integer maxSort = waresService.getMaxSort(pkCountry);
Integer maxSort = iBdWaresService.getMaxSort(pkCountry);
if (maxSort == null) {
maxSort = 0;
}
@ -851,7 +819,7 @@ public class BdWaresController extends BaseController {
queryWrapper.eq(BdWares::getWaresName, waresName);
}
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
List<BdWares> list = waresService.list(queryWrapper);
List<BdWares> list = iBdWaresService.list(queryWrapper);
List<WaresEntnyOrderVo> resultList = new ArrayList<>();
for (BdWares bdWares : list) {
WaresEntnyOrderVo waresEntnyOrderVo = new WaresEntnyOrderVo();
@ -862,7 +830,7 @@ public class BdWaresController extends BaseController {
waresEntnyOrderVo.setWaresPrice(bdWares.getWaresPrice());
waresEntnyOrderVo.setWaresAchieve(bdWares.getWaresAchieve());
List<BdWaresDetailExt> waresDetailList = waresDetailService.selectByPkWares(bdWares.getPkId());
List<BdWaresDetailExt> waresDetailList = iBdWaresDetailService.selectByPkWares(bdWares.getPkId());
List<ProductEntnyOrderVo> productEntnyOrderList = new ArrayList<>();
for (BdWaresDetailExt bdWaresDetail : waresDetailList) {
ProductEntnyOrderVo productEntnyOrderVo = new ProductEntnyOrderVo();
@ -871,12 +839,12 @@ public class BdWaresController extends BaseController {
productEntnyOrderVo.setProductName(bdWaresDetail.getProductName());
LambdaQueryWrapper<BdWaresSpecsSku> qw = new LambdaQueryWrapper<>();
qw.eq(BdWaresSpecsSku::getPkWaresDetail, bdWaresDetail.getPkId());
List<BdWaresSpecsSku> waresSpecsSkuList = waresSpecsSkuService.list(qw);
List<BdWaresSpecsSku> waresSpecsSkuList = iBdWaresSpecsSkuService.list(qw);
List<WaresSpecsEntnyOrterVo> waresSpecsEntnyOrterVoList = new ArrayList<>();
for (BdWaresSpecsSku bdWaresSpecsSku : waresSpecsSkuList) {
WaresSpecsEntnyOrterVo waresSpecsEntnyOrterVo = new WaresSpecsEntnyOrterVo();
List<BdWaresSpecsRelationExt> waresSpecsRelation = waresSpecsRelationService.selectByWaresSpecsSku(bdWaresSpecsSku.getPkId());
List<BdWaresSpecsRelationExt> waresSpecsRelation = iBdWaresSpecsRelationService.selectByWaresSpecsSku(bdWaresSpecsSku.getPkId());
List<String> specsList = new ArrayList<>();
List<Integer> specsIds = new ArrayList<>();
for (BdWaresSpecsRelationExt bdWaresSpecsRelation : waresSpecsRelation) {
@ -906,7 +874,7 @@ public class BdWaresController extends BaseController {
public AjaxResult getEmptyOrderWares(@RequestBody EmptyOrderWares emptyOrderWares) {
List<EmptyOrderWares> resultList = new ArrayList<>();
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();
eo.setSort(i + 1);
eo.setPkWares(ws.getPkWares());
@ -925,10 +893,10 @@ public class BdWaresController extends BaseController {
eo.setProductName(ws.getProductName());
LambdaQueryWrapper<BdWaresSpecsRelation> qer = new LambdaQueryWrapper<>();
qer.eq(BdWaresSpecsRelation::getPkWaresSpecsSku, ws.getPkId());
List<BdWaresSpecsRelation> waresSpecsRelation = waresSpecsRelationService.list(qer);
List<BdWaresSpecsRelation> waresSpecsRelation = iBdWaresSpecsRelationService.list(qer);
List<String> specsList = new ArrayList<>();
for (BdWaresSpecsRelation bdWaresSpecsRelation : waresSpecsRelation) {
BdWaresSpecs waresSpecs = waresSpecsService.selectByPkId(bdWaresSpecsRelation.getPkWaresSpecs());
BdWaresSpecs waresSpecs = iBdWaresSpecsService.selectByPkId(bdWaresSpecsRelation.getPkWaresSpecs());
specsList.add(waresSpecs.getSpecsName());
}
eo.setSpecsName(StringUtils.join(specsList, ","));
@ -953,7 +921,7 @@ public class BdWaresController extends BaseController {
}
queryWrapper.eq(BdWares::getPkCountry, SecurityUtils.getPkCountry());
queryWrapper.eq(BdWares::getSystemType, SecurityUtils.getSystemType());
List<BdWares> list = waresService.list(queryWrapper);
List<BdWares> list = iBdWaresService.list(queryWrapper);
return AjaxResult.success(list);
}
@ -965,7 +933,7 @@ public class BdWaresController extends BaseController {
for (ComputeWaresPrice computeWaresPrice : computhParams.getComputeWaresPriceList()) {
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 = "商品新増审批")
@PostMapping("/wares-approve")
public AjaxResult waresApprove(@Valid @RequestBody WaresApproveParam param) {
waresService.update(Wrappers.<BdWares>lambdaUpdate()
iBdWaresService.update(Wrappers.<BdWares>lambdaUpdate()
.eq(BdWares::getPkId, param.getPkWares())
.eq(BdWares::getWaresStatus, EApproveStatus.ALREADY_SUBMIT.getValue())
.set(BdWares::getWaresStatus, EApproveStatus.FINISH.getValue())

View File

@ -16,9 +16,6 @@ import java.util.List;
/**
* 商品 Mapper 接口
*
* @author hzs
* @since 2022-09-08
*/
public interface BdWaresMapper extends BaseMapper<BdWares> {
@ -32,9 +29,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
* @param waresCodeInList 包含的商品编号列表 -- 可为null
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
* @param pkCountry 所属国家
* @return: List<BdWaresExt>
* @Author: sui q
* @Date: 2022/9/16 11:13
*/
List<BdWaresExt> queryWaresByCondition(@Param("specialArea") Integer specialArea,
@Param("pkAreaClassify") Integer pkAreaClassify,
@ -115,9 +109,6 @@ public interface BdWaresMapper extends BaseMapper<BdWares> {
* @param pkAreaClassify 所属分类
* @param waresName 名称
* @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,
@Param("waresCode") String waresCode, @Param("waresName") String waresName, @Param("pkCountry") Integer pkCountry);

View File

@ -394,11 +394,6 @@ public class WaresParams implements Serializable {
*/
private Integer sortStatus;
/**
* 发起人收益目前复购使用
*/
private BigDecimal makerIncome;
/**
* 系统类型2=新零售3=美业
*/
@ -414,4 +409,9 @@ public class WaresParams implements Serializable {
*/
private BigDecimal areaIncome;
/**
* 商品上传盒数
*/
private BigDecimal boxNum;
}

View File

@ -20,9 +20,6 @@ import java.util.Map;
/**
* 商品 服务类
*
* @author hzs
* @since 2022-09-08
*/
public interface IBdWaresService extends IService<BdWares> {
@ -58,9 +55,6 @@ public interface IBdWaresService extends IService<BdWares> {
* @param waresCodeInList 包含的商品编号列表 -- 可为null
* @param waresCodeNotInList 不包含的商品编号列表 -- 可为null
* @param pkCountry 所属国家
* @return: List<BdWaresExt>
* @Author: sui q
* @Date: 2022/9/19 9:05
*/
List<BdWaresExt> queryWaresByCondition(Integer specialArea,
Integer pkAreaClassify,
@ -76,9 +70,6 @@ public interface IBdWaresService extends IService<BdWares> {
* @param pkAreaClassify 所属分类
* @param waresName 名称
* @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);
@ -147,11 +138,7 @@ public interface IBdWaresService extends IService<BdWares> {
void updateByAutoStartAndAutoStart(Date currentTime);
/**
* @description: 修改商品预售状态
* @author: zhang jing
* @date: 2024/10/24 16:10
* @param: []
* @return: void
* 修改商品预售状态
**/
void waresPreSale();

View File

@ -54,9 +54,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
@Autowired
private RabbitTemplate rabbitTemplate;
@Autowired
private IBdSpecsService specsService;
@Autowired
private IBdWaresAuthorizeService waresAuthorizeService;
@Autowired
@ -83,17 +83,17 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
private IBdWaresAuthorityService waresAuthorityService;
@DubboReference
ILabelServiceApi labelService;
ILabelServiceApi iLabelServiceApi;
@DubboReference
IMemberServiceApi memberServiceApi;
IMemberServiceApi iMemberServiceApi;
@DubboReference
ICurrencyServiceApi currencyServiceApi;
ICurrencyServiceApi iCurrencyServiceApi;
@DubboReference
IAwardsServiceApi awardsServiceApi;
IAwardsServiceApi iAwardsServiceApi;
@DubboReference
IRangeServiceApi rangeServiceApi;
IRangeServiceApi iRangeServiceApi;
@DubboReference
ITransactionServiceApi transactionServiceApi;
ITransactionServiceApi iTransactionServiceApi;
@Override
@Transactional(rollbackFor = Exception.class)
@ -101,9 +101,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
// 设置 wares 对象的值
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
wares.setPkId(waresParams.getWaresId());
R<Integer> transaction = transactionServiceApi.createTransaction(user.getDataCountry(), ETransactionKey.SPEC, waresParams.getWaresName(), EYesNo.NO, EYesNo.NO);
wares.setWaresCode(waresParams.getWaresCode());
wares.setPkTransaction(transaction.getData());
wares.setPkCreator(user.getUserId());
wares.setPkCountry(user.getDataCountry());
wares.setSystemType(user.getSystemType());
@ -115,17 +113,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
wares.setRemovalTime(DateUtils.currentDateTime());
}
this.save(wares);
// 商品拓展表
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.setPkWares(wares.getPkId());
waresExtend.setPkCreator(user.getUserId());
@ -148,9 +138,9 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
}
waresExtendService.save(waresExtend);
// 标签关联记录
saveWaresLabel(wares, prefixLabel, coolLabel, waresParams.getPkGuaranteeLabel(), waresParams.getPkSellingPoint(), user);
// 生成产品明细
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
// 生成规格sku
@ -363,7 +353,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
for (WaresAuthorityParam waresAuthorityParam : waresAuthorityList) {
Long memberId = null;
if (StringUtils.isNotBlank(waresAuthorityParam.getMemberCode())) {
R<CuMember> member = memberServiceApi.getMember(waresAuthorityParam.getMemberCode());
R<CuMember> member = iMemberServiceApi.getMember(waresAuthorityParam.getMemberCode());
if (member.getData() == null) {
throw new BaseException("查询会员失败");
}
@ -524,19 +514,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
}
/**
* 修改商品基础信息
*
* @param waresParams
* @param user
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void updateWares(WaresParams waresParams, LoginUser user) {
BdWares wares = BeanUtil.copyProperties(waresParams, BdWares.class);
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())) {
wares.setListingTime(DateUtils.currentDateTime());
}
@ -550,19 +532,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
// 商品拓展表
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.setPkWares(wares.getPkId());
waresExtend.setPkModified(user.getUserId());
waresExtend.setModifiedTime(new Date());
// 根据商品id 修改信息
LambdaQueryWrapper<BdWaresExtend> queryWrapper = new LambdaQueryWrapper<>();
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);
// 生成产品明细
saveWaresDetail(wares, waresParams.getWaresDetailList(), user);
// 生成规格sku
saveWaresSpecsSku(wares, waresParams.getWaresSpecsSkuList(), user);
// 团队配置
saveWaresAuthority(wares, waresParams.getWaresAuthorityList(), user);
// 生成商品级差
saveWaresRange(wares, waresParams.getWaresRangeList(), user);
// 产品包装新增
@ -626,7 +599,7 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
queryWrapper1.eq(BdWaresAwards::getPkWares, wares.getPkId());
waresAwardsService.remove(queryWrapper1);
// 校验奖衔id 是否存在
R<List<BdAwards>> awardsDto = awardsServiceApi.queryAwards(waresParams.getPkCountry());
R<List<BdAwards>> awardsDto = iAwardsServiceApi.queryAwards(waresParams.getPkCountry());
List<BdAwards> awardsList = awardsDto.getData();
List<Integer> waresAwardsIdList = new ArrayList<>();
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);
}
/**
* 删除商品
*
* @param pkId
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void removeWares(Integer pkId, LoginUser loginUser) {
@ -846,22 +814,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
}
}
/**
* 根据商品外键查询商品
*
* @param waresId
* @return
*/
@Override
public BdWares getWares(Integer waresId) {
return baseMapper.selectById(waresId);
}
/**
* 查询最末商品编号
*
* @return
*/
@Override
public String getLastWaresCode() {
return baseMapper.getLastWaresCode();
@ -872,13 +829,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.selectByWaresInfo(waresParams);
}
/**
* 上移 下移
*
* @param waresId
* @param waresMoveType
* @param specialArea 所属专区
*/
@Override
public void waresMove(Integer waresId, Integer waresMoveType, LoginUser loginUser, Integer specialArea) {
BdWares bdWares = baseMapper.selectById(waresId);
@ -975,13 +925,6 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return baseMapper.selectByMoveDownSort(waresId, specialArea);
}
/**
* 置顶
*
* @param waresId
* @param loginUser
*/
@Override
public void floatingRoof(Integer waresId, LoginUser loginUser) {
BdWares bdWares = new BdWares();
@ -990,22 +933,11 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
this.updateById(bdWares);
}
/**
* 获取最大商品序号
*
* @return
*/
@Override
public Integer getMaxSort(Integer pkCountry) {
return baseMapper.getMaxSort(pkCountry);
}
/**
* 根据商品编号查询商品信息
*
* @param waresCodeList
* @return
*/
@Override
public List<BdAgreement> selectByWaresCodeList(List<String> 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);
}
/**
* 根据条件查询推荐商品 专区商品列表
*
* @param specialArea 所属专区
* @param pkAreaClassify 所属分类
* @param waresName 名称
* @param pkCountry 所属国家
* @return: List<BdWaresExt>
* @Author: sui q
* @Date: 2022/9/19 9:05
*/
@Override
public List<BdWaresExt> queryRecommendWaresByCondition(Integer specialArea, Integer pkAreaClassify, String waresName, Integer 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) {
BdLabel bdLabel;
R<LabelConfigDTO> result = labelService.getByPkId(pkId);
R<LabelConfigDTO> result = iLabelServiceApi.getByPkId(pkId);
if (result.isSuccess()) {
bdLabel = BeanUtil.copyProperties(result.getData(), BdLabel.class);
} else {
@ -1044,53 +965,30 @@ public class BdWaresServiceImpl extends ServiceImpl<BdWaresMapper, BdWares> impl
return bdLabel;
}
/**
* 修改自动上下架状态自动上架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoStart(Date currentTime) {
baseMapper.updateByAutoStartAndAutoStart(currentTime);
}
/**
* @description: 修改商品预售状态
* @author: zhang jing
* @date: 2024/10/24 16:10
* @param: []
* @return: void
**/
@Override
public void waresPreSale() {
baseMapper.waresPreSale();
}
/**
* 修改自动上下架状态自动下架
*
* @param currentTime 当前时间
*/
@Override
public void updateByAutoStartAndAutoEnd(Date currentTime) {
baseMapper.updateByAutoStartAndAutoEnd(currentTime);
}
/**
* 计算商品业绩
*/
@Override
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();
rangeList = rangeList.stream().filter(range -> range.getSystemType().equals(ESystemType.DEFAULT.getValue())).collect(Collectors.toList());
return computeWaresPrice(computeWaresPriceList, rangeList);
}
/**
* 计算商品业绩
*/
@Override
public List<ComputeWaresPrice> computeWaresPrice(List<ComputeWaresPrice> computeWaresPriceList, List<BdRangeExt> rangeList) {
// 极差

View File

@ -1,21 +1,7 @@
package com.hzs.sale.wares.vo;/**
* @Description:
* @Author: yuhui
* @Time: 2024/9/11 13:24
* @Classname: WaresDetailVo
* @PackageName: com.hzs.sale.wares.vo
*/
package com.hzs.sale.wares.vo;
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
public class WaresProductDetailVo {
/**

View File

@ -11,13 +11,6 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description:
* @Author: yuhui
* @Time: 2022/11/9 11:02
* @Classname: WaresVo
* @PackageName: com.hzs.sale.wares.vo
*/
@Data
public class WaresVo {
@ -65,14 +58,6 @@ public class WaresVo {
@BigDecimalFormat("#0.0000")
private BigDecimal waresAchieve;
/**
* 发起人收益目前复购使用
*/
@Excel(name = "发起人收益(¥)", scale = 2)
@BigDecimalFormat
private BigDecimal makerIncome;
/**
* 支付比例名称
*/
@ -116,16 +101,17 @@ public class WaresVo {
*/
@Excel(name = "产品数量")
private String productQuantitys;
/**
* 所属专区
*/
private Integer specialArea;
/**
* 所属专区
*/
@Excel(name = "所属专区")
private String specialAreaVal;
/**
* 是否单品
*/
@ -163,16 +149,17 @@ public class WaresVo {
* 是否推荐
*/
private String isRecommendVal;
/**
* 供应方式经营范围
*/
private Integer operateScope;
/**
* 供应方式经营范围
*/
@Excel(name = "供应方式")
private String operateScopeVal;
/**
* 是否出售
*/
@ -184,12 +171,11 @@ public class WaresVo {
*/
@Excel(name = "上架状态", readConverterExp = "0=上架,1=下架")
private Integer isPutOn;
/**
* 预售状态
*/
private Integer preSaleStatus;
/**
* 预售状态
*/
@ -305,4 +291,14 @@ public class WaresVo {
*/
private Date waresApprovalTime;
/**
* 复购区域分红
*/
private BigDecimal areaIncome;
/**
* 商品上传盒数
*/
private BigDecimal boxNum;
}

View File

@ -114,7 +114,6 @@
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
<result column="EDIT_FLAG" property="editFlag"/>
<result column="WARES_CODE" property="waresCode"/>
<result column="MAKER_INCOME" property="makerIncome"/>
<result column="ITEM_PK_STOREHOUSE" property="pkStorehouse"/>
</collection>
</resultMap>

View File

@ -16,27 +16,44 @@
</resultMap>
<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 id="selectByMoveUpSort" resultType="integer">
select min(ex.SORT) FROM BD_PRODUCT_EXTEND ex where ex.SORT &gt; (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 &gt; (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct})
and DEL_FLAG = '0'
</select>
<update id="updateMoveUpBySort">
update BD_PRODUCT_EXTEND set sort = sort+1 where sort &gt;= #{sort} and DEL_FLAG = '0'
update BD_PRODUCT_EXTEND
set sort = sort + 1
where sort &gt;= #{sort}
and DEL_FLAG = '0'
</update>
<select id="selectByMoveDownSort" resultType="integer">
select max(ex.SORT) FROM BD_PRODUCT_EXTEND ex where ex.SORT &lt; (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 &lt; (select sort from BD_PRODUCT_EXTEND pe where pe.pk_product = #{pkProduct})
and DEL_FLAG = '0'
</select>
<update id="updateMoveDownBySort">
update BD_PRODUCT_EXTEND set sort = sort-1 where sort &lt;= #{sort} and DEL_FLAG = '0'
update BD_PRODUCT_EXTEND
set sort = sort - 1
where sort &lt;= #{sort}
and DEL_FLAG = '0'
</update>
<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>
<!-- 查询产品扩展以及产品信息 -->

View File

@ -49,6 +49,7 @@
<result column="PK_SPECIAL_CURRENCY" property="pkSpecialCurrency"/>
<result column="SYSTEM_TYPE" property="systemType"/>
<result column="AREA_INCOME" property="areaIncome"/>
<result column="BOX_NUM" property="boxNum"/>
</resultMap>
<resultMap id="resultMap" type="com.hzs.sale.wares.vo.WaresVo">
@ -81,11 +82,12 @@
<result column="SORT_STATUS" property="sortStatus"/>
<result column="IS_MAKER_GIFT" property="isMakerGift"/>
<result column="TEMP_NAME" property="tempName"/>
<result column="MAKER_INCOME" property="makerIncome"/>
<result column="SYSTEM_TYPE" property="systemType"/>
<result column="WARES_STATUS" property="waresStatus"/>
<result column="WARES_APPROVER" property="waresApprover"/>
<result column="WARES_APPROVAL_TIME" property="waresApprovalTime"/>
<result column="AREA_INCOME" property="areaIncome"/>
<result column="BOX_NUM" property="boxNum"/>
</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,
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,
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
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

View File

@ -44,23 +44,18 @@ import java.util.stream.Collectors;
@RequestMapping("/pub/enums")
public class EnumsController extends BaseController {
private IBdSystemConfigService bdSystemConfigService;
@Autowired
public void setBdSystemConfigService(IBdSystemConfigService bdSystemConfigService) {
this.bdSystemConfigService = bdSystemConfigService;
}
private IBdSystemConfigService iBdSystemConfigService;
@Autowired
private IBdAccountService iBdAccountService;
@Autowired
private IBdGradeService gradeService;
private IBdGradeService iBdGradeService;
@Autowired
private IBdAwardsService awardsService;
private IBdAwardsService iBdAwardsService;
@Autowired
private IBdCountryService countryService;
private IBdCountryService iBdCountryService;
@Autowired
private IBdServiceChargeService serviceChargeService;
private IBdServiceChargeService iBdServiceChargeService;
@Autowired
private IBdDeliveryService iBdDeliveryService;
@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")
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")
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")
public AjaxResult specialArea() {
List<EnumEntity> enumEntityList = new ArrayList<>();
for (ESpecialArea value : ESpecialArea.values()) {
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);
}
/**
* @description: 控制类型枚举
* @author: zhang jing
* @date: 2024/6/24 10:47
* @param: []
* @return: com.hzs.common.core.web.domain.AjaxResult
* 控制类型枚举
**/
@GetMapping("/authority-control-type")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
public AjaxResult activityType() {
@ -664,7 +595,8 @@ public class EnumsController extends BaseController {
/**
* @description: 条码状态
* 条码状态
*
* @author: zhang jing
* @date: 2022/9/30 15:52
* @param: []
@ -680,7 +612,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 会员类型
* 会员类型
*
* @author: zhang jing
* @date: 2022/9/30 16:26
* @param: []
@ -696,7 +629,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 发货方式
* 发货方式
*
* @author: zhang jing
* @date: 2022/9/30 16:28
* @param: []
@ -720,7 +654,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 发货状态
* 发货状态
*
* @author: zhang jing
* @date: 2022/9/30 16:30
* @param: []
@ -736,7 +671,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 首页banner类型枚举类
* 首页banner类型枚举类
*
* @author: zhang jing
* @date: 2022/10/13 11:27
* @param: []
@ -752,7 +688,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 转账特殊设置枚举
* 转账特殊设置枚举
*
* @author: zhang jing
* @date: 2022/10/21 9:58
* @param: []
@ -768,7 +705,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 用户状态枚举
* 用户状态枚举
*
* @author: zhang jing
* @date: 2022/10/21 17:39
* @param: []
@ -784,7 +722,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 钱包状态枚举
* 钱包状态枚举
*
* @author: zhang jing
* @date: 2022/10/21 17:41
* @param: []
@ -800,7 +739,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 商品权限类型枚举
* 商品权限类型枚举
*
* @author: zhang jing
* @date: 2022/10/21 17:44
* @param: []
@ -816,7 +756,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 是否经销商枚举类
* 是否经销商枚举类
*
* @author: zhang jing
* @date: 2022/10/21 17:46
* @param: []
@ -832,7 +773,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 系统是否枚举类
* 系统是否枚举类
*
* @author: zhang jing
* @date: 2022/10/21 17:46
* @param: []
@ -859,7 +801,7 @@ public class EnumsController extends BaseController {
if (pkCountry == null) {
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")
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<>();
for (EOrderType value : EOrderType.values()) {
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);
@ -1221,7 +1163,8 @@ public class EnumsController extends BaseController {
*/
/**
* @description: 奖项枚举类
* 奖项枚举类
*
* @author: zhang jing
* @date: 2022/11/9 19:54
* @param: []
@ -1255,7 +1198,8 @@ public class EnumsController extends BaseController {
/**
* @description: 公布日期发布日期可提现日期 枚举
* 公布日期发布日期可提现日期 枚举
*
* @author: zhang jing
* @date: 2022/11/9 19:55
* @param: []
@ -1271,7 +1215,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 奖结算周期枚举
* 奖结算周期枚举
*
* @author: zhang jing
* @date: 2022/11/9 19:56
* @param: []
@ -1345,7 +1290,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 订单来源枚举
* 订单来源枚举
*
* @author: zhang jing
* @date: 2022/11/17 14:56
* @param: []
@ -1361,7 +1307,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 是否认证枚举
* 是否认证枚举
*
* @author: zhang jing
* @date: 2022/11/17 15:05
* @param: []
@ -1377,7 +1324,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 会员有效状态枚举
* 会员有效状态枚举
*
* @author: zhang jing
* @date: 2022/11/17 15:05
* @param: []
@ -1393,7 +1341,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 是否上传枚举
* 是否上传枚举
*
* @author: zhang jing
* @date: 2022/11/17 15:09
* @param: []
@ -1409,7 +1358,8 @@ public class EnumsController extends BaseController {
}
/**
* @description: 钱包账户状态
* 钱包账户状态
*
* @author: zhang jing
* @date: 2022/9/30 15:38
* @param: []
@ -1772,7 +1722,7 @@ public class EnumsController extends BaseController {
pkCountry = SecurityUtils.getPkCountry();
}
// 查询国家等级列表
List<BdGrade> gradeList = gradeService.queryGradeConfigByCondition(pkCountry);
List<BdGrade> gradeList = iBdGradeService.queryGradeConfigByCondition(pkCountry);
gradeList.sort(Comparator.comparing(BdGrade::getGradeValue));
List<EnumEntity> enumEntityList = new ArrayList<>();
@ -1794,7 +1744,7 @@ public class EnumsController extends BaseController {
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()));
@ -1947,7 +1897,7 @@ public class EnumsController extends BaseController {
//变更会员姓名
if (value.getValue() == EApprovalBusiness.CHANGE_NAME.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -1963,7 +1913,7 @@ public class EnumsController extends BaseController {
//变更联系方式
} else if (value.getValue() == EApprovalBusiness.CHANGE_PHONE.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -1979,7 +1929,7 @@ public class EnumsController extends BaseController {
//重置会员密码
} else if (value.getValue() == EApprovalBusiness.RESET_LOGIN_PASSWORD.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -1995,7 +1945,7 @@ public class EnumsController extends BaseController {
//实名认证
} else if (value.getValue() == EApprovalBusiness.REAL_NAME_AUTHENTICATION.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2011,7 +1961,7 @@ public class EnumsController extends BaseController {
//重置银行信息
} else if (value.getValue() == EApprovalBusiness.RESET_BANK.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2027,7 +1977,7 @@ public class EnumsController extends BaseController {
//修改注册等级
} else if (value.getValue() == EApprovalBusiness.CHANGE_REGISTER_GRADE.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2036,7 +1986,7 @@ public class EnumsController extends BaseController {
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapperGr.orderByAsc("GRADE_VALUE");
List<BdGrade> grList = gradeService.list(queryWrapperGr);
List<BdGrade> grList = iBdGradeService.list(queryWrapperGr);
List<EnumEntity> enumEntityList1 = new ArrayList<>();
for (BdGrade gr : grList) {
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()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2056,7 +2006,7 @@ public class EnumsController extends BaseController {
QueryWrapper<BdGrade> queryWrapperGr = new QueryWrapper();
queryWrapperGr.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
queryWrapperGr.orderByAsc("GRADE_VALUE");
List<BdGrade> grList = gradeService.list(queryWrapperGr);
List<BdGrade> grList = iBdGradeService.list(queryWrapperGr);
List<EnumEntity> enumEntityList1 = new ArrayList<>();
for (BdGrade gr : grList) {
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()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2078,7 +2028,7 @@ public class EnumsController extends BaseController {
queryWrapperAw.eq("ENABLE_STATE", EnableStatus.ENABLE.getValue());
queryWrapperAw.orderByAsc("AWARDS_VALUE");
List<EnumEntity> enumEntityList1 = new ArrayList<>();
List<BdAwards> list = awardsService.list(queryWrapperAw);
List<BdAwards> list = iBdAwardsService.list(queryWrapperAw);
for (BdAwards ba : list) {
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()) {
//修改自然国家
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
handleBusinessEnumVO.setBusinessType(value.getValue());
handleBusinessEnumVO.setEditTypeName(value.getLabel());
List<EnumEntity> enumEntityList1 = new ArrayList<>();
List<BdCountry> list = countryService.list();
List<BdCountry> list = iBdCountryService.list();
for (BdCountry value1 : list) {
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()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2122,7 +2072,7 @@ public class EnumsController extends BaseController {
//修改收益状态
} else if (value.getValue() == EApprovalBusiness.PROFIT_STATE.getValue()) {
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2139,7 +2089,7 @@ public class EnumsController extends BaseController {
} else if (value.getValue() == EApprovalBusiness.WALLET_STATE.getValue()) {
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2156,7 +2106,7 @@ public class EnumsController extends BaseController {
} else if (value.getValue() == EApprovalBusiness.FREE_ASSESSMENT_STATE.getValue()) {
handleBusinessEnumVO.setButtonType(EButtonType.MULTIPLE_CHOICE.getValue());
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2172,7 +2122,7 @@ public class EnumsController extends BaseController {
} else if (value.getValue() == EApprovalBusiness.IS_REGION.getValue()) {
//是否收益区域
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2188,7 +2138,7 @@ public class EnumsController extends BaseController {
} else if (value.getValue() == EApprovalBusiness.IS_ACTIVATE.getValue()) {
//是否激活
queryWrapper.eq("TYPE", value.getValue());
BdServiceCharge bdServiceCharge = serviceChargeService.getOne(queryWrapper);
BdServiceCharge bdServiceCharge = iBdServiceChargeService.getOne(queryWrapper);
if (StringUtils.isNotNull(bdServiceCharge)) {
handleBusinessEnumVO.setPkAccount(bdServiceCharge.getPkAccount().intValue());
}
@ -2680,10 +2630,8 @@ public class EnumsController extends BaseController {
*
* @return
*/
@GetMapping("quantity-mode-list")
@GetMapping("/quantity-mode-list")
public AjaxResult quantityModeList() {
List<EnumEntity> enumEntityList = new ArrayList<>();
for (EPostageMode value : EPostageMode.values()) {
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")
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")
public AjaxResult sheetType() {

View File

@ -80,7 +80,6 @@ public enum EOrderType {
RETAIL_PICK(46, "提货订单", 0, EnumsPrefixConstants.ORDER_TYPE + 46),
RETAIL_SHOP_ORDER(47, "店铺订单", 0, EnumsPrefixConstants.ORDER_TYPE + 47),
;
/**

View File

@ -4,11 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Description: 件数方式
* @Author: jiang chao
* @Time: 2024/4/15 16:13
* @Classname: EPostageMode
* @PackageName: com.hzs.common.core.enums
* 件数方式
*/
@AllArgsConstructor
@Getter

View File

@ -5,11 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Description: 预售状态
* @Author: jiang chao
* @Time: 2022/11/4 14:05
* @Classname: EPresaleStatus
* @PackageName: com.hzs.common.core.enums
* 预售状态
*/
@AllArgsConstructor
@Getter
@ -25,11 +21,6 @@ public enum EPresaleStatus {
*/
PRESALE(1, "预售", 0, EnumsPrefixConstants.PRESALE_STATUS + "1"),
/**
* 已售罄 2.0删除该项 已对接过设计
*/
// SOLD_OUT(2, "已售罄", 0, EnumsPrefixConstants.PRESALE_STATUS + "2"),
/**
* 缺货
*/
@ -63,4 +54,16 @@ public enum EPresaleStatus {
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 "";
}
}

View File

@ -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()),
/**
* 海粉升级
*/
HAI_FUN_UPGRADE_ORDER(27, "海粉升级", 0, EnumsPrefixConstants.ORDER_TYPE + 27, 20, EMenuDetail.UPGRADE_HAI_FUN.getValue()),
COOPERATE_AREA(22, "复购合作", 1, EnumsPrefixConstants.SPECIAL_AREA + 22, 6, EMenuDetail.COOPERATE.getValue()),
/**
* 新零售会员专区注册
@ -104,22 +99,16 @@ public enum ESpecialArea {
*/
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()) {
if (eSpecialArea.getValue() == value) {
return eSpecialArea.getLabel();
}
}
return null;
}
public static ESpecialArea getESpecialAreaEnum(int value) {
for (ESpecialArea eSpecialArea : ESpecialArea.values()) {
if (eSpecialArea.getValue() == value) {
return eSpecialArea;
}
}
return null;
return "";
}
/**

View File

@ -49,4 +49,16 @@ public enum ESupplyWay {
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 "";
}
}

View File

@ -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
@Getter
@ -59,18 +53,16 @@ public enum EWaresPermissionType {
*/
private final String key;
/**
*
*
* @param value 枚举值
* @return
*/
public static EWaresPermissionType getEnumByValue(int value) {
public static String getEnumLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EWaresPermissionType permissionType : EWaresPermissionType.values()) {
if (permissionType.getValue() == value) {
return permissionType;
return permissionType.getLabel();
}
}
return null;
return "";
}
}

View File

@ -32,18 +32,16 @@ public enum EWaresType {
*/
private final String key;
/**
* 根据枚举值获取枚举
*
* @param value 枚举值
* @return
*/
public static EWaresType getEnumByValue(int value) {
public static String getEnumLabelByValue(Integer value) {
if (null == value) {
return "";
}
for (EWaresType eApproveStatus : EWaresType.values()) {
if (eApproveStatus.getValue() == value) {
return eApproveStatus;
if (eApproveStatus.getValue().equals(value)) {
return eApproveStatus.getLabel();
}
}
return null;
return "";
}
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.hzs.common.core.web.domain.BaseEntity;
@ -12,12 +13,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 商品拓展表
* </p>
*
* @author hzs
* @since 2022-09-01
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@ -222,4 +222,11 @@ public class BdWares extends BaseEntity {
@TableField("AREA_INCOME")
private BigDecimal areaIncome;
/**
* 商品上传盒数
*/
@TableField("BOX_NUM")
private BigDecimal boxNum;
}