Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai
2025-03-12 11:26:25 +08:00
5 changed files with 11 additions and 8 deletions

View File

@@ -26,17 +26,18 @@ import java.io.Serializable;
public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, ShopMerchant> implements ShopMerchantService {
@Override
public ShopMerchant detail() {
ShopMerchant one = queryChain().eq(ShopMerchant::getShopId, StpKit.USER.getLoginIdAsLong()).one();
public ShopMerchant detail(Integer shopId) {
ShopMerchant one = queryChain().eq(ShopMerchant::getShopId, shopId).one();
return one == null ? new ShopMerchant() : one;
}
@CacheEvict(key = "#shopMerchantEditDTO.id")
@CacheEvict(key = "#shopMerchantEditDTO.shopId")
@Override
public Boolean edit(ShopMerchantEditDTO shopMerchantEditDTO) {
ShopMerchant shopMerchant = queryChain().eq(ShopMerchant::getShopId, shopMerchantEditDTO.getShopId()).one();
if (shopMerchant == null) {
shopMerchant = new ShopMerchant();
shopMerchant.setShopId(shopMerchantEditDTO.getShopId());
BeanUtil.copyProperties(shopMerchantEditDTO, shopMerchant);
return save(shopMerchant);
}

View File

@@ -737,7 +737,7 @@ public class PayServiceImpl implements PayService {
try {
return shopMerchantService.getById(shopId);
} catch (Exception e) {
throw new CzgException(e.getMessage());
throw new CzgException("暂未开通支付");
}
}