店铺新增初始化基本数据
This commit is contained in:
@@ -11,4 +11,9 @@ import com.czg.account.entity.PointsBasicSetting;
|
|||||||
*/
|
*/
|
||||||
public interface PointsBasicSettingService extends IService<PointsBasicSetting> {
|
public interface PointsBasicSettingService extends IService<PointsBasicSetting> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化∫配置信息
|
||||||
|
* @param id 店铺id
|
||||||
|
*/
|
||||||
|
void initInfo(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,4 +15,13 @@ import org.apache.dubbo.config.annotation.DubboService;
|
|||||||
@DubboService
|
@DubboService
|
||||||
public class PointsBasicSettingServiceImpl extends ServiceImpl<PointsBasicSettingMapper, PointsBasicSetting> implements PointsBasicSettingService{
|
public class PointsBasicSettingServiceImpl extends ServiceImpl<PointsBasicSettingMapper, PointsBasicSetting> implements PointsBasicSettingService{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initInfo(Long id) {
|
||||||
|
PointsBasicSetting record = getById(id);
|
||||||
|
if (record == null) {
|
||||||
|
PointsBasicSetting pointsBasicSetting = new PointsBasicSetting();
|
||||||
|
pointsBasicSetting.setShopId(id);
|
||||||
|
save(pointsBasicSetting);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopPayTypeService shopPayTypeService;
|
private ShopPayTypeService shopPayTypeService;
|
||||||
|
@Resource
|
||||||
|
private FreeDineConfigService freeDineConfigService;
|
||||||
|
@Resource
|
||||||
|
private PointsBasicSettingService pointsBasicSettingService;
|
||||||
|
|
||||||
@DubboReference
|
@DubboReference
|
||||||
private SysParamsService sysParamsService;
|
private SysParamsService sysParamsService;
|
||||||
@@ -149,6 +153,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
|
|
||||||
// 增加支付方式
|
// 增加支付方式
|
||||||
shopPayTypeService.addInfo(shopInfo.getId());
|
shopPayTypeService.addInfo(shopInfo.getId());
|
||||||
|
// 初始化积分霸王餐设置
|
||||||
|
freeDineConfigService.getConfig(shopInfo.getId());
|
||||||
|
pointsBasicSettingService.initInfo(shopInfo.getId());
|
||||||
return updateById(shopInfo);
|
return updateById(shopInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user