|
|
@@ -61,8 +61,8 @@ public class StoreInFacadeImpl implements StoreInFacade {
|
|
|
if (store == null) {
|
|
|
return new ResultMap(CodeType.ERROR_STATE, String.format("编号%s对应的店铺不存在", uuid));
|
|
|
}
|
|
|
- store.setEnterpriseJson(newStoreInfo.getEnterpriseJson());
|
|
|
- store.setEnterprise(newStoreInfo.getEnterprise());
|
|
|
+// store.setEnterpriseJson(newStoreInfo.getEnterpriseJson());
|
|
|
+// store.setEnterprise(newStoreInfo.getEnterprise());
|
|
|
ResultMap resultMap = setStoreInfoByKind(store, newStoreInfo, kind);
|
|
|
if (resultMap != null) {
|
|
|
return resultMap;
|
|
|
@@ -81,22 +81,17 @@ public class StoreInFacadeImpl implements StoreInFacade {
|
|
|
}
|
|
|
}
|
|
|
store.setQualifications(qualifications);
|
|
|
- Enterprise enterprise = enterpriseDao.findByUu(newStoreInfo.getEnterprise().getUu());
|
|
|
- enterprise.setEnName(newStoreInfo.getEnterprise().getEnName());
|
|
|
- enterprise.setEnShortname(newStoreInfo.getEnterprise().getEnShortname());
|
|
|
- enterprise.setEnType(newStoreInfo.getEnterprise().getEnType());
|
|
|
- enterprise.setEnAddress(newStoreInfo.getEnterprise().getEnAddress());
|
|
|
- enterprise.setEnTel(newStoreInfo.getEnterprise().getEnTel());
|
|
|
- enterprise.setEnFax(newStoreInfo.getEnterprise().getEnFax());
|
|
|
- enterprise.setEnEmail(newStoreInfo.getEnterprise().getEnEmail());
|
|
|
- enterprise.setEnBussinessCode(newStoreInfo.getEnterprise().getEnBusinessCode());
|
|
|
- enterprise.setEnUrl(newStoreInfo.getEnterprise().getEnUrl());
|
|
|
- enterprise.setEnPhone(newStoreInfo.getEnterprise().getEnPhone());
|
|
|
- enterprise.setEnWeixin(newStoreInfo.getEnterprise().getEnWeixin());
|
|
|
- enterprise.setEnQQ(newStoreInfo.getEnterprise().getEnQQ());
|
|
|
- enterprise.setEnLogoUrl(newStoreInfo.getEnterprise().getEnLogoUrl());
|
|
|
- enterprise.setEnDate(newStoreInfo.getEnterprise().getEnDate());
|
|
|
- enterpriseDao.save(enterprise);
|
|
|
+ if ("BASIC_INFO".equals(kind)) {
|
|
|
+ Enterprise enter = enterpriseDao.findByUu(store.getEnUU());
|
|
|
+ enter.setEnAddress(store.getEnterprise().getEnAddress());
|
|
|
+ enter.setEnTel(store.getEnterprise().getEnTel());
|
|
|
+ enter.setEnFax(store.getEnterprise().getEnFax());
|
|
|
+ enter.setEnPhone(store.getEnterprise().getEnPhone());
|
|
|
+ enter.setEnWeixin(store.getEnterprise().getEnWeixin());
|
|
|
+ enter.setEnQQ(store.getEnterprise().getEnQQ());
|
|
|
+ enterpriseDao.save(enter);
|
|
|
+ }
|
|
|
+
|
|
|
store = storeInDao.save(store);
|
|
|
return ResultMap.success(store);
|
|
|
}
|
|
|
@@ -117,10 +112,14 @@ public class StoreInFacadeImpl implements StoreInFacade {
|
|
|
store.setStoreName(StringUtils.hasText(newStoreInfo.getStoreName()) ? newStoreInfo.getStoreName() : null);
|
|
|
store.setDescription(newStoreInfo.getDescription());
|
|
|
EnterpriseSimple enterprise = store.getEnterprise();
|
|
|
- enterprise.setEnUrl(newStoreInfo.getEnterprise().getEnUrl());
|
|
|
- enterprise.setAddress(newStoreInfo.getEnterprise().getAddress());
|
|
|
- enterprise.setEnTel(newStoreInfo.getEnterprise().getEnTel());
|
|
|
- enterprise.setEnFax(newStoreInfo.getEnterprise().getEnFax());
|
|
|
+ EnterpriseSimple newEnterprise = newStoreInfo.getEnterprise();
|
|
|
+ enterprise.setEnUrl(newEnterprise.getEnUrl());
|
|
|
+ enterprise.setAddress(newEnterprise.getAddress());
|
|
|
+ enterprise.setEnTel(newEnterprise.getEnTel());
|
|
|
+ enterprise.setEnFax(newEnterprise.getEnFax());
|
|
|
+ enterprise.setEnPhone(newEnterprise.getEnPhone());
|
|
|
+ enterprise.setEnWeixin(newEnterprise.getEnWeixin());
|
|
|
+ enterprise.setEnQQ(newEnterprise.getEnQQ());
|
|
|
store.setEnterprise(enterprise);
|
|
|
return null;
|
|
|
}
|