Преглед изворни кода

Merge remote-tracking branch 'origin/release-201815-liusw' into release-201815-liusw

wangyc пре 7 година
родитељ
комит
ef973b4027

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

@@ -4,24 +4,21 @@ import com.uas.message.mail.service.MailService;
 import com.uas.platform.b2c.common.account.dao.*;
 import com.uas.platform.b2c.common.account.model.*;
 import com.uas.platform.b2c.common.account.service.UserService;
-import com.uas.platform.b2c.common.base.dao.CommonDao;
 import com.uas.platform.b2c.core.config.MessageConf;
 import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.core.utils.ThreadUtils;
+import com.uas.platform.b2c.trade.util.BoundedExecutor;
+import com.uas.platform.core.concurrent.IRunnable;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.exception.SystemException;
-import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.util.AgentUtils;
 import com.uas.platform.core.util.encry.Md5Utils;
 import com.uas.sso.entity.UserView;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.support.ManagedMap;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
-import org.springframework.security.access.ConfigAttribute;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
@@ -35,6 +32,8 @@ import javax.persistence.criteria.Root;
 import javax.servlet.http.HttpServletRequest;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 @Service
 public class UserServiceImpl implements UserService {
@@ -425,15 +424,31 @@ public class UserServiceImpl implements UserService {
 		}
 	}
 	@Override
