Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
9085dc7681
@ -77,6 +77,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
Map data_arr = null;
|
||||
JSONArray items_arr =null;
|
||||
List<Map> items =null;
|
||||
boolean isNewFlag=false;
|
||||
try {
|
||||
// data_arr = cloundService.getAppTpl(accountBaseConfigService.getConfig("service_user_id", 0), accountBaseConfigService.getConfig("service_app_key", ""), null);
|
||||
if(user.isStore()) {
|
||||
@ -89,6 +90,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
data_arr = (Map)jsonObject.get("data");
|
||||
items_arr = (JSONArray) data_arr.get("items");
|
||||
items = JSONUtil.toList(items_arr, Map.class);
|
||||
isNewFlag=true;
|
||||
}else {
|
||||
Gson gson = new Gson();
|
||||
String gsonStrList= gson.toJson(shopPageAppList);
|
||||
@ -125,9 +127,12 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
continue;
|
||||
}
|
||||
//String appId= String.valueOf(item.get("tpl_label"));
|
||||
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label)||
|
||||
shopStoreInfo.getStore_template().equals(String.valueOf(item.get("tpl_label"))))) {
|
||||
if(isNewFlag&&shopStoreInfo.getStore_template().equals(String.valueOf(item.get("tpl_label")))){
|
||||
current_tpl = item;
|
||||
}else {
|
||||
if (is_use==1&&(shopStoreInfo.getStore_template().equals(tpl_label))) {
|
||||
current_tpl = item;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -175,7 +180,9 @@ public class ShopPageAppController extends BaseControllerImpl {
|
||||
queryWrapper.eq("store_id", 0);
|
||||
}
|
||||
*/
|
||||
|
||||
if(isNewFlag){
|
||||
items=new ArrayList<>();
|
||||
}
|
||||
data.put("items", items);
|
||||
data.put("current_tpl", current_tpl);
|
||||
return CommonResult.success(data);
|
||||
|
||||
@ -665,7 +665,10 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
||||
} else {
|
||||
Map app_row = null;
|
||||
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) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -733,7 +736,10 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
||||
} else {
|
||||
Map app_row = null;
|
||||
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) {
|
||||
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_qrcode("");
|
||||
page_cloud_row.setApp_id(shopPageApp.getApp_id());
|
||||
page_cloud_row.setPage_tpl(shopPageApp.getTpl_id());
|
||||
|
||||
|
||||
shopPageBaseService.add(page_cloud_row);
|
||||
|
||||
@ -5398,14 +5398,14 @@ public class ShopProductBaseServiceImpl extends BaseServiceImpl<ShopProductBaseM
|
||||
Long existId = Long.valueOf(existBaseIdAndState[0]);
|
||||
Integer product_state_id = Integer.valueOf(existBaseIdAndState[1]);
|
||||
base.setProduct_id(existId);
|
||||
base.setProduct_name(null);
|
||||
//base.setProduct_name(null);
|
||||
base.setProduct_src_id(existId);
|
||||
if (!(base.getProduct_state_id() == StateCode.PRODUCT_STATE_OFF_THE_SHELF_UNCHECK)) {//重新分配
|
||||
base.setProduct_state_id(product_state_id);
|
||||
}
|
||||
shopProductBaseList.get(i).setProduct_id(existId);
|
||||
shopProductIndexList.get(i).setProduct_name(null);
|
||||
shopProductIndexList.get(i).setProduct_name_index(null);
|
||||
// shopProductIndexList.get(i).setProduct_name(null);
|
||||
// shopProductIndexList.get(i).setProduct_name_index(null);
|
||||
//shopProductIndexList.get(i).setProduct_id(existId);
|
||||
// shopProductIndexList.get(i).setProduct_unit_points(BigDecimal.ZERO);
|
||||
shopProductIndexList.get(i).setProduct_unit_price_max(base.getProduct_market_price());
|
||||
|
||||
@ -844,10 +844,10 @@ public abstract class SyncBaseThirdSxAbstract{
|
||||
shopProductBase.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF);//默认是下架
|
||||
shopProductBase.setUnit_price(BigDecimal.valueOf(jsonObj.getDouble("retail_price")));
|
||||
if(!checkProductContainUnits(productName)){
|
||||
String spectItem=StringUtils.isNotEmpty(shopProductBase.getSpecItem())?shopProductBase.getSpecItem():"";//规格
|
||||
//String spectItem=StringUtils.isNotEmpty(shopProductBase.getSpecItem())?shopProductBase.getSpecItem():"";//规格
|
||||
String unit=StringUtils.isNotEmpty(shopProductBase.getSpecUnit())?shopProductBase.getSpecUnit():"";//规格单位
|
||||
if(StringUtils.isNotEmpty(spectItem)||StringUtils.isNotEmpty(unit)){
|
||||
productName=productName+spectItem+"/"+unit;
|
||||
if(StringUtils.isNotEmpty(unit)){
|
||||
productName=productName+"/"+unit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user