From bd376383d5b062855af78a307a16a0ef92d980fc Mon Sep 17 00:00:00 2001
From: cabbage <281119120@qq.com>
Date: Tue, 29 Apr 2025 13:36:21 +0800
Subject: [PATCH] =?UTF-8?q?##=20=E5=95=86=E5=93=81=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=96=B0=E7=9B=B4=E9=94=80SKU=E4=B8=8D?=
=?UTF-8?q?=E9=9C=80=E8=A6=81=E5=AD=97=E6=AE=B5=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../manage/BdAreaClassifyController.java | 123 +++++++++---------
.../manage/BdClassifyController.java | 42 +++---
.../manage/BdProductController.java | 6 +-
.../service/IBdAreaClassifyService.java | 8 +-
.../product/service/IBdClassifyService.java | 6 +-
.../product/service/IBdSpecsTypeService.java | 10 +-
.../impl/BdAreaClassifyServiceImpl.java | 82 +++---------
.../service/impl/BdClassifyServiceImpl.java | 5 +-
.../service/impl/BdSpecsTypeServiceImpl.java | 94 ++++++-------
.../controller/manage/BdWaresController.java | 20 +--
.../sale/wares/param/WaresSpecsSkuParams.java | 13 +-
.../service/impl/BdWaresServiceImpl.java | 2 -
.../common/core/constant/CacheConstants.java | 10 --
.../domain/sale/wares/BdWaresSpecsSku.java | 7 -
14 files changed, 169 insertions(+), 259 deletions(-)
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdAreaClassifyController.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdAreaClassifyController.java
index 60c2cad0..d60ace67 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdAreaClassifyController.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdAreaClassifyController.java
@@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hzs.common.core.annotation.AccessPermissions;
import com.hzs.common.core.annotation.Log;
import com.hzs.common.core.constant.WaresConstants;
@@ -35,11 +35,7 @@ import java.util.Date;
import java.util.List;
/**
- * @Description: 商品分类列表
- * @Author: yuhui
- * @Time: 2022/9/5 10:57
- * @Classname: BdAreaClassifyController
- * @PackageName: com.hzs.sale.product.controller.manage
+ * 商品分类列表
*/
@Slf4j
@RestController
@@ -47,9 +43,9 @@ import java.util.List;
public class BdAreaClassifyController extends BaseController {
@Autowired
- private IBdAreaClassifyService areaClassifyService;
+ private IBdAreaClassifyService iBdAreaClassifyService;
@Autowired
- private IBdAreaClassifySpecialAreaService areaClassifySpecialAreaService;
+ private IBdAreaClassifySpecialAreaService iBdAreaClassifySpecialAreaService;
@Autowired
private UserTokenService userTokenService;
@@ -60,22 +56,22 @@ public class BdAreaClassifyController extends BaseController {
*/
@AccessPermissions("GoodsClassify")
@Log(module = EOperationModule.AREA_CLASSIFY, business = EOperationBusiness.AREA_CLASSIFY, method = EOperationMethod.SELECT)
- @GetMapping("list")
+ @GetMapping("/list")
public TableDataInfo list(AreaClassifyParam areaClassifyParam) {
startPage();
areaClassifyParam.setPkCountry(SecurityUtils.getPkCountry());
- List list = areaClassifyService.selectByAreaClassifyList(areaClassifyParam);
+ List list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
for (AreaClassifyVo areaClassifyVo : list) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("PK_AREA_CLASSIFY", areaClassifyVo.getPkId());
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassifySpecialArea::getPkAreaClassify, areaClassifyVo.getPkId());
List specialValue = new ArrayList<>();
- List specialList = areaClassifySpecialAreaService.list(queryWrapper);
+ List specialList = iBdAreaClassifySpecialAreaService.list(queryWrapper);
for (BdAreaClassifySpecialArea cps : specialList) {
specialValue.add(cps.getSpecialArea());
}
- QueryWrapper qw = new QueryWrapper<>();
- qw.eq("PK_PARENT", areaClassifyVo.getPkId());
- int count = areaClassifyService.count(qw);
+ LambdaQueryWrapper qw = new LambdaQueryWrapper<>();
+ qw.eq(BdAreaClassify::getPkParent, areaClassifyVo.getPkId());
+ int count = iBdAreaClassifyService.count(qw);
if (areaClassifyVo.getIsRecommend() == null) {
areaClassifyVo.setIsRecommend(EYesNo.NO.getIntValue());
}
@@ -91,15 +87,15 @@ public class BdAreaClassifyController extends BaseController {
* @return
*/
@Log(module = EOperationModule.AREA_CLASSIFY_SAVE, method = EOperationMethod.INSERT)
- @PostMapping("save")
+ @PostMapping("/save")
public AjaxResult save(@RequestBody AreaClassifyParam areaClassifyParam) {
if (StringUtils.isBlank(areaClassifyParam.getClassifyName())) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.SPECIAL_AREA_CLASSIFY_REQUIRED));
}
- QueryWrapper wrapper = new QueryWrapper<>();
- wrapper.eq("CLASSIFY_NAME", areaClassifyParam.getClassifyName());
- wrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
- int areaClassifyCount = areaClassifyService.count(wrapper);
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(BdAreaClassify::getClassifyName, areaClassifyParam.getClassifyName());
+ wrapper.eq(BdAreaClassify::getPkCountry, SecurityUtils.getPkCountry());
+ int areaClassifyCount = iBdAreaClassifyService.count(wrapper);
if (areaClassifyCount > 0) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.CLASSIFY_NAME_REPEAT));
}
@@ -112,19 +108,18 @@ public class BdAreaClassifyController extends BaseController {
// 表示第一级
areaClassifyParam.setHierarchy(0);
} else {
- BdAreaClassify areaClassify = areaClassifyService.getById(areaClassifyParam.getPkParent());
+ BdAreaClassify areaClassify = iBdAreaClassifyService.getById(areaClassifyParam.getPkParent());
areaClassifyParam.setHierarchy(areaClassify.getHierarchy() + 1);
}
-
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("SORT", areaClassifyParam.getSort());
- queryWrapper.eq("HIERARCHY", areaClassifyParam.getHierarchy());
- queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
- int count = areaClassifyService.count(queryWrapper);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassify::getSort, areaClassifyParam.getSort());
+ queryWrapper.eq(BdAreaClassify::getHierarchy, areaClassifyParam.getHierarchy());
+ queryWrapper.eq(BdAreaClassify::getPkCountry, SecurityUtils.getPkCountry());
+ int count = iBdAreaClassifyService.count(queryWrapper);
if (count > 0) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.SORT_REPEAT));
}
- areaClassifyService.saveAreaClassify(areaClassifyParam, userTokenService.getLoginUser());
+ iBdAreaClassifyService.saveAreaClassify(areaClassifyParam, userTokenService.getLoginUser());
return AjaxResult.success();
}
@@ -135,7 +130,7 @@ public class BdAreaClassifyController extends BaseController {
* @return
*/
@Log(module = EOperationModule.AREA_CLASSIFY_UPDATE, method = EOperationMethod.UPDATE)
- @PostMapping("update")
+ @PostMapping("/update")
public AjaxResult update(@RequestBody AreaClassifyParam areaClassifyParam) {
if (areaClassifyParam.getHierarchy() == EYesNo.YES.getIntValue()) {
// 一级
@@ -154,11 +149,11 @@ public class BdAreaClassifyController extends BaseController {
if (StringUtils.isBlank(areaClassifyParam.getClassifyName())) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.SPECIAL_AREA_CLASSIFY_REQUIRED));
}
- QueryWrapper wrapper = new QueryWrapper<>();
- wrapper.eq("CLASSIFY_NAME", areaClassifyParam.getClassifyName());
- wrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
- wrapper.notIn("PK_ID", areaClassifyParam.getPkId());
- int areaClassifyCount = areaClassifyService.count(wrapper);
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(BdAreaClassify::getClassifyName, areaClassifyParam.getClassifyName());
+ wrapper.eq(BdAreaClassify::getPkCountry, SecurityUtils.getPkCountry());
+ wrapper.notIn(BdAreaClassify::getPkId, areaClassifyParam.getPkId());
+ int areaClassifyCount = iBdAreaClassifyService.count(wrapper);
if (areaClassifyCount > 0) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.CLASSIFY_NAME_REPEAT));
}
@@ -166,16 +161,16 @@ public class BdAreaClassifyController extends BaseController {
// 排序值超出限制
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.SORT_VALUES_OVERLIMIT));
}
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("SORT", areaClassifyParam.getSort());
- queryWrapper.eq("HIERARCHY", areaClassifyParam.getHierarchy());
- queryWrapper.eq("PK_COUNTRY", SecurityUtils.getPkCountry());
- queryWrapper.notIn("PK_ID", areaClassifyParam.getPkId());
- int count = areaClassifyService.count(queryWrapper);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassify::getSort, areaClassifyParam.getSort());
+ queryWrapper.eq(BdAreaClassify::getHierarchy, areaClassifyParam.getHierarchy());
+ queryWrapper.eq(BdAreaClassify::getPkCountry, SecurityUtils.getPkCountry());
+ queryWrapper.notIn(BdAreaClassify::getPkId, areaClassifyParam.getPkId());
+ int count = iBdAreaClassifyService.count(queryWrapper);
if (count > 0) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.SORT_REPEAT));
}
- areaClassifyService.updateAreaClassify(areaClassifyParam, userTokenService.getLoginUser());
+ iBdAreaClassifyService.updateAreaClassify(areaClassifyParam, userTokenService.getLoginUser());
return AjaxResult.success();
}
@@ -187,16 +182,16 @@ public class BdAreaClassifyController extends BaseController {
@Log(module = EOperationModule.AREA_CLASSIFY_DELETE, method = EOperationMethod.DELETE)
@DeleteMapping("/{pkId}")
public AjaxResult remove(@PathVariable Integer pkId) {
- BdAreaClassify areaClassify = areaClassifyService.getAreaClassify(pkId);
+ BdAreaClassify areaClassify = iBdAreaClassifyService.getAreaClassify(pkId);
if (areaClassify.getHierarchy() == 0) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("PK_PARENT", pkId);
- int count = areaClassifyService.count(queryWrapper);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassify::getPkParent, pkId);
+ int count = iBdAreaClassifyService.count(queryWrapper);
if (count > 0) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.THIS_CLASSIFY_EXIST_BELOW));
}
}
- areaClassifyService.deleteAreaClassify(pkId);
+ iBdAreaClassifyService.deleteAreaClassify(pkId);
return AjaxResult.success();
}
@@ -215,22 +210,22 @@ public class BdAreaClassifyController extends BaseController {
areaClassify.setPkId(pkId);
areaClassify.setPkModified(SecurityUtils.getUserId());
areaClassify.setModifiedTime(new Date());
- areaClassifyService.updateById(areaClassify);
+ iBdAreaClassifyService.updateById(areaClassify);
return AjaxResult.success();
}
/**
* 查询详情
*/
- @GetMapping("detail")
+ @GetMapping("/detail")
public AjaxResult detail(Integer pkId) {
- BdAreaClassify areaClassify = areaClassifyService.getById(pkId);
+ BdAreaClassify areaClassify = iBdAreaClassifyService.getById(pkId);
AreaClassifyParam areaClassifyParam = BeanUtil.copyProperties(areaClassify, AreaClassifyParam.class);
List specialAreaList = new ArrayList<>();
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("PK_AREA_CLASSIFY", pkId);
- List list = areaClassifySpecialAreaService.list(queryWrapper);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassifySpecialArea::getPkAreaClassify, pkId);
+ List list = iBdAreaClassifySpecialAreaService.list(queryWrapper);
for (BdAreaClassifySpecialArea acs : list) {
specialAreaList.add(acs.getSpecialArea());
}
@@ -241,10 +236,10 @@ public class BdAreaClassifyController extends BaseController {
/**
* 查询第一层分类
*/
- @GetMapping("get-first-classify")
+ @GetMapping("/get-first-classify")
public AjaxResult getFirstClassify(AreaClassifyParam areaClassifyParam) {
areaClassifyParam.setHierarchy(0);
- List list = areaClassifyService.selectByAreaClassifyList(areaClassifyParam);
+ List list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
return AjaxResult.success(list);
}
@@ -254,12 +249,12 @@ public class BdAreaClassifyController extends BaseController {
* @param areaClassifyParam
* @return
*/
- @GetMapping("get-hierarchy-list")
+ @GetMapping("/get-hierarchy-list")
public AjaxResult getLevelList(AreaClassifyParam areaClassifyParam) {
TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
treeNodeConfig.setDeep(4);
areaClassifyParam.setPkCountry(SecurityUtils.getPkCountry());
- List list = areaClassifyService.selectByAreaClassifyList(areaClassifyParam);
+ List list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
List> build = TreeUtil.build(list, "0", treeNodeConfig,
(treeNode, tree) -> {
tree.setId(treeNode.getPkId().toString());
@@ -284,15 +279,15 @@ public class BdAreaClassifyController extends BaseController {
* @return
*/
@Log(module = EOperationModule.AREA_CLASSIFY_LIST, method = EOperationMethod.SELECT)
- @GetMapping("find-all")
+ @GetMapping("/find-all")
public AjaxResult findAll(AreaClassifyParam areaClassifyParam) {
- List list = areaClassifyService.selectByAreaClassifyList(areaClassifyParam);
+ List list = iBdAreaClassifyService.selectByAreaClassifyList(areaClassifyParam);
for (AreaClassifyVo areaClassifyVo : list) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("PK_AREA_CLASSIFY", areaClassifyVo.getPkId());
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(BdAreaClassifySpecialArea::getPkAreaClassify, areaClassifyVo.getPkId());
List specialValue = new ArrayList<>();
- List specialList = areaClassifySpecialAreaService.list(queryWrapper);
+ List specialList = iBdAreaClassifySpecialAreaService.list(queryWrapper);
for (BdAreaClassifySpecialArea cps : specialList) {
specialValue.add(cps.getSpecialArea());
}
@@ -306,12 +301,12 @@ public class BdAreaClassifyController extends BaseController {
*
* @return
*/
- @PostMapping("classify-recommend")
+ @PostMapping("/classify-recommend")
public AjaxResult classifyRecommend(@RequestBody AreaClassifyParam areaClassifyParam) {
BdAreaClassify bdAreaClassify = new BdAreaClassify();
bdAreaClassify.setPkId(areaClassifyParam.getPkId());
bdAreaClassify.setIsRecommend(areaClassifyParam.getIsRecommend());
- areaClassifyService.updateById(bdAreaClassify);
+ iBdAreaClassifyService.updateById(bdAreaClassify);
return AjaxResult.success();
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdClassifyController.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdClassifyController.java
index 96e6b6ed..de924993 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdClassifyController.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdClassifyController.java
@@ -32,11 +32,7 @@ import java.util.Date;
import java.util.List;
/**
- * @Description: 规格分类controller
- * @Author: yuhui
- * @Time: 2022/8/29 10:59
- * @Classname: BdClassifyController
- * @PackageName: com.hzs.sale.product.controller.manage
+ * 规格分类controller
*/
@Slf4j
@RestController
@@ -46,12 +42,12 @@ public class BdClassifyController extends BaseController {
@Autowired
private RedisService redisService;
@Autowired
- private IBdProductService productService;
+ private IBdProductService iBdProductService;
@Autowired
- private IBdClassifyService classifyService;
+ private IBdClassifyService iBdClassifyService;
@DubboReference
- ITransactionServiceApi transactionServiceApi;
+ ITransactionServiceApi iTransactionServiceApi;
/**
* 查询规格分类
@@ -61,7 +57,7 @@ public class BdClassifyController extends BaseController {
*/
@AccessPermissions("cpfl")
@Log(module = EOperationModule.SPECIFICATIONS_CONFIG, business = EOperationBusiness.PRODUCT_CLASSIFY, method = EOperationMethod.SELECT)
- @GetMapping("list")
+ @GetMapping("/list")
public TableDataInfo list(ClassIfyVo classIfyVo) {
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
if (StringUtils.isNotBlank(classIfyVo.getName())) {
@@ -72,7 +68,7 @@ public class BdClassifyController extends BaseController {
}
queryWrapper.eq(BdClassify::getPkCountry, SecurityUtils.getPkCountry());
startPage();
- List list = classifyService.list(queryWrapper);
+ List list = iBdClassifyService.list(queryWrapper);
return getDataTable(list);
}
@@ -82,21 +78,21 @@ public class BdClassifyController extends BaseController {
* @return
*/
@Log(module = EOperationModule.CLASSIFY_SAVE, method = EOperationMethod.INSERT)
- @PostMapping("save")
+ @PostMapping("/save")
public AjaxResult save(@RequestBody BdClassify classify) {
classify.setPkCreator(SecurityUtils.getUserId());
classify.setCreationTime(new Date());
classify.setPkCountry(SecurityUtils.getPkCountry());
- R transaction = transactionServiceApi.createTransaction(SecurityUtils.getPkCountry(), ETransactionKey.SPEC, classify.getName(), EYesNo.NO, EYesNo.NO);
+ R transaction = iTransactionServiceApi.createTransaction(SecurityUtils.getPkCountry(), ETransactionKey.SPEC, classify.getName(), EYesNo.NO, EYesNo.NO);
classify.setPkTransactionKey(transaction.getData());
LambdaQueryWrapper qw = new LambdaQueryWrapper<>();
qw.eq(BdClassify::getName, classify.getName());
qw.eq(BdClassify::getPkCountry, SecurityUtils.getPkCountry());
- int count = classifyService.count(qw);
+ int count = iBdClassifyService.count(qw);
if (count > 0) {
return AjaxResult.error(WaresMsgConstants.CLASSIFICATION_DUPLICATION);
}
- return AjaxResult.success(classifyService.save(classify));
+ return AjaxResult.success(iBdClassifyService.save(classify));
}
/**
@@ -105,14 +101,14 @@ public class BdClassifyController extends BaseController {
* @return
*/
@Log(module = EOperationModule.CLASSIFY_UPDATE, method = EOperationMethod.UPDATE)
- @PostMapping("update")
+ @PostMapping("/update")
public AjaxResult update(@RequestBody BdClassify classify) {
classify.setPkModified(SecurityUtils.getUserId());
classify.setModifiedTime(new Date());
classify.setPkCountry(SecurityUtils.getPkCountry());
String redisKey = CacheConstants.BD_CLASSIFY + classify.getPkId();
redisService.deleteObject(redisKey);
- return AjaxResult.success(classifyService.updateById(classify));
+ return AjaxResult.success(iBdClassifyService.updateById(classify));
}
@@ -135,11 +131,11 @@ public class BdClassifyController extends BaseController {
redisService.deleteObject(redisKey);
LambdaQueryWrapper qw = new LambdaQueryWrapper<>();
qw.eq(BdProduct::getPkClassify, pkId);
- int count = productService.count(qw);
+ int count = iBdProductService.count(qw);
if (count > 0) {
return AjaxResult.error(WaresMsgConstants.WARES_CLASSIFY_IS_USE);
}
- return toAjax(classifyService.update(updateWrapper));
+ return toAjax(iBdClassifyService.update(updateWrapper));
}
/**
@@ -150,7 +146,7 @@ public class BdClassifyController extends BaseController {
*/
@GetMapping("detail")
public AjaxResult detail(Long classifyId) {
- return AjaxResult.success(classifyService.getById(classifyId));
+ return AjaxResult.success(iBdClassifyService.getById(classifyId));
}
@@ -167,7 +163,7 @@ public class BdClassifyController extends BaseController {
classify.setPkId(pkId);
classify.setPkModified(SecurityUtils.getUserId());
classify.setModifiedTime(new Date());
- return toAjax(classifyService.updateById(classify));
+ return toAjax(iBdClassifyService.updateById(classify));
}
/**
@@ -175,11 +171,11 @@ public class BdClassifyController extends BaseController {
*
* @return
*/
- @GetMapping("find-all")
+ @GetMapping("/find-all")
public AjaxResult findAll() {
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(BdClassify::getPkCountry, SecurityUtils.getPkCountry());
- return AjaxResult.success(classifyService.list(queryWrapper));
+ return AjaxResult.success(iBdClassifyService.list(queryWrapper));
}
/**
@@ -196,7 +192,7 @@ public class BdClassifyController extends BaseController {
queryWrapper.eq(BdClassify::getName, classify.getName());
}
List resultList = new ArrayList<>();
- List list = classifyService.list(queryWrapper);
+ List list = iBdClassifyService.list(queryWrapper);
for (BdClassify bdClassify : list) {
ClassIfyVo classIfyVo = new ClassIfyVo();
classIfyVo.setCreationTime(bdClassify.getCreationTime());
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdProductController.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdProductController.java
index f38ec171..585abb9f 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdProductController.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/controller/manage/BdProductController.java
@@ -81,7 +81,7 @@ public class BdProductController extends BaseController {
*/
@AccessPermissions("ProductList")
@Log(module = EOperationModule.PRODUCT_LIST, business = EOperationBusiness.PRODUCT_LIST, method = EOperationMethod.SELECT)
- @GetMapping("list")
+ @GetMapping("/list")
public TableDataInfo list(ProductParams productParams) {
if (productParams.getShippingType() != null) {
if (productParams.getShippingType() == 1) {
@@ -133,7 +133,7 @@ public class BdProductController extends BaseController {
* 新增商品信息
*/
@Log(module = EOperationModule.PRODUCT_SAVE, method = EOperationMethod.INSERT, business = EOperationBusiness.PRODUCT_RELEASE)
- @PostMapping("save")
+ @PostMapping("/save")
public AjaxResult save(@RequestBody ProductParams productParams) {
if (StringUtils.isBlank(productParams.getProductName())) {
return AjaxResult.error(TransactionUtils.getContent(ProductMsgConstants.PRODUCT_NAME_REQUIRED));
@@ -222,7 +222,7 @@ public class BdProductController extends BaseController {
* @return
*/
@Log(module = EOperationModule.PRODUCT_UPDATE, method = EOperationMethod.UPDATE, business = EOperationBusiness.PRODUCT_UPDATE)
- @PostMapping("update")
+ @PostMapping("/update")
public AjaxResult update(@RequestBody ProductParams productParams) {
// 查询订单编号是否重复
BdProduct product = iBdProductService.getById(productParams.getPkId());
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdAreaClassifyService.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdAreaClassifyService.java
index ea4428cd..2b02e7b5 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdAreaClassifyService.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdAreaClassifyService.java
@@ -1,6 +1,5 @@
package com.hzs.sale.product.service;
-
import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.sale.product.BdAreaClassify;
import com.hzs.sale.product.controller.manage.params.AreaClassifyParam;
@@ -10,9 +9,7 @@ import com.hzs.system.sys.dto.LoginUser;
import java.util.List;
/**
- *
* 商品分类 服务类
- *
*
* @author hzs
* @since 2022-09-05
@@ -21,6 +18,7 @@ public interface IBdAreaClassifyService extends IService {
/**
* 新增商品分类
+ *
* @param areaClassifyParam
* @param loginUser
*/
@@ -28,6 +26,7 @@ public interface IBdAreaClassifyService extends IService {
/**
* 修改商品分类
+ *
* @param areaClassifyParam
* @param loginUser
*/
@@ -35,6 +34,7 @@ public interface IBdAreaClassifyService extends IService {
/**
* 根据主键查询商品分类
+ *
* @param areaClassifyId
* @return
*/
@@ -42,6 +42,7 @@ public interface IBdAreaClassifyService extends IService {
/**
* 查询商品分类列表
+ *
* @param areaClassifyParam
* @return
*/
@@ -49,6 +50,7 @@ public interface IBdAreaClassifyService extends IService {
/**
* 删除
+ *
* @param pkId
*/
void deleteAreaClassify(Integer pkId);
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdClassifyService.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdClassifyService.java
index a4d882ba..3991777f 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdClassifyService.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdClassifyService.java
@@ -3,22 +3,20 @@ package com.hzs.sale.product.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.sale.classify.BdClassify;
-
/**
- *
* 规格分类 服务类
- *
*
* @author hzs
* @since 2022-08-26
*/
public interface IBdClassifyService extends IService {
-
/**
* 根据id 查询详情
+ *
* @param classifyId
* @return
*/
BdClassify getClassify(Integer classifyId);
+
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdSpecsTypeService.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdSpecsTypeService.java
index c98f7ad4..fda04b17 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdSpecsTypeService.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/IBdSpecsTypeService.java
@@ -8,11 +8,8 @@ import com.hzs.system.sys.dto.LoginUser;
import java.util.List;
-
/**
- *
* 规格类型表 服务类
- *
*
* @author hzs
* @since 2022-08-27
@@ -21,18 +18,21 @@ public interface IBdSpecsTypeService extends IService {
/**
* 根据id 查询规格分类
+ *
* @return
*/
BdSpecsType getSpecsType(Integer specsTypeId);
/**
* 新增规格分类
+ *
* @param specsTypeParam
*/
void saveSpecsType(SpecsTypeParam specsTypeParam, LoginUser loginUser);
/**
* 修改规格分类
+ *
* @param specsTypeParam
* @param loginUser
*/
@@ -40,6 +40,7 @@ public interface IBdSpecsTypeService extends IService {
/**
* 查询列表
+ *
* @param specsType
* @return
*/
@@ -47,7 +48,8 @@ public interface IBdSpecsTypeService extends IService {
/**
* 删除
+ *
* @param pkId
*/
- void deleteBySpecsTypeId(Integer pkId,LoginUser loginUser);
+ void deleteBySpecsTypeId(Integer pkId, LoginUser loginUser);
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java
index 0bd08c5c..75eb2ecc 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdAreaClassifyServiceImpl.java
@@ -1,14 +1,12 @@
package com.hzs.sale.product.service.impl;
import cn.hutool.core.bean.BeanUtil;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.hzs.common.core.constant.CacheConstants;
import com.hzs.common.core.domain.R;
import com.hzs.common.core.enums.EDelFlag;
import com.hzs.common.core.enums.ETransactionKey;
import com.hzs.common.core.enums.EYesNo;
-import com.hzs.common.core.service.RedisService;
import com.hzs.common.domain.sale.product.BdAreaClassify;
import com.hzs.common.domain.sale.product.BdAreaClassifySpecialArea;
import com.hzs.common.security.utils.SecurityUtils;
@@ -30,28 +28,17 @@ import java.util.List;
/**
* 商品分类 服务实现类
- *
- * @author hzs
- * @since 2022-09-05
*/
@Service
public class BdAreaClassifyServiceImpl extends ServiceImpl implements IBdAreaClassifyService {
@Autowired
- private RedisService redisService;
+ private IBdAreaClassifyService iBdAreaClassifyService;
@Autowired
- private IBdAreaClassifyService areaClassifyService;
- @Autowired
- private IBdAreaClassifySpecialAreaService areaClassifySpecialAreaService;
+ private IBdAreaClassifySpecialAreaService iBdAreaClassifySpecialAreaService;
@DubboReference
- ITransactionServiceApi transactionServiceApi;
+ ITransactionServiceApi iTransactionServiceApi;
- /**
- * 新增商品分类
- *
- * @param areaClassifyParam 分类对象
- * @param loginUser 登录用户
- */
@Override
@Transactional(rollbackFor = Exception.class)
public void saveAreaClassify(AreaClassifyParam areaClassifyParam, LoginUser loginUser) {
@@ -59,7 +46,7 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl transaction = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO);
+ R transaction = iTransactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO);
areaClassify.setPkTransactionKey(transaction.getData());
baseMapper.insert(areaClassify);
List list = new ArrayList<>();
@@ -76,28 +63,21 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl 0) {
- areaClassifySpecialAreaService.saveBatch(list);
+ iBdAreaClassifySpecialAreaService.saveBatch(list);
}
-
}
- /**
- * 修改商品分类
- *
- * @param areaClassifyParam 分类对象
- * @param loginUser 当前登录用户
- */
@Override
@Transactional(rollbackFor = Exception.class)
public void updateAreaClassify(AreaClassifyParam areaClassifyParam, LoginUser loginUser) {
BdAreaClassify areaClassify = BeanUtil.copyProperties(areaClassifyParam, BdAreaClassify.class);
areaClassify.setPkModified(loginUser.getUserId());
areaClassify.setModifiedTime(new Date());
- R transaction = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO);
+ R transaction = iTransactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, areaClassify.getClassifyName(), EYesNo.NO, EYesNo.NO);
areaClassify.setPkTransactionKey(transaction.getData());
baseMapper.updateById(areaClassify);
// 清空 中间表数据重新添加
- areaClassifySpecialAreaService.deleteByAreaClassifyPk(areaClassify.getPkId());
+ iBdAreaClassifySpecialAreaService.deleteByAreaClassifyPk(areaClassify.getPkId());
List list = new ArrayList<>();
if (areaClassifyParam.getSpecialAreaList() != null) {
for (Integer number : areaClassifyParam.getSpecialAreaList()) {
@@ -111,38 +91,15 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl 0) {
- areaClassifySpecialAreaService.saveBatch(list);
+ iBdAreaClassifySpecialAreaService.saveBatch(list);
}
- // 删除缓存
- String redisKey = CacheConstants.BD_AREA_CLASSIFY + areaClassify.getPkId();
- redisService.deleteObject(redisKey);
}
- /**
- * 根据主键查询商品分类
- *
- * @param areaClassifyId
- * @return
- */
@Override
public BdAreaClassify getAreaClassify(Integer areaClassifyId) {
- String redisKey = CacheConstants.BD_AREA_CLASSIFY + areaClassifyId;
- BdAreaClassify areaClassify = redisService.getCacheObject(redisKey);
- if (null == areaClassify) {
- areaClassify = baseMapper.selectById(areaClassifyId);
- if (null != areaClassify) {
- redisService.setCacheObject(redisKey, areaClassify);
- }
- }
- return areaClassify;
+ return baseMapper.selectById(areaClassifyId);
}
- /**
- * 查询商品分类列表
- *
- * @param areaClassifyParam
- * @return
- */
@Override
public List selectByAreaClassifyList(AreaClassifyParam areaClassifyParam) {
return baseMapper.selectByAreaClassifyList(areaClassifyParam);
@@ -151,18 +108,15 @@ public class BdAreaClassifyServiceImpl extends ServiceImpl bdAreaClassify = new LambdaUpdateWrapper<>();
+ bdAreaClassify.eq(BdAreaClassify::getPkId, pkId);
+ bdAreaClassify.set(BdAreaClassify::getPkModified, SecurityUtils.getUserId());
+ bdAreaClassify.set(BdAreaClassify::getModifiedTime, new Date());
+ bdAreaClassify.set(BdAreaClassify::getDelFlag, EDelFlag.DELETE.getValue());
+ iBdAreaClassifyService.update(bdAreaClassify);
- UpdateWrapper bdAreaClassify = new UpdateWrapper<>();
- bdAreaClassify.eq("PK_ID", pkId);
- bdAreaClassify.set("PK_MODIFIED", SecurityUtils.getUserId());
- bdAreaClassify.set("MODIFIED_TIME", new Date());
- bdAreaClassify.set("DEL_FLAG", EDelFlag.DELETE.getValue());
- areaClassifyService.update(bdAreaClassify);
-
- // 删除缓存
- String redisKey = CacheConstants.BD_AREA_CLASSIFY + pkId;
- redisService.deleteObject(redisKey);
// 清空 中间表数据重新添加
- areaClassifySpecialAreaService.deleteByAreaClassifyPk(pkId);
+ iBdAreaClassifySpecialAreaService.deleteByAreaClassifyPk(pkId);
}
+
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdClassifyServiceImpl.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdClassifyServiceImpl.java
index 582e47c0..c7f11322 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdClassifyServiceImpl.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/product/service/impl/BdClassifyServiceImpl.java
@@ -4,16 +4,13 @@ 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.classify.BdClassify;
-import com.hzs.common.domain.sale.postage.BdPostage;
import com.hzs.sale.product.mapper.BdClassifyMapper;
import com.hzs.sale.product.service.IBdClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
- *
* 规格分类 服务实现类
- *
*
* @author hzs
* @since 2022-08-26
@@ -23,8 +20,10 @@ public class BdClassifyServiceImpl extends ServiceImpl
* 规格类型表 服务实现类
- *
- *
- * @author hzs
- * @since 2022-08-27
*/
@Service
public class BdSpecsTypeServiceImpl extends ServiceImpl implements IBdSpecsTypeService {
+
@Autowired
private RedisService redisService;
+ @Autowired
+ private IBdSpecsTypeService iBdSpecsTypeService;
+ @Autowired
+ private IBdSpecsService iBdSpecsService;
@DubboReference
- private ITransactionServiceApi transactionServiceApi;
- @Autowired
- private IBdSpecsTypeService specsTypeService;
- @Autowired
- private IBdSpecsService specsService;
+ ITransactionServiceApi iTransactionServiceApi;
+
/**
* 根据id 查询规格分类
+ *
* @return
*/
@Override
@@ -75,7 +73,7 @@ public class BdSpecsTypeServiceImpl extends ServiceImpl transaction = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, specsTypeParam.getTypeName(), EYesNo.NO,EYesNo.NO);
+ R transaction = iTransactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, specsTypeParam.getTypeName(), EYesNo.NO, EYesNo.NO);
bdSpecsType.setPkTransactionKey(transaction.getData());
baseMapper.insert(bdSpecsType);
List specsList = new ArrayList<>();
@@ -86,18 +84,19 @@ public class BdSpecsTypeServiceImpl extends ServiceImpl trans = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, bdSpecs.getSpecsName(), EYesNo.NO,EYesNo.NO);
+ R trans = iTransactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, bdSpecs.getSpecsName(), EYesNo.NO, EYesNo.NO);
bdSpecs.setPkTransactionKey(trans.getData());
specsList.add(bdSpecs);
}
- specsService.saveBatch(specsList);
+ iBdSpecsService.saveBatch(specsList);
String redisKey = CacheConstants.BD_SPECS_TYPE + bdSpecsType.getPkId();
redisService.deleteObject(redisKey);
}
/**
* 修改规格分类
+ *
* @param specsTypeParam
* @param loginUser
*/
@@ -111,48 +110,49 @@ public class BdSpecsTypeServiceImpl extends ServiceImpl specsId = new ArrayList<>();
for (SpecsParam specsParam : specsTypeParam.getSpecsList()) {
- if (specsParam.getSpecsId() != null){
+ if (specsParam.getSpecsId() != null) {
specsId.add(specsParam.getSpecsId());
}
}
- specsService.remove(new QueryWrapper().notIn("PK_ID",specsId).eq("PK_SPECS_TYPE",specsTypeParam.getPkId()));
+ iBdSpecsService.remove(new QueryWrapper().notIn("PK_ID", specsId).eq("PK_SPECS_TYPE", specsTypeParam.getPkId()));
List specsList = new ArrayList<>();
for (SpecsParam specs : specsTypeParam.getSpecsList()) {
BdSpecs bdSpecs = new BdSpecs();
- if (specs.getSpecsId() != null){
- BdSpecs sp = specsService.getById(specs.getSpecsId());
- sp.setSpecsName(specs.getValue());
- sp.setModifiedTime(new Date());
- sp.setPkModified(SecurityUtils.getUserId());
- sp.setDelFlag(EDelFlag.UN_DELETE.getValue());
- specsService.updateById(sp);
- }else {
- bdSpecs.setPkSpecsType(bdSpecsType.getPkId());
- bdSpecs.setSpecsName(specs.getValue());
- bdSpecs.setPkCreator(SecurityUtils.getUserId());
- bdSpecs.setCreationTime(new Date());
- bdSpecs.setPkCountry(SecurityUtils.getPkCountry());
- R trans = transactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, bdSpecs.getSpecsName(),EYesNo.NO,EYesNo.NO);
- bdSpecs.setPkTransactionKey(trans.getData());
- specsList.add(bdSpecs);
- }
+ if (specs.getSpecsId() != null) {
+ BdSpecs sp = iBdSpecsService.getById(specs.getSpecsId());
+ sp.setSpecsName(specs.getValue());
+ sp.setModifiedTime(new Date());
+ sp.setPkModified(SecurityUtils.getUserId());
+ sp.setDelFlag(EDelFlag.UN_DELETE.getValue());
+ iBdSpecsService.updateById(sp);
+ } else {
+ bdSpecs.setPkSpecsType(bdSpecsType.getPkId());
+ bdSpecs.setSpecsName(specs.getValue());
+ bdSpecs.setPkCreator(SecurityUtils.getUserId());
+ bdSpecs.setCreationTime(new Date());
+ bdSpecs.setPkCountry(SecurityUtils.getPkCountry());
+ R trans = iTransactionServiceApi.createTransaction(loginUser.getDataCountry(), ETransactionKey.SPEC, bdSpecs.getSpecsName(), EYesNo.NO, EYesNo.NO);
+ bdSpecs.setPkTransactionKey(trans.getData());
+ specsList.add(bdSpecs);
+ }
}
- if (specsList.size() > 0){
- specsService.saveBatch(specsList);
+ if (specsList.size() > 0) {
+ iBdSpecsService.saveBatch(specsList);
}
String redisKey = CacheConstants.BD_SPECS_TYPE + bdSpecsType.getPkId();
redisService.deleteObject(redisKey);
}
+
/**
* 查询列表
+ *
* @param specsType
* @return
*/
@@ -161,25 +161,27 @@ public class BdSpecsTypeServiceImpl extends ServiceImpl updateWrapper = new UpdateWrapper();
- updateWrapper.eq("PK_ID",pkId);
- updateWrapper.set("DEL_FLAG",EDelFlag.DELETE.getValue());
- updateWrapper.set("MODIFIED_TIME",new Date());
- updateWrapper.set("PK_MODIFIED",loginUser.getUserId());
- specsTypeService.update(updateWrapper);
+ updateWrapper.eq("PK_ID", pkId);
+ updateWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
+ updateWrapper.set("MODIFIED_TIME", new Date());
+ updateWrapper.set("PK_MODIFIED", loginUser.getUserId());
+ iBdSpecsTypeService.update(updateWrapper);
UpdateWrapper updateSpecsWrapper = new UpdateWrapper<>();
- updateSpecsWrapper.eq("PK_SPECS_TYPE",pkId);
- updateSpecsWrapper.set("MODIFIED_TIME",new Date());
- updateSpecsWrapper.set("PK_MODIFIED",loginUser.getUserId());
+ updateSpecsWrapper.eq("PK_SPECS_TYPE", pkId);
+ updateSpecsWrapper.set("MODIFIED_TIME", new Date());
+ updateSpecsWrapper.set("PK_MODIFIED", loginUser.getUserId());
updateSpecsWrapper.set("DEL_FLAG", EDelFlag.DELETE.getValue());
- specsService.update(updateSpecsWrapper);
+ iBdSpecsService.update(updateSpecsWrapper);
String redisKey = CacheConstants.BD_SPECS_TYPE + pkId;
redisService.deleteObject(redisKey);
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java
index 107c3d13..26193ce6 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/controller/manage/BdWaresController.java
@@ -53,22 +53,15 @@ 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;
+ ICurrencyServiceApi iCurrencyServiceApi;
@DubboReference
- IRangeServiceApi rangeServiceApi;
+ IRangeServiceApi iRangeServiceApi;
@Autowired
private IBdWaresAuthorizeService waresAuthorizeService;
@@ -122,7 +115,7 @@ public class BdWaresController extends BaseController {
waresParams.setPkCountry(SecurityUtils.getPkCountry());
List resultList = waresService.selectByWaresInfo(waresParams);
if (CollectionUtil.isNotEmpty(resultList)) {
- R currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
+ R currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
resultList.parallelStream().forEach(waresVo -> {
WaresAuthorityVo waresAuthorityVo = waresService.getWaresAuthorityFirst(waresVo.getPkWares());
@@ -156,7 +149,7 @@ public class BdWaresController extends BaseController {
List resultList = waresService.selectByWaresInfo(waresParams);
if (CollectionUtil.isNotEmpty(resultList)) {
- R currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
+ R currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
// 获取需要翻译的枚举翻译
Map transactionMap = iTransactionCommonService.exportEnumTransaction(ESpecialArea.values(), EYesNo.values(), ESupplyWay.values(), EPresaleStatus.values());
@@ -851,7 +844,7 @@ public class BdWaresController extends BaseController {
*/
@GetMapping("/detail")
public AjaxResult detail(Long pkId) {
- R> rangeDto = rangeServiceApi.queryRange(SecurityUtils.getPkCountry());
+ R> rangeDto = iRangeServiceApi.queryRange(SecurityUtils.getPkCountry());
List rsList = rangeDto.getData();
Map rangeMap = rsList.stream().collect(Collectors.toMap(BdRangeExt::getPkId, Function.identity()));
@@ -909,7 +902,7 @@ public class BdWaresController extends BaseController {
waresParams.setSortStatus(wares.getSortStatus());
waresParams.setSystemType(waresExtend.getSystemType());
if (waresExtend.getMakerIncome() != null) {
- R currencyDto = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
+ R currencyDto = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry());
waresParams.setMakerIncome(waresExtend.getMakerIncome().multiply(currencyDto.getData().getInExchangeRate()));
}
@@ -996,7 +989,6 @@ public class BdWaresController extends BaseController {
specsSkuParams.setIsPutOn(bdWaresSpecsSku.getIsPutOn());
specsSkuParams.setVipPrice(bdWaresSpecsSku.getVipPrice());
specsSkuParams.setRetailPrice(bdWaresSpecsSku.getRetailPrice());
- specsSkuParams.setSkuCode(bdWaresSpecsSku.getSkuCode());
// 每个规格的sku键值对
List waresSpecsList = new ArrayList<>();
LambdaQueryWrapper waresSpecsRelation = new LambdaQueryWrapper<>();
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/param/WaresSpecsSkuParams.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/param/WaresSpecsSkuParams.java
index 754bbaa7..28b0ba67 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/param/WaresSpecsSkuParams.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/param/WaresSpecsSkuParams.java
@@ -1,21 +1,11 @@
package com.hzs.sale.wares.param;
-import com.baomidou.mybatisplus.annotation.TableField;
import com.hzs.common.domain.sale.wares.BdWaresSpecs;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
-/**
- * @Description:
- * @Author: yuhui
- * @Time: 2022/11/7 15:54
- * @Classname: WaresSpecsParams
- * @PackageName: com.hzs.sale.wares.param
- */
-
-
@Data
public class WaresSpecsSkuParams {
@@ -56,7 +46,7 @@ public class WaresSpecsSkuParams {
private BigDecimal assAchieve;
/**
- /**
+ * /**
* 规格明细表
*/
private List waresSpecsList;
@@ -73,5 +63,4 @@ public class WaresSpecsSkuParams {
*/
private BigDecimal retailPrice;
- private String skuCode;
}
diff --git a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/service/impl/BdWaresServiceImpl.java b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/service/impl/BdWaresServiceImpl.java
index 2a8a26f2..cd4ff8c9 100644
--- a/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/service/impl/BdWaresServiceImpl.java
+++ b/bd-business/bd-business-sale/src/main/java/com/hzs/sale/wares/service/impl/BdWaresServiceImpl.java
@@ -457,7 +457,6 @@ public class BdWaresServiceImpl extends ServiceImpl impl
bdWaresSpecsSku.setAssAchieve(waresSpecsSkuParams.getAssAchieve());
bdWaresSpecsSku.setVipPrice(waresSpecsSkuParams.getVipPrice());
bdWaresSpecsSku.setRetailPrice(waresSpecsSkuParams.getRetailPrice());
- bdWaresSpecsSku.setSkuCode(waresSpecsSkuParams.getSkuCode());
iBdWaresSpecsSkuService.save(bdWaresSpecsSku);
// 生成规格明细表
List waresSpecsList = waresSpecsSkuParams.getWaresSpecsList();
@@ -519,7 +518,6 @@ public class BdWaresServiceImpl extends ServiceImpl impl
} else {
sku.setIsPutOn(EYesNo.YES.getIntValue());
}
- sku.setSkuCode(waresSpecsSkuParams.getSkuCode());
iBdWaresSpecsSkuService.updateBySkuId(sku);
redisService.deleteObject(CacheConstants.BD_WARES_SPECS_RELATION + bdWaresSpecsSku.getPkId());
}
diff --git a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
index fbfc1fb3..9ab1a522 100644
--- a/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
+++ b/bd-common/bd-common-core/src/main/java/com/hzs/common/core/constant/CacheConstants.java
@@ -137,11 +137,6 @@ public class CacheConstants {
*/
public static final String BD_POSTAGE = CACHE_PREFIX + "postage:";
- /**
- * 商品分类
- */
- public static final String BD_AREA_CLASSIFY = CACHE_PREFIX + "area:classify:";
-
/**
* 规格分类
*/
@@ -237,11 +232,6 @@ public class CacheConstants {
*/
public static final String BD_BONUS_ITEMS = CACHE_PREFIX + "bonus:items:";
- /**
- * 配送中心配置
- */
- public static final String BD_SHOP = CACHE_PREFIX + "shop:";
-
/**
* 极差配置
*/
diff --git a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/sale/wares/BdWaresSpecsSku.java b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/sale/wares/BdWaresSpecsSku.java
index 4aa9081b..2bb5bb83 100644
--- a/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/sale/wares/BdWaresSpecsSku.java
+++ b/bd-common/bd-common-domain/src/main/java/com/hzs/common/domain/sale/wares/BdWaresSpecsSku.java
@@ -12,9 +12,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
- *
* 规格sku表
- *
*
* @author hzs
* @since 2022-09-09
@@ -88,9 +86,4 @@ public class BdWaresSpecsSku extends BaseEntity {
@TableField("RETAIL_PRICE")
private BigDecimal retailPrice;
- /**
- * sku编码
- */
- @TableField("SKU_CODE")
- private String skuCode;
}