Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
8cdc88e00a
@ -83,6 +83,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
|||||||
if(user.isStore()) {
|
if(user.isStore()) {
|
||||||
QueryWrapper<ShopPageApp> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopPageApp> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("store_id", user.getStore_id());
|
queryWrapper.eq("store_id", user.getStore_id());
|
||||||
|
queryWrapper.orderByDesc("app_id");
|
||||||
List<ShopPageApp> shopPageAppList= shopPageAppService.list(queryWrapper);
|
List<ShopPageApp> shopPageAppList= shopPageAppService.list(queryWrapper);
|
||||||
if(shopPageAppList.isEmpty()) {
|
if(shopPageAppList.isEmpty()) {
|
||||||
String resultStr= accountBaseConfigService.getSystemConfig("service_app_tpl");
|
String resultStr= accountBaseConfigService.getSystemConfig("service_app_tpl");
|
||||||
@ -132,6 +133,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
|||||||
}else {
|
}else {
|
||||||
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label))) {
|
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label))) {
|
||||||
current_tpl = item;
|
current_tpl = item;
|
||||||
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -553,5 +555,18 @@ public class ShopPageAppController extends BaseControllerImpl {
|
|||||||
return shopPageAppService.deletePageApp(appId);
|
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 copyDiyByAppId(Integer appId,String newAppName,String appIndustry);
|
||||||
|
|
||||||
CommonResult deletePageApp(Integer appId);
|
CommonResult deletePageApp(Integer appId);
|
||||||
|
|
||||||
|
CommonResult createBlankPageApp(String appName,String appIndustry);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1107,6 +1107,32 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
|||||||
return CommonResult.success();
|
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
|
* 生产新的id
|
||||||
@ -1121,6 +1147,4 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
|||||||
}
|
}
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
sql/shop/dev/20251212_02_dml.sql
Normal file
1
sql/shop/dev/20251212_02_dml.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
INSERT INTO `admin_base_protocol` (`ctl`, `met`, `db`, `rights_id`, `log`, `path`,`comment`) VALUES ('/admin/shop/shop-page-app/createBlankPageApp', 'index', 'master', '', '0', '/admin/shop/shop-page-app/createBlankPageApp','创建diy空白模板');
|
||||||
Loading…
Reference in New Issue
Block a user