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

This commit is contained in:
2024-09-27 16:08:38 +08:00
16 changed files with 479 additions and 7 deletions

View File

@@ -414,13 +414,14 @@ public class StockServiceImpl implements StockService {
detail.setType("盘点入库");
}
detail.setCreatedAt(System.currentTimeMillis());
detail.setUpdatedAt(System.currentTimeMillis());
tbProductStockDetailRepository.save(detail);
break;
case "salePrice"://价格
description.append("修改价格为" + updateValueVO.getValue());
sqlQuery.append(" set low_price = ").append(updateValueVO.getValue());
tbProductRepository.upLowPrice(product.getId(),new BigDecimal(updateValueVO.getValue()));
tbProductSkuRepository.upSalePrice(product.getId(),new BigDecimal(updateValueVO.getValue()));
tbProductSkuRepository.upSalePrice(product.getId().toString(),new BigDecimal(updateValueVO.getValue()));
break;
case "refundStock"://商品 暂停销售
if (!"0".equals(updateValueVO.getValue()) && !"1".equals(updateValueVO.getValue())) {

View File

@@ -34,7 +34,9 @@ import cn.ysk.cashier.system.domain.Dept;
import cn.ysk.cashier.system.domain.Job;
import cn.ysk.cashier.system.domain.Role;
import cn.ysk.cashier.system.domain.User;
import cn.ysk.cashier.system.enums.ParamsEnum;
import cn.ysk.cashier.system.repository.UserRepository;
import cn.ysk.cashier.system.service.ParamsService;
import cn.ysk.cashier.system.service.UserService;
import cn.ysk.cashier.utils.*;
import lombok.RequiredArgsConstructor;
@@ -75,6 +77,7 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
private final UserCacheManager userCacheManager;
private final TokenProvider tokenProvider;
private final ParamsService paramsService;
private final TbMerchantRegisterRepository merchantRegisterRepository;
@@ -109,6 +112,8 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
tbShopInfo.setSmallQrcode(smallQrcode);
tbShopInfoRepository.save(tbShopInfo);
}
String baseUrl = paramsService.getValue(ParamsEnum.SHOP_ORDER_PAY_BASE_URL.name());
tbShopInfo.setPaymentQrcode(baseUrl+"?shopId="+id);
ValidationUtil.isNull(tbShopInfo.getId(),"TbShopInfo","id",id);
return tbShopInfoMapper.toDto(tbShopInfo);
}