|
|
@@ -1,5 +1,7 @@
|
|
|
package com.uas.platform.b2c.prod.store.facade.impl;
|
|
|
|
|
|
+import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
|
|
|
+import com.uas.platform.b2c.common.account.model.Enterprise;
|
|
|
import com.uas.platform.b2c.prod.store.dao.StoreInDao;
|
|
|
import com.uas.platform.b2c.prod.store.facade.StoreInFacade;
|
|
|
import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
|
|
|
@@ -33,11 +35,14 @@ public class StoreInFacadeImpl implements StoreInFacade {
|
|
|
|
|
|
private final QualificationService qualificationService;
|
|
|
|
|
|
+ private final EnterpriseDao enterpriseDao;
|
|
|
+
|
|
|
@Autowired
|
|
|
- public StoreInFacadeImpl(StoreInDao storeInDao, StoreInService storeInService, QualificationService qualificationService) {
|
|
|
+ public StoreInFacadeImpl(StoreInDao storeInDao, StoreInService storeInService, QualificationService qualificationService, EnterpriseDao enterpriseDao) {
|
|
|
this.storeInDao = storeInDao;
|
|
|
this.storeInService = storeInService;
|
|
|
this.qualificationService = qualificationService;
|
|
|
+ this.enterpriseDao = enterpriseDao;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -56,7 +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());
|
|
|
ResultMap resultMap = setStoreInfoByKind(store, newStoreInfo, kind);
|
|
|
if (resultMap != null) {
|
|
|
return resultMap;
|
|
|
@@ -75,8 +81,23 @@ public class StoreInFacadeImpl implements StoreInFacade {
|
|
|
}
|
|
|
}
|
|
|
store.setQualifications(qualifications);
|
|
|
-
|
|
|
- store = storeInDao.save(store);
|
|
|
+ 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);
|
|
|
+ store = storeInDao.save(store);
|
|
|
return ResultMap.success(store);
|
|
|
}
|
|
|
|