Browse Source

Merge branch 'dev-mysql' into liusw-account-v1.0.10.19

# Conflicts:
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js
529010777@qq.com 8 years ago
parent
commit
0b2fc994ea

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

@@ -51,9 +51,10 @@ public class EnterpriseServiceImpl implements EnterpriseService {
         enterprise.setEnName(userSpaceDetail.getName());
         enterprise.setEnName(userSpaceDetail.getName());
         enterprise.setEnLogoUrl(userSpaceDetail.getBusinessCodeImage());
         enterprise.setEnLogoUrl(userSpaceDetail.getBusinessCodeImage());
         enterprise.setUu(Long.valueOf(userSpace.getDialectUID()));
         enterprise.setUu(Long.valueOf(userSpace.getDialectUID()));
-        User adminUser = userDao.findUserByUserTel(userSpaceDetail.getAdminTel()).get(0);
         Enterprise newEn = enterpriseDao.save(enterprise);
         Enterprise newEn = enterpriseDao.save(enterprise);
-        if (null != adminUser){
+        List<User> users = userDao.findUserByUserTel(userSpaceDetail.getAdminTel());
+        if (!CollectionUtils.isEmpty(users)){
+            User adminUser = users.get(0);
             Set<Enterprise> enterprises = null;
             Set<Enterprise> enterprises = null;
             if (null == adminUser.getEnterprises()){
             if (null == adminUser.getEnterprises()){
                 enterprises = new HashSet<Enterprise>();
                 enterprises = new HashSet<Enterprise>();

+ 9 - 5
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/UserServiceImpl.java

@@ -10,6 +10,7 @@ import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.Status;
 import com.uas.platform.core.model.Status;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 
 
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
@@ -50,15 +51,18 @@ public class UserServiceImpl implements UserService {
             }
             }
         }
         }
 
 
+        boolean isMember = false;
         //将该成员添加至企业
         //将该成员添加至企业
         Set<Enterprise> ens = u.getEnterprises();
         Set<Enterprise> ens = u.getEnterprises();
-        Iterator<Enterprise> it = ens.iterator();
-        boolean isMember = false;
-        while (it.hasNext()) {
-            if (it.next().getUu() == enterprise.getUu()) {
-                isMember = true;
+        if (!CollectionUtils.isEmpty(ens)){
+            Iterator<Enterprise> it = ens.iterator();
+            while (it.hasNext()) {
+                if (it.next().getUu().equals(enterprise.getUu())) {
+                    isMember = true;
+                }
             }
             }
         }
         }
+
         if (!isMember) {
         if (!isMember) {
             Set<Enterprise> enterprises = null;
             Set<Enterprise> enterprises = null;
             if (null == u.getEnterprises()) {
             if (null == u.getEnterprises()) {

+ 1 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/add_rate_ctrl.js

@@ -1,6 +1,7 @@
 define(['app/app'], function(app) {
 define(['app/app'], function(app) {
     'use strict';
     'use strict';
     app.register.controller('addRateCtrl', ['$scope', '$rootScope', '$stateParams','$filter','Order', 'toaster', 'Rate','ngTableParams', function ($scope, $rootScope, $stateParams , $filter , Order , toaster , Rate ,ngTableParams) {
     app.register.controller('addRateCtrl', ['$scope', '$rootScope', '$stateParams','$filter','Order', 'toaster', 'Rate','ngTableParams', function ($scope, $rootScope, $stateParams , $filter , Order , toaster , Rate ,ngTableParams) {
+        document.title = '追加评价-优软商城';
         $scope.isAnony = 1;
         $scope.isAnony = 1;
         $scope.goodsRate =[];
         $scope.goodsRate =[];
         $scope.vendorRate = {};
         $scope.vendorRate = {};

+ 1 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js

@@ -52,7 +52,7 @@ define(['app/app', 'calendar'], function(app) {
       if(!($scope.userInfo.pwdEnable && ($scope.userInfo.haveUserQuestion || ($scope.userInfo.userEmail==null?false:true)))){
       if(!($scope.userInfo.pwdEnable && ($scope.userInfo.haveUserQuestion || ($scope.userInfo.userEmail==null?false:true)))){
         $scope.openHomeCenterModel();
         $scope.openHomeCenterModel();
       }
       }
-        
+
     }]);
     }]);
 
 
   app.register.controller('homeModalCtrl', ['$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($scope, $modalInstance, toaster, $http, ShippingAddress,$state){
   app.register.controller('homeModalCtrl', ['$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($scope, $modalInstance, toaster, $http, ShippingAddress,$state){

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/pay_center.html

@@ -405,7 +405,7 @@
 						<span>新增账户</span>
 						<span>新增账户</span>
 					</div>
 					</div>
 				</div>
 				</div>
-				<table class="user-account-table table" ng-table="bankInfoTableParams" style="table-layout: fixed">
+				<table class="user-account-table table" ng-table="bankInfoTableParams" style="table-layout: fixed;margin-bottom:40px;">
 					<thead>
 					<thead>
 						<th>开户银行</th>
 						<th>开户银行</th>
 						<th >开户支行</th>
 						<th >开户支行</th>
@@ -427,7 +427,7 @@
 						</tr>
 						</tr>
 					</tbody>
 					</tbody>
 				</table>
 				</table>
-				<div style="text-align: right;margin-right:25px;margin-top:-15px;">
+				<div style="text-align: right;margin-right:25px;margin-top:-30px;">
 					<span class="count-tip">显示 {{$$bankInfo.start}}-{{$$bankInfo.end}} 条,共 <em ng-bind="$$bankInfo.totalElements" style="color: #5078cb">2506</em> 条</span>
 					<span class="count-tip">显示 {{$$bankInfo.start}}-{{$$bankInfo.end}} 条,共 <em ng-bind="$$bankInfo.totalElements" style="color: #5078cb">2506</em> 条</span>
 				</div>
 				</div>
 				<div class="com-del-box" ng-if="showDelete">
 				<div class="com-del-box" ng-if="showDelete">

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/pay_center.html

@@ -787,16 +787,16 @@
     </div>
     </div>
 </div>
 </div>
 <!--模态框-->
 <!--模态框-->
-<div class="view-box" ng-if="showAddFrame" name="myForm">
+<div class="view-box" ng-if="showAddFrame">
     <div class="box">
     <div class="box">
         <div class="add-count">
         <div class="add-count">
             <h2>新增账户信息</h2>
             <h2>新增账户信息</h2>
             <span style="color:#cbcaca;width:10px;height:10px;position:absolute;top:15px;right:15px;"><i class="fa fa-close" ng-click="cancelAdd()"></i></span>
             <span style="color:#cbcaca;width:10px;height:10px;position:absolute;top:15px;right:15px;"><i class="fa fa-close" ng-click="cancelAdd()"></i></span>
-            <form>
+            <form name="myForm">
                 <div class="row">
                 <div class="row">
                     <div class="col-md-3"><em class="colorRed">*</em>开户银行</div>
                     <div class="col-md-3"><em class="colorRed">*</em>开户银行</div>
                     <div class="col-md-5" style="position:relative;">
                     <div class="col-md-5" style="position:relative;">
-                        <input ng-keydown="onKeyUp()" ng-model="account.bankname" ng-change="checkAccount(1)" class="form-control" autocomplete="off" type="text" placeholder="例如:中国工商银行侨香支行" style="padding:12px 6px;width:91%;border-right:transparent;border-radius:3px 0 0 3px;" ng-focus="getItemFocus()" ng-blur="onItemBlur()" autocomplete="off">
+                        <input name="bankname" ng-keydown="onKeyUp()" ng-model="account.bankname" ng-change="checkAccount(1)" class="form-control" autocomplete="off" type="text" placeholder="例如:中国工商银行侨香支行" style="padding:12px 6px;width:91%;border-right:transparent;border-radius:3px 0 0 3px;" ng-focus="getItemFocus()" ng-blur="onItemBlur()" autocomplete="off">
                         <i class="select-adder" ng-click="showList()" style="display:inline-block;width:25px;height:34px;position:absolute;top:0;right:0;z-index:10;border:1px solid #ddd;border-radius:0 3px 3px 0;border-left:transparent"></i>
                         <i class="select-adder" ng-click="showList()" style="display:inline-block;width:25px;height:34px;position:absolute;top:0;right:0;z-index:10;border:1px solid #ddd;border-radius:0 3px 3px 0;border-left:transparent"></i>
                         <ul id="ulContent" class="select-down" ng-if="showBankFrame && matchData">
                         <ul id="ulContent" class="select-down" ng-if="showBankFrame && matchData">
                             <li ng-click="fitBankToAccount(bank)" ng-repeat="bank in resultList" ng-class="{'active': $index==selectIndex}">{{bank}}</li>
                             <li ng-click="fitBankToAccount(bank)" ng-repeat="bank in resultList" ng-class="{'active': $index==selectIndex}">{{bank}}</li>