From b40533c553c53e145b44b569ff42737cc0bb0ad8 Mon Sep 17 00:00:00 2001 From: lele0521 Date: Thu, 4 Jan 2024 18:10:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=EF=BC=88=E5=95=86=E5=93=81=E3=80=81=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E3=80=81=E4=BF=83=E9=94=80=E7=9B=B8=E5=85=B3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=93=8D=E4=BD=9C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/modules/goods/serviceimpl/GoodsServiceImpl.java | 9 +++++++++ .../promotion/serviceimpl/PromotionGoodsServiceImpl.java | 2 ++ .../controller/passport/MemberManagerController.java | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java index bab900705..106e43e42 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java @@ -33,6 +33,7 @@ import cn.lili.modules.store.entity.dos.Store; import cn.lili.modules.store.entity.vos.StoreVO; import cn.lili.modules.store.service.FreightTemplateService; import cn.lili.modules.store.service.StoreService; +import cn.lili.modules.system.aspect.annotation.SystemLogPoint; import cn.lili.modules.system.entity.dos.Setting; import cn.lili.modules.system.entity.dto.GoodsSetting; import cn.lili.modules.system.entity.enums.SettingEnum; @@ -165,6 +166,7 @@ public class GoodsServiceImpl extends ServiceImpl implements @Override @Transactional(rollbackFor = Exception.class) + @SystemLogPoint(description = "添加商品", customerLog = "'新增商品名称:['+#goodsOperationDTO.goodsName+']'") public void addGoods(GoodsOperationDTO goodsOperationDTO) { Goods goods = new Goods(goodsOperationDTO); //检查商品 @@ -192,6 +194,7 @@ public class GoodsServiceImpl extends ServiceImpl implements @Override @Transactional(rollbackFor = Exception.class) + @SystemLogPoint(description = "修改商品", customerLog = "'操作的商品ID:['+#goodsId+']'") public void editGoods(GoodsOperationDTO goodsOperationDTO, String goodsId) { Goods goods = new Goods(goodsOperationDTO); goods.setId(goodsId); @@ -290,6 +293,7 @@ public class GoodsServiceImpl extends ServiceImpl implements } @Override + @SystemLogPoint(description = "审核商品", customerLog = "'操作的商品ID:['+#goodsIds+']', '操作后商品状态:['+#goodsAuthEnum+']'") @Transactional(rollbackFor = Exception.class) public boolean auditGoods(List goodsIds, GoodsAuthEnum goodsAuthEnum) { List goodsCacheKeys = new ArrayList<>(); @@ -312,6 +316,7 @@ public class GoodsServiceImpl extends ServiceImpl implements @Override @Transactional(rollbackFor = Exception.class) + @SystemLogPoint(description = "商品状态操作", customerLog = "'操作类型:['+#goodsStatusEnum+']', 操作对象:['+#goodsIds+']', 操作原因:['+#underReason+']'") public Boolean updateGoodsMarketAble(List goodsIds, GoodsStatusEnum goodsStatusEnum, String underReason) { boolean result; @@ -343,6 +348,7 @@ public class GoodsServiceImpl extends ServiceImpl implements * @return 更新结果 */ @Override + @SystemLogPoint(description = "店铺关闭下架商品", customerLog = "'操作类型:['+#goodsStatusEnum+']', 操作对象:['+#storeId+']', 操作原因:['+#underReason+']'") public Boolean updateGoodsMarketAbleByStoreId(String storeId, GoodsStatusEnum goodsStatusEnum, String underReason) { @@ -358,6 +364,7 @@ public class GoodsServiceImpl extends ServiceImpl implements } @Override + @SystemLogPoint(description = "管理员关闭下架商品", customerLog = "'操作类型:['+#goodsStatusEnum+']', 操作对象:['+#goodsIds+']', 操作原因:['+#underReason+']'") @Transactional(rollbackFor = Exception.class) public Boolean managerUpdateGoodsMarketAble(List goodsIds, GoodsStatusEnum goodsStatusEnum, String underReason) { boolean result; @@ -386,6 +393,7 @@ public class GoodsServiceImpl extends ServiceImpl implements @Override @Transactional(rollbackFor = Exception.class) + @SystemLogPoint(description = "删除商品", customerLog = "操作对象:['+#goodsIds+']'") public Boolean deleteGoods(List goodsIds) { LambdaUpdateWrapper updateWrapper = this.getUpdateWrapperByStoreAuthority(); @@ -432,6 +440,7 @@ public class GoodsServiceImpl extends ServiceImpl implements } @Override + @SystemLogPoint(description = "修改商品库存", customerLog = "操作的商品ID:['+#goodsId+']', 修改后的库存:['+#quantity+']'") public void updateStock(String goodsId, Integer quantity) { LambdaUpdateWrapper lambdaUpdateWrapper = Wrappers.lambdaUpdate(); lambdaUpdateWrapper.set(Goods::getQuantity, quantity); diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java index ee4e41d50..1225e623a 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java @@ -26,6 +26,7 @@ import cn.lili.modules.promotion.service.SeckillApplyService; import cn.lili.modules.promotion.tools.PromotionTools; import cn.lili.modules.search.entity.dos.EsGoodsIndex; import cn.lili.modules.search.service.EsGoodsIndexService; +import cn.lili.modules.system.aspect.annotation.SystemLogPoint; import cn.lili.mybatis.util.PageUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -273,6 +274,7 @@ public class PromotionGoodsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(PromotionGoods::getSkuId, skuId); diff --git a/manager-api/src/main/java/cn/lili/controller/passport/MemberManagerController.java b/manager-api/src/main/java/cn/lili/controller/passport/MemberManagerController.java index b64308d75..aad8564ff 100644 --- a/manager-api/src/main/java/cn/lili/controller/passport/MemberManagerController.java +++ b/manager-api/src/main/java/cn/lili/controller/passport/MemberManagerController.java @@ -11,6 +11,7 @@ import cn.lili.modules.member.entity.dto.MemberAddDTO; import cn.lili.modules.member.entity.vo.MemberSearchVO; import cn.lili.modules.member.entity.vo.MemberVO; import cn.lili.modules.member.service.MemberService; +import cn.lili.modules.system.aspect.annotation.SystemLogPoint; import com.baomidou.mybatisplus.core.metadata.IPage; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -51,6 +52,7 @@ public class MemberManagerController { } @ApiOperation(value = "添加会员") + @SystemLogPoint(description = "添加会员", customerLog = "'新增会员名称: ['+#member.username+']'") @PostMapping public ResultMessage save(@Valid MemberAddDTO member) { @@ -59,6 +61,7 @@ public class MemberManagerController { @DemoSite @PreventDuplicateSubmissions + @SystemLogPoint(description = "修改会员信息", customerLog = "'修改的会员名称: ['+#managerMemberEditDTO.username+']'") @ApiOperation(value = "修改会员基本信息") @PutMapping public ResultMessage update(@Valid ManagerMemberEditDTO managerMemberEditDTO) { @@ -67,6 +70,7 @@ public class MemberManagerController { @DemoSite @PreventDuplicateSubmissions + @SystemLogPoint(description = "修改会员状态", customerLog = "'修改的会员名称: ['+#memberIds+']', '是否开启: ['+#disabled+']'") @ApiOperation(value = "修改会员状态,开启关闭会员") @ApiImplicitParams({ @ApiImplicitParam(name = "memberIds", value = "会员ID", required = true, dataType = "String", allowMultiple = true, paramType = "query"),