diy模板新增创建空白模板,移除可选用的已使用的模板
This commit is contained in:
parent
feacac879a
commit
90315b979f
@ -132,6 +132,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
}else {
|
||||
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label))) {
|
||||
current_tpl = item;
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -553,5 +554,18 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
return shopPageAppService.deletePageApp(appId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建空白模板
|
||||
* @param appName 模板名称
|
||||
* @param appIndustry 行业
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "店铺风格表-创建空白模板", notes = "店铺风格表-创建空白模板")
|
||||
@RequestMapping(value = "/createBlankPageApp", method = RequestMethod.POST)
|
||||
public CommonResult createBlankPageApp(@RequestParam(name = "appName") String appName,
|
||||
@RequestParam(name = "appIndustry",required = false,defaultValue = "0") String appIndustry) {
|
||||
return shopPageAppService.createBlankPageApp(appName,appIndustry);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -60,4 +60,6 @@ public interface ShopPageAppService extends IBaseService<ShopPageApp> {
|
||||
CommonResult copyDiyByAppId(Integer appId,String newAppName,String appIndustry);
|
||||
|
||||
CommonResult deletePageApp(Integer appId);
|
||||
|
||||
CommonResult createBlankPageApp(String appName,String appIndustry);
|
||||
}
|
||||
|
||||
@ -1107,6 +1107,32 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult createBlankPageApp(String appName,String appIndustry) {
|
||||
UserDto userDto= ContextUtil.getCurrentUser();
|
||||
if (userDto == null) {
|
||||
throw new ApiException("用户未登录");
|
||||
}
|
||||
if(userDto.getRole_id()==0){
|
||||
throw new ApiException("用户无权限");
|
||||
}
|
||||
ShopPageApp shopPageApp = new ShopPageApp();
|
||||
shopPageApp.setApp_name(appName);
|
||||
shopPageApp.setApp_code("[]");
|
||||
shopPageApp.setTpl_id(107);
|
||||
shopPageApp.setTpl_image("");
|
||||
shopPageApp.setStore_id(Integer.valueOf(userDto.getStore_id()));
|
||||
shopPageApp.setUser_id(userDto.getId());
|
||||
shopPageApp.setSubsite_id(0);
|
||||
shopPageApp.setApp_buildin(0);
|
||||
shopPageApp.setApp_type(3);
|
||||
shopPageApp.setApp_tpl("");
|
||||
shopPageApp.setApp_member_center("");
|
||||
shopPageApp.setApp_industry(appIndustry);
|
||||
shopPageAppService.save(shopPageApp);
|
||||
return CommonResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生产新的id
|
||||
@ -1121,6 +1147,4 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user