Przeglądaj źródła

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

liusw 7 lat temu
rodzic
commit
44f919c489

BIN
jpg


+ 49 - 2
src/main/java/com/uas/platform/b2c/common/account/service/impl/EnterpriseServiceImpl.java

@@ -23,6 +23,7 @@ import com.uas.sso.entity.UserSpaceView;
 import com.uas.sso.entity.UserView;
 import com.uas.sso.util.AccountUtils;
 import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -121,8 +122,54 @@ public class EnterpriseServiceImpl implements EnterpriseService{
 		//更新店铺中的企业信息
 		List<StoreIn> storeIns = storeInDao.findByEnUU(enterprise.getUu());
 		for (StoreIn storeIn : storeIns) {
-            EnterpriseSimple enterpriseSimple = EnterpriseSimple.translateSimple(enterprise);
-			storeIn.setEnterprise(enterpriseSimple);
+			EnterpriseSimple newEnterprise;
+			newEnterprise = new EnterpriseSimple();
+			EnterpriseSimple enterpriseOld = storeIn.getEnterprise();
+			BeanUtils.copyProperties(enterpriseOld,newEnterprise);
+			if (enterpriseOld != null) {
+				if (enterprise.getEnName() !=null) {
+					newEnterprise.setEnName(enterprise.getEnName());
+				}
+				if (enterprise.getEnAddress() !=null) {
+					newEnterprise.setEnAddress(enterprise.getEnAddress());
+				}
+				if (enterprise.getEnFax() !=null) {
+					newEnterprise.setEnFax(enterprise.getEnFax());
+				}
+				if (enterprise.getEnTel() !=null) {
+					newEnterprise.setEnTel(enterprise.getEnTel());
+				}
+				if (enterprise.getEnType() !=null) {
+					newEnterprise.setEnType(enterprise.getEnType());
+				}
+				if (enterprise.getEnBussinessCode() !=null) {
+					newEnterprise.setEnBusinessCode(enterprise.getEnBussinessCode());
+				}
+				if (enterprise.getEnDate() !=null) {
+					newEnterprise.setEnDate(enterprise.getEnDate());
+				}
+				if (enterprise.getEnUrl() !=null) {
+					newEnterprise.setEnUrl(enterprise.getEnUrl());
+				}
+				if (enterprise.getEnLogoUrl() !=null) {
+					newEnterprise.setEnLogoUrl(enterprise.getEnLogoUrl());
+				}
+				if (enterprise.getEnEmail() !=null) {
+					newEnterprise.setEnLogoUrl(enterprise.getEnEmail());
+				}
+				if (enterprise.getEnPhone() !=null) {
+					newEnterprise.setEnLogoUrl(enterprise.getEnPhone());
+				}
+				if (enterprise.getEnWeixin() !=null) {
+					newEnterprise.setEnLogoUrl(enterprise.getEnWeixin());
+				}
+				if (enterprise.getEnQQ() !=null) {
+					newEnterprise.setEnLogoUrl(enterprise.getEnQQ());
+				}
+			} else {
+				newEnterprise = EnterpriseSimple.translateSimple(enterprise);
+			}
+			storeIn.setEnterprise(newEnterprise);
 			storeInDao.save(storeIn);
 		}
 		if (existEnterprise == null)

+ 7 - 1
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/EnterpriseServiceImpl.java

@@ -66,7 +66,13 @@ public class EnterpriseServiceImpl implements EnterpriseService {
         enterprise.setEnCorporation(userSpaceView.getCorporation());
         enterprise.setEnBussinessCode(userSpaceView.getBusinessCode());
        // enterprise.setEnFax(userSpaceView.);
-        enterprise.setEnTel(userSpaceView.getTelephone());
+        String enTel = enterprise.getEnTel();
+        if (enTel == null) {
+            enterprise.setEnTel(userSpaceView.getTelephone());
+            if (userSpaceView.getTelephone() == null) {
+                enterprise.setEnTel(userSpaceView.getAdmin().getMobile());
+            }
+        }
         //enterprise.setEnEmail(userSpaceView.get());
         //enterprise.setEnIndustry(userSpaceView.());
         enterprise.setEnName(userSpaceView.getSpaceName());

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/store/model/EnterpriseSimple.java

@@ -230,7 +230,7 @@ public class EnterpriseSimple {
 		simple.enName = enterprise.getEnName();
 		simple.enShortname = enterprise.getEnShortname();
 		simple.enAddress = enterprise.getEnAddress();
-		simple.address = enterprise.getEnAddress();
+		//simple.address = enterprise.getEnAddress();
 		simple.enFax = enterprise.getEnFax();
 		simple.enTel = enterprise.getEnTel();
 		simple.enType = enterprise.getEnType();

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js

@@ -81,7 +81,7 @@ define(['app/app'], function (app) {
             $scope.sampleStore.enQQ = '';
 
 			$scope.sampleStore.enterprise = angular.copy($scope.storeInfo.enterprise);
-			$scope.sampleStore.enterprise.address = $scope.sampleStore.enterprise.address || $scope.storeInfo.enterprise.enAddress;
+			$scope.sampleStore.enterprise.address = $scope.sampleStore.enterprise.address;
 			qulifications = angular.copy($scope.storeInfo.qualifications);
 			$scope.sampleStore.qualifications = qulifications.filter(function (qualification) {
 				return qualification && qualification.type == 'APTITUDE';
@@ -165,7 +165,7 @@ define(['app/app'], function (app) {
                 $scope.sampleStore.storeName = $scope.storeInfo.storeName;
 				$scope.sampleStore.description = $scope.storeInfo.description;
 				$scope.sampleStore.enterprise = angular.copy($scope.storeInfo.enterprise);
-				$scope.sampleStore.enterprise.address = $scope.sampleStore.enterprise.address || $scope.storeInfo.enterprise.enAddress;
+				$scope.sampleStore.enterprise.address = $scope.sampleStore.enterprise.address;
 				return $scope.closeEdit(module);
 			}
 			if (module == 'QUALIFICATIONS') {

+ 2 - 13
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -494,13 +494,6 @@
             <ul>
               <li>
                 <div class="fl">企业名称</div>
-                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
-                                                                  title="企业全称"
-                                                                  ng-disabled=" !updateState"
-                                                                  ng-model="enterpriseInfo.enName"/>
-                </div>
-                <div class="fr" ng-if="!updateState"><span
-                    ng-bind="enterpriseInfo.enName || '暂无信息'"></ span>
                 <div class="fr"><span
                     ng-bind="enterpriseInfo.enName || '暂无信息'"></span>
                 </div>
@@ -521,18 +514,14 @@
               </li>-->
               <li>
                 <div class="fl">营业执照号</div>
-                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
-                                                                  title="营业执照号" disabled="disable"
-                                                                  ng-model="enterpriseInfo.enBussinessCode"/>
-                </div>
-                <div class="fr" ng-if="!updateState"><span
+                <div class="fr"><span
                     ng-bind="enterpriseInfo.enBussinessCode || '暂无信息'"></span></div>
               </li>
               <li>
                 <div class="fl">注册地址</div>
                 <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
                                                                   title="企业地址"
-                                                                  ng-disabled=" !updateState"
+                                                                  ng-disabled="enterpriseInfo.enValidCode == 2"
                                                                   ng-model="enterpriseInfo.enAddress"/>
                 </div>
                 <div class="fr" ng-if="!updateState"><span

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -817,7 +817,7 @@
 			</div>-->
 			<div class="row com_row" style="margin-top: 10px;">
 				<div class="col-md-2 custom_col">
-					<span>地&nbsp;&nbsp;&nbsp;&nbsp;址</span>
+					<span>企业地址</span>
 				</div>
 				<div class="col-md-10 custom_col show_info">
 					<div>