-	public void removeUser(Long uu) {
+	public void removeUser(final Long uu) {
 		User user = userDao.findOne(uu);
 		if (user.getEnterprises().contains(SystemSession.getUser().getEnterprise())) {
 			user.removeEnterprise(SystemSession.getUser().getEnterprise());
 			userDao.save(user);
+			final Long enUU = SystemSession.getUser().getEnterprise().getUu();
+			// 同步账户中心
+			ExecutorService executorService = Executors.newCachedThreadPool();
+			BoundedExecutor executor = new BoundedExecutor(executorService, 1000);
+
 			try {
-				com.uas.sso.util.AccountUtils.removeUser(uu,SystemSession.getUser().getEnterprise().getUu());
-			} catch (Exception e) {
+				executor.submitTask(new Runnable() {
+					@Override
+					public void run() {
+						try {
+							AccountUtils.removeUser(uu, enUU);
+						} catch (Exception e) {
+							e.printStackTrace();
+						}
+					}
+				});
+			} catch (InterruptedException e) {
+				e.printStackTrace();
 			}
+
 		} else {
 			throw new IllegalArgumentException();
 		}

+ 0 - 13
src/main/webapp/resources/js/sso/controllers/applyBindCtrl.js

@@ -110,19 +110,6 @@ define(['app/app'], function (app) {
             applyToEnterpriseTableParams();
         }
 
-        //手机号和邮箱号的部分隐藏
-        if($scope.userInfo.userTel){
-            $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-                + '****' + $scope.userInfo.userTel.substr(7);
-        }
-        var userEmailTemp = $scope.userInfo.userEmail
-            ? $scope.userInfo.userEmail.indexOf("@") : '';
-        if (userEmailTemp != '') {
-            $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-                0,1) + "***"
-                + $scope.userInfo.userEmail.substr(userEmailTemp);
-        }
-
         var getEnterprise = function () {
             // 获取企业信息
             Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {

+ 0 - 13
src/main/webapp/resources/js/sso/controllers/rolePermissionCtrl.js

@@ -114,19 +114,6 @@ define(['app/app'], function (app) {
             applyToEnterpriseTableParams();
         }
 
-      //手机号和邮箱号的部分隐藏
-      if($scope.userInfo.userTel){
-        $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-            + '****' + $scope.userInfo.userTel.substr(7);
-      }
-      var userEmailTemp = $scope.userInfo.userEmail
-          ? $scope.userInfo.userEmail.indexOf("@") : '';
-      if (userEmailTemp != '') {
-        $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-            0,1) + "***"
-            + $scope.userInfo.userEmail.substr(userEmailTemp);
-      }
-
 		var getEnterprise = function () {
 			// 获取企业信息
 			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {

+ 2 - 2
src/main/webapp/resources/js/sso/controllers/securitySetCtrl.js

@@ -115,13 +115,13 @@ define(['app/app'], function (app) {
 
       //手机号和邮箱号的部分隐藏
       if($scope.userInfo.userTel){
-        $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
+        $scope.userTel = $scope.userInfo.userTel.substr(0, 3)
             + '****' + $scope.userInfo.userTel.substr(7);
       }
       var userEmailTemp = $scope.userInfo.userEmail
           ? $scope.userInfo.userEmail.indexOf("@") : '';
       if (userEmailTemp != '') {
-        $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
+        $scope.userEmail = $scope.userInfo.userEmail.substr(
             0,1) + "***"
             + $scope.userInfo.userEmail.substr(userEmailTemp);
       }

+ 0 - 12
src/main/webapp/resources/js/sso/controllers/ssoAddressCtrl.js

@@ -20,18 +20,6 @@ define(['app/app'], function (app) {
                 $scope.userInfoBackup = angular.copy($scope.userInfo);
                 $scope.canAddTotal = 20;
 
-                //手机号和邮箱号的部分隐藏
-                if($scope.userInfo.userTel){
-                    $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-                        + '****' + $scope.userInfo.userTel.substr(7);
-                }
-                var userEmailTemp = $scope.userInfo.userEmail
-                    ? $scope.userInfo.userEmail.indexOf("@") : '';
-                if (userEmailTemp != '') {
-                    $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-                        0,1) + "***"
-                        + $scope.userInfo.userEmail.substr(userEmailTemp);
-                }
                 // 获取企业信息
                 if ($scope.userInfo.enterprise) {
                     Enterprise.getEnterpriseInfo({enuu: $scope.userInfo.enterprise.uu},

+ 0 - 13
src/main/webapp/resources/js/sso/controllers/ssoInfoCtrl.js

@@ -112,19 +112,6 @@ define(['app/app'], function (app) {
             applyToEnterpriseTableParams();
         }
 
-      //手机号和邮箱号的部分隐藏
-      if($scope.userInfo.userTel){
-        $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-            + '****' + $scope.userInfo.userTel.substr(7);
-      }
-      var userEmailTemp = $scope.userInfo.userEmail
-          ? $scope.userInfo.userEmail.indexOf("@") : '';
-      if (userEmailTemp != '') {
-        $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-            0,1) + "***"
-            + $scope.userInfo.userEmail.substr(userEmailTemp);
-      }
-
 		var getEnterprise = function () {
 			// 获取企业信息
 			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {

+ 3 - 13
src/main/webapp/resources/js/sso/controllers/staffManagementCtrl.js

@@ -12,6 +12,9 @@ define(['app/app'], function (app) {
         $scope.setAddingUser = function (status) {
             $scope.addingUser = status;
             $scope.adding = false;
+            $scope.newUser = {};
+            $scope.newUser.userTel = '';
+            $scope.newUser.userEmail = '';
         };
         $scope.userInfo = $rootScope.userInfo;
 		$scope.updateState = false;
@@ -114,19 +117,6 @@ define(['app/app'], function (app) {
             applyToEnterpriseTableParams();
         }
 
-      //手机号和邮箱号的部分隐藏
-      if($scope.userInfo.userTel){
-        $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3)
-            + '****' + $scope.userInfo.userTel.substr(7);
-      }
-      var userEmailTemp = $scope.userInfo.userEmail
-          ? $scope.userInfo.userEmail.indexOf("@") : '';
-      if (userEmailTemp != '') {
-        $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(
-            0,1) + "***"
-            + $scope.userInfo.userEmail.substr(userEmailTemp);
-      }
-
 		var getEnterprise = function () {
 			// 获取企业信息
 			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {

+ 1 - 0
src/main/webapp/resources/view/admin/RegulpicList.html

@@ -215,6 +215,7 @@
     border: 1px solid #219ee6;
     box-shadow: 0 0 2px #219ee6;
     background: #fff;
+    z-index: 999999;
   }
   .application-tab table tr td .lookNoPassInfo:hover .infoMore{
     display: block;

+ 5 - 2
src/main/webapp/resources/view/admin/modal/auditRegulpic_modal.html

@@ -33,8 +33,11 @@
 <form class="form-horizontal " name="myForm" novalidate>
   <div class="modal-body" id="body">
     <div class="form-group">
-      <div class="col-sm-12">
-        <textarea class="form-control" id="reason" title="reason" rows="10" ng-model="reason" placeholder="请填写不通过原因(必填)"></textarea>
+      <div class="col-sm-12" style="position: relative">
+        <textarea maxlength="50" class="form-control" id="reason" title="reason" rows="10" ng-model="reason" placeholder="请填写不通过原因(必填)"></textarea>
+        <div style="position: absolute;bottom: 15px;right: 27px">
+          {{(reason && reason.length) || 0}} / 50
+        </div>
       </div>
     </div>
     <div class="form-group">

+ 1 - 1
src/main/webapp/resources/view/sso/header.html

@@ -214,7 +214,7 @@
             <ul>
                 <!--<li ng-class="{'active' : active == 'home'}"><a href="#home" class="active">首页</a></li>-->
                 <!--<li ng-class="{'active' : active == 'message'}" ><a ui-sref="messagePersonal">消息(<span ng-bind="unReadMessage">0</span>)</a></li>-->
-                <li ng-if="userInfo.enterprise && userInfo.enterprise.uu" ng-class="{'active' : active == 'message'}" ><a ui-sref="messagePersonal">消息(<span ng-bind="unReadMessCount || 0"></span>)</a></li>
+                <!--<li ng-if="userInfo.enterprise && userInfo.enterprise.uu" ng-class="{'active' : active == 'message'}" ><a ui-sref="messagePersonal">消息(<span ng-bind="unReadMessCount || 0"></span>)</a></li>-->
                 <!--<li ng-class="{'active' : active == 'browsing-history'}" s><a href="#browsing-history">浏览历史</a></li>-->
             </ul>
         </div>

+ 2 - 2
src/main/webapp/resources/view/sso/securitySet.html

@@ -958,7 +958,7 @@
                         <h5 ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
                         <h5 ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2"><img src="static/img/user/images/safe.png"/></h5>
                         <font>邮箱认证:</font>
-                        <span ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userInfo.userEmail}}</i></span>
+                        <span ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2"><i ng-modal="userInfo.userEmail" style="color:#666;">{{userEmail}}</i></span>
                         <span ng-show="!userInfo.emailValidCode || userInfo.emailValidCode != 2">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
                     </span>
               <a ng-show="userInfo.emailValidCode && userInfo.emailValidCode == 2" ng-click="updateUserEmail()">修改</a>
@@ -968,7 +968,7 @@
                     <span>
                         <h5><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
                         <font>手机验证:</font>
-                        <span>您绑定的手机:<i ng-modal="userInfo.userTel" style="color:#666;">{{userInfo.userTel}}</i>。若已丢失或停用,请立即更换,避免账户被盗。</span>
+                        <span>您绑定的手机:<i ng-modal="userInfo.userTel" style="color:#666;">{{userTel}}</i>。若已丢失或停用,请立即更换,避免账户被盗。</span>
                     </span>
               <a ng-click="updateUserTel()">修改</a>
             </li>

+ 1 - 1
src/main/webapp/resources/view/sso/ssoInfo.html

@@ -907,7 +907,7 @@
   .count .basic_title span{
       margin-left:30px;
   }
-  .count .count_basic ul{
+  .count .count_basic > ul{
       margin-left:30px;
   }
 </style>

+ 1 - 0
src/main/webapp/resources/view/sso/staffManagement.html

@@ -282,6 +282,7 @@
     table.role-info tbody tr.role-filter td select {
         background: url("static/img/vendor/images/xiala.png") no-repeat;
         background-position: 30px 9px;
+        opacity:1;
     }
     table.role-info tbody >tr>td{
         font-size: 14px;