商户信息接口bug修复
This commit is contained in:
@@ -26,8 +26,8 @@ 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;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user