Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.account.dto.ShopConfigDTO;
|
||||
import com.czg.account.entity.ShopConfig;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
@@ -50,6 +51,24 @@ public class ShopConfigServiceImpl extends ServiceImpl<ShopConfigMapper, ShopCon
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean editConfig(Long shopId, ShopConfig shopConfig) {
|
||||
ShopConfig info = getById(shopId);
|
||||
if (info == null) {
|
||||
info = new ShopConfig();
|
||||
BeanUtil.copyProperties(shopConfig, info);
|
||||
info.setId(shopId);
|
||||
info.setMainId(shopInfoMapper.selectOneByQuery(new QueryWrapper().eq(ShopInfo::getId, shopId)).getMainId());
|
||||
info.setId(shopId);
|
||||
save(info);
|
||||
}else {
|
||||
BeanUtil.copyProperties(shopConfig, info);
|
||||
updateById(info);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editStatusByShopIdList(Long mainShopId, Integer isEnable, boolean onyUpValid, String property, String useShopType, List<Long> shopIdList) {
|
||||
ShopConfig shopConfig = getById(mainShopId);
|
||||
|
||||
Reference in New Issue
Block a user