Browse Source

Merge branch 'dev-mysql' into 2018-0205-replaceProduct-wangdy

yangc 8 years ago
parent
commit
141bb123fd

+ 2 - 7
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -527,13 +527,8 @@ public class UserController {
 	 * @return
 	 */
 	@RequestMapping(value = "/getUserQuestion", method = RequestMethod.GET)
-	public List<UserQuestion> getUserQuestion() {
-		User sysUser = SystemSession.getUser();
-		HttpHeaders headers = new HttpHeaders();
-		headers.add("Content-Type", "application/json; charset=utf-8");
-		List<UserQuestion> questions = uqService.findUserQuestionByUserUUOrderBySortAsc(sysUser.getUserUU());
-		Map<String, List<UserQuestion>> result = new HashMap<String, List<UserQuestion>>();
-		result.put("questions", questions);
+	public List<UserQuestion> getUserQuestion(Long userUU) {
+		List<UserQuestion> questions = uqService.findUserQuestionByUserUUOrderBySortAsc(userUU);
 		return questions;
 	}
 

+ 12 - 3
src/main/java/com/uas/platform/b2c/common/account/service/impl/UserQuestionServiceImpl.java

@@ -1,20 +1,25 @@
 package com.uas.platform.b2c.common.account.service.impl;
 
 import com.uas.account.util.AccountUtils;
+import com.uas.platform.b2c.common.account.dao.UserDao;
 import com.uas.platform.b2c.common.account.dao.UserQuestionDao;
+import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.model.UserQuestion;
 import com.uas.platform.b2c.common.account.service.UserQuestionService;
+import com.uas.platform.core.exception.IllegalOperatorException;
+import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-
 @Service
 public class UserQuestionServiceImpl implements UserQuestionService {
 
     @Autowired
     private UserQuestionDao userQuestionDao;
 
+    @Autowired
+    private UserDao userDao;
+
     @Override
     public UserQuestion save(UserQuestion userQuestion){
         postToAccountCenter(userQuestion);
@@ -23,7 +28,11 @@ public class UserQuestionServiceImpl implements UserQuestionService {
 
     @Override
     public List<UserQuestion> findUserQuestionByUserUUOrderBySortAsc(Long userUU) {
-        return userQuestionDao.findUserQuestionByUserUUOrderBySortAsc(userUU);
+        User user = userDao.findOne(userUU);
+        if (user == null) {
+            throw new IllegalOperatorException("找不到用户...");
+        }
+        return userQuestionDao.findUserQuestionByUserUUOrderBySortAsc(user.getUserUU());
     }
 
     private void postToAccountCenter(UserQuestion question) {

+ 1 - 0
src/main/resources/dev/account.properties

@@ -7,6 +7,7 @@ sso.app=mall
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
+sso.cookie.browser=false
 sso.login.url=http://113.105.74.135:8001/sso/login
 sso.logout.url=http://113.105.74.135:8001/sso/logout
 sso.register.url=http://113.105.74.135:8001/sso/register_p

+ 1 - 0
src/main/resources/prod/account.properties

@@ -9,6 +9,7 @@ sso.cookie.domain=usoftmall.com
 sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=true
 sso.cookie.httponly=true
+sso.cookie.browser=false
 sso.login.url=https://account.ubtob.com/sso/login
 sso.logout.url=https://account.ubtob.com/sso/logout
 sso.register.url=https://account.ubtob.com/sso/register_p

+ 1 - 0
src/main/resources/test/account.properties

@@ -7,6 +7,7 @@ sso.app=mall
 # token secretkey
 sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
+sso.cookie.browser=false
 sso.login.url=http://113.105.74.135:8001/sso/login
 sso.logout.url=http://113.105.74.135:8001/sso/logout
 sso.register.url=http://113.105.74.135:8001/sso/register_p

+ 0 - 6
src/main/webapp/resources/css/common.css

@@ -951,12 +951,6 @@ input::-webkit-input-safebox-button{
 /*去除textarea默认右下角可自由放大样式*/
 textarea{resize:none}
 
-.modal-content {
-	overflow-y: auto;
-	max-height: 520px;
-	overflow-x: hidden;
-	height: auto !important;
-}
 .form-control:focus {
 	border: 1px solid #4272d3;
 	-webkit-box-shadow: none;

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

@@ -1363,7 +1363,7 @@ define(['app/app'], function (app) {
           User.getAllSecQuestion($scope.pageInfo, function (data) {
             $scope.secQuestions = data.content;
             //查询当前用户密保问题
-            User.getUserQuestion(function (data) {
+            User.getUserQuestion({userUU: $scope.userInfo.userUU},function (data) {
               $scope.uq[0] = data[0];
               $scope.uq[1] = data[1];
             });

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

@@ -1302,7 +1302,7 @@ define(['app/app'], function(app) {
           User.getAllSecQuestion($scope.pageInfo, function (data) {
             $scope.secQuestions = data.content;
             //查询当前用户密保问题
-            User.getUserQuestion(function (data) {
+            User.getUserQuestion({userUU: $scope.userInfo.userUU},function (data) {
               $scope.uq[0] = data[0];
               $scope.uq[1] = data[1];
             });

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

@@ -1,7 +1,7 @@
 define([ 'app/app', 'jquery-uploadify' ], function(app) {
 	'use strict';
 	app.register.controller('vendor_materialPersonCtrl', ['$scope', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', 'Goods', function ($scope, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService, Goods) {
-		$rootScope.active = 'vendor_material_person';
+		$rootScope.active = 'vendor_material';
 		document.title = '卖家产品库-优软商城';
 		$scope.tab = 'material_person';
 		$scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
@@ -62,14 +62,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 			loadData();
 		}
 
-		if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
-			$scope.tab = 'unstandard_material';
-			// $scope.standard_tab = 'unstandard';
-            $scope.param.type = "nStandard";
-            // $scope.param.sorting = {code : 'ASC'};
-            $scope.isBatch = false;
-		}
-
 		$scope.goods = { breakUp: 1, isSelfSupport: 1, prices: [{}] };
 		$scope.isSelfSupport = true;
 		$scope.showShelfArea = showShelfArea;

+ 0 - 2
src/main/webapp/resources/view/common/modal/delivery_rule_modal.html

@@ -7,8 +7,6 @@
         background-color: white;
         top: 55%;
         left: 50%;
-        height: 155px;
-        width: 290px;
         margin: -145px 0 0 -77px;
     }
     .com-del-box{

+ 6 - 0
src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html

@@ -607,6 +607,12 @@
     .modal-lg {
         width: 914px;
     }
+    .modal-content {
+        overflow-y: auto;
+        max-height: 520px;
+        overflow-x: hidden;
+        height: auto !important;
+    }
 </style>
 
 <div id="bill-info">

+ 9 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_material_person.html

@@ -677,13 +677,16 @@
 		font-size: 14px;
 		color: #f15601;
 	}
-	.result a{
+	.result a.fr{
 		padding-right: 10px;
-		float: right;
 		font-size: 20px;
 		font-weight: bold;
 		color: #ef1d1d;
 	}
+    .result .operate-introduce {
+        font-size: 14px;
+        color: #5078cb;
+    }
 	.tab-head{
 		width: 100%;
 		height: 40px;
@@ -1550,6 +1553,10 @@
 					</tr>
 					</thead>
 					<tbody class="bg-show">
+                    <div class="result" ng-if="resultTip"><span class="fl"><em>*</em>导入企业库的产品同时会进行上架销售并展示在店铺</span>
+                        <a href="help/helpDetail/56" target="_blank" class="operate-introduce">操作说明</a>
+                        <a ng-click="closeTip()" class="fr">&times;</a>
+                    </div>
 					<!--<tr style="height: 14px;" ng-show="!isBatch && standard_tab == 'standard'">-->
 					<tr style="height: 14px;">
 						<td colspan="6" class="hei18"></td>

+ 9 - 4
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -476,18 +476,23 @@
         font-size: 14px;
         color: #f15601;
     }
-    .remind-line a{
+    .remind-line a.fr{
         padding-right: 10px;
-        float: right;
         font-size: 20px;
         font-weight: bold;
         color: #ef1d1d;
     }
+    .remind-line .operate-introduce {
+        font-size: 14px;
+        color: #5078cb;
+    }
     .device .wanted_list01 .pagination > li > a:hover {
         border-bottom: 1px solid #ddd !important;
+        z-index: 0;
     }
-    .device .wanted_list01 .pagination > .active > a {
+    .device .wanted_list01 .pagination > li.active:hover > a {
         border: 1px solid #337ab7 !important;
+        border-bottom: none !important;
     }
 </style>
 <div class="user_right fr">
@@ -500,7 +505,7 @@
             </ul>
         </div>
         <div class="remind-line" ng-show="$$productOn.tab == 'bathOn' && showTip"><span class="fl">导入企业库的产品同时会进行上架销售并展示在店铺</span><a ng-click="closeTip()" class="fr">&times;</a></div>
-        <div class="remind-line" ng-show="$$productOn.tab == 'bathOnPerson' && showTip"><span class="fl">创建您的个人产品库,可为您精准推送客户需求</span><a ng-click="closeTip()" class="fr">&times;</a></div>
+        <div class="remind-line" ng-show="$$productOn.tab == 'bathOnPerson' && showTip"><span class="fl">创建您的个人产品库,可为您精准推送客户需求</span><a href="help/helpDetail/56" target="_blank" class="operate-introduce">操作说明</a><a ng-click="closeTip()" class="fr">&times;</a></div>
         <div class="wanted_list01">
             <div class="tab" ng-if="$$productOn.leadIn == 'bathOn'" ng-class="{'active': leadIn == 'bathOn'}" >
                 <div class="load_next" ng-class="{'border-none':open01}">