装修模板新增行业类别

This commit is contained in:
liyj 2025-12-05 12:01:11 +08:00
parent a19f94ccb1
commit 4e9ac87d9b
4 changed files with 8 additions and 4 deletions

View File

@ -433,13 +433,14 @@ public class ShopPageAppController extends BaseControllerImpl {
*/
@RequestMapping(value = "/copyDiyByAppId", method = RequestMethod.POST)
public CommonResult copyDiyByAppId(@RequestParam(name = "appId") Integer appId,
@RequestParam(name = "appName") String newAppName) {
@RequestParam(name = "appName") String newAppName,
@RequestParam(name = "appIndustry",required = false,defaultValue = "0") String appIndustry) {
UserDto user = ContextUtil.getCurrentUser();
if (user == null) {
throw new ApiUserException(I18nUtil._("用户信息异常!"));
}
return CommonResult.success(shopPageAppService.copyDiyByAppId(appId, newAppName));
return CommonResult.success(shopPageAppService.copyDiyByAppId(appId, newAppName,appIndustry));
}
/**
@ -531,6 +532,7 @@ public class ShopPageAppController extends BaseControllerImpl {
editShopPageApp.setIs_pulish(shopPageApp.getIs_pulish());
editShopPageApp.setApp_market_images(shopPageApp.getApp_market_images());
editShopPageApp.setTpl_image(shopPageApp.getTpl_image());
editShopPageApp.setApp_industry(shopPageApp.getApp_industry());
shopPageAppService.edit(editShopPageApp);
return CommonResult.success();
}

View File

@ -57,7 +57,7 @@ public interface ShopPageAppService extends IBaseService<ShopPageApp> {
CommonResult copyDiyByStore(Integer sourceStoreId, Integer tpl_id);
CommonResult copyDiyByAppId(Integer appId,String a);
CommonResult copyDiyByAppId(Integer appId,String newAppName,String appIndustry);
CommonResult deletePageApp(Integer appId);
}

View File

@ -987,7 +987,7 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
}
@Override
public CommonResult copyDiyByAppId(Integer appId,String appName) {
public CommonResult copyDiyByAppId(Integer appId,String appName,String appIndustry) {
UserDto userDto= ContextUtil.getCurrentUser();
if(userDto==null){
return CommonResult.failed("用户没有登录");
@ -1015,6 +1015,7 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
shopPageApp.setApp_is_use(0);
shopPageApp.setApp_name(appName);
shopPageApp.setUser_id(userDto.getId());
shopPageApp.setApp_industry(appIndustry);
shopPageAppService.save(shopPageApp);
QueryWrapper<ShopPageBase> sourceShopPageBaseQueryWrapper = new QueryWrapper<>();

View File

@ -0,0 +1 @@
ALTER table shop_page_app add app_industry char(2) not null default '0' COMMENT '行业类别1超市,2数码家电, 3水果生鲜, 4烘培饮品, 5社区团购, 6时尚美妆, 7婴儿服饰, 8家居, 9汽车, 10酒店旅游, 11鲜花绿植, 12医药健康, 13工业五金, 14节日模板,0其他行业';