소스 검색

修复店铺打印机sn不能清空问题

codingliang 1 년 전
부모
커밋
f7449edf46
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/main/java/com/sqx/modules/goods/service/impl/GoodsShopServiceImpl.java

+ 4 - 4
src/main/java/com/sqx/modules/goods/service/impl/GoodsShopServiceImpl.java

@@ -263,13 +263,13 @@ public class GoodsShopServiceImpl extends ServiceImpl<GoodsShopDao, GoodsShop> i
         //snCode value
         if(StringUtils.isEmpty(goodsShop.getSnCode())){
             baseMapper.update(null, Wrappers.<GoodsShop>lambdaUpdate()
-                    .eq(GoodsShop::getSnCode, null)
-                    .set(GoodsShop::getShopId, goodsShop.getShopId()));
+                    .eq(GoodsShop::getShopId, goodsShop.getShopId())
+                    .set(GoodsShop::getSnCode , null));
         }
         if(StringUtils.isEmpty(goodsShop.getValue())){
             baseMapper.update(null, Wrappers.<GoodsShop>lambdaUpdate()
-                    .eq(GoodsShop::getValue, null)
-                    .set(GoodsShop::getShopId, goodsShop.getShopId()));
+                    .eq(GoodsShop::getShopId, goodsShop.getShopId())
+                    .set(GoodsShop::getValue, null));
         }
         return Result.success();
     }