新店铺模板问题修改

This commit is contained in:
liyj 2025-11-25 16:23:27 +08:00
parent 06df245d59
commit d8aadb2d47
2 changed files with 19 additions and 5 deletions

View File

@ -77,6 +77,7 @@ public class ShopPageAppController extends BaseControllerImpl {
Map data_arr = null; Map data_arr = null;
JSONArray items_arr =null; JSONArray items_arr =null;
List<Map> items =null; List<Map> items =null;
boolean isNewFlag=false;
try { try {
// data_arr = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), null); // data_arr = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), null);
if(user.isStore()) { if(user.isStore()) {
@ -89,6 +90,7 @@ public class ShopPageAppController extends BaseControllerImpl {
data_arr = (Map)jsonObject.get("data"); data_arr = (Map)jsonObject.get("data");
items_arr = (JSONArray) data_arr.get("items"); items_arr = (JSONArray) data_arr.get("items");
items = JSONUtil.toList(items_arr, Map.class); items = JSONUtil.toList(items_arr, Map.class);
isNewFlag=true;
}else { }else {
Gson gson = new Gson(); Gson gson = new Gson();
String gsonStrList= gson.toJson(shopPageAppList); String gsonStrList= gson.toJson(shopPageAppList);
@ -125,9 +127,12 @@ public class ShopPageAppController extends BaseControllerImpl {
continue; continue;
} }
//String appId= String.valueOf(item.get("tpl_label")); //String appId= String.valueOf(item.get("tpl_label"));
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label)|| if(isNewFlag&&shopStoreInfo.getStore_template().equals(String.valueOf(item.get("tpl_label")))){
shopStoreInfo.getStore_template().equals(String.valueOf(item.get("tpl_label"))))) {
current_tpl = item; current_tpl = item;
}else {
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label))) {
current_tpl = item;
}
} }
} else { } else {
@ -175,7 +180,9 @@ public class ShopPageAppController extends BaseControllerImpl {
queryWrapper.eq("store_id", 0); queryWrapper.eq("store_id", 0);
} }
*/ */
if(isNewFlag){
items=new ArrayList<>();
}
data.put("items", items); data.put("items", items);
data.put("current_tpl", current_tpl); data.put("current_tpl", current_tpl);
return CommonResult.success(data); return CommonResult.success(data);

View File

@ -665,7 +665,10 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
} else { } else {
Map app_row = null; Map app_row = null;
try { try {
app_row = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), tpl_id); // app_row = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), tpl_id);
String resultStr= accountBaseConfigService.getSystemConfig("service_app_tpl");
JSONObject jsonObject = JSONUtil.parseObj(resultStr);
app_row = (Map)jsonObject.get("data");
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -733,7 +736,10 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
} else { } else {
Map app_row = null; Map app_row = null;
try { try {
app_row = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), tpl_id); // app_row = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), tpl_id);
String resultStr= accountBaseConfigService.getSystemConfig("service_app_tpl");
JSONObject jsonObject = JSONUtil.parseObj(resultStr);
app_row = (Map)jsonObject.get("data");
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -780,6 +786,7 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
page_cloud_row.setPage_share_image(""); page_cloud_row.setPage_share_image("");
page_cloud_row.setPage_qrcode(""); page_cloud_row.setPage_qrcode("");
page_cloud_row.setApp_id(shopPageApp.getApp_id()); page_cloud_row.setApp_id(shopPageApp.getApp_id());
page_cloud_row.setPage_tpl(shopPageApp.getTpl_id());
shopPageBaseService.add(page_cloud_row); shopPageBaseService.add(page_cloud_row);