Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into feature-vendorRecommend-dongbw-180425

dongbw 7 years ago
parent
commit
c5b1bdc74e

+ 1 - 2
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -422,8 +422,7 @@ public class ProductServiceImpl implements ProductService {
         }
         Date date = new Date();
         // 删除原有的替代料数据
-        List<ProductReplace> existReplaces = productReplaceDao.findByProductIdOrderByDetno(productId);
-        productReplaceDao.delete(existReplaces);
+        productReplaceDao.deleteByProductId(productId);
         for (ProductReplace productReplace : productReplaceList) {
             if (productReplace.getUserUU() == null) {
                 productReplace.setUserUU(SystemSession.getUser().getUserUU());

+ 3 - 2
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -174,13 +174,14 @@ public class StoreInServiceImpl implements StoreInService {
 		}else {
 			StoreIn returnStoreIn;
 			StoreIn storeInsOne = storeIns.get(0);
-			EnterpriseSimple enterpriseSimple = EnterpriseSimple.translateSimple(SystemSession.getUser().getEnterprise());
+			/*EnterpriseSimple enterpriseSimple = EnterpriseSimple.translateSimple(SystemSession.getUser().getEnterprise());
 			if (enterpriseSimple.getEnName().equals(storeInsOne.getEnterprise().getEnName())) {
 				returnStoreIn = storeInsOne;
 			} else {
 				storeInsOne.setEnterprise(enterpriseSimple);
 				returnStoreIn = storeDao.save(storeInsOne);
-			}
+			}*/
+			returnStoreIn = storeInsOne;
 			Set<Qualification> qualifications = returnStoreIn.getQualifications();
 			Set<Qualification> qualificationsSort = getQualificationsSort();
 			qualificationsSort.addAll(qualifications);

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -244,7 +244,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         if (StringUtils.isEmpty(codeValue)) {
             result += 1;
         } else {
-            String code = StringUtilB2C.replaceLineBreak(StringUtilB2C.getStr(codeValue));
+            String code = StringUtilB2C.getStr(codeValue).trim();
             try {
                 code = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(code, 100);
                 if (!match(code)) {

+ 1 - 0
src/main/webapp/WEB-INF/spring/webmvc.xml

@@ -117,6 +117,7 @@
 			<mvc:exclude-mapping path="/seek/getSeekRanking"/>
 			<mvc:exclude-mapping path="/seek/release/template"/>
 			<mvc:exclude-mapping path="/erp/productReplace/update"/>
+			<mvc:exclude-mapping path="/basic/enterprise/findByName/**"/>
 			<bean class="com.uas.platform.b2c.core.filter.SSOInterceptor"></bean>
 		</mvc:interceptor>
 		<!-- 对所有的请求拦截,将Session中的User信息设置进SystemSession -->

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

@@ -239,7 +239,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
             brand.id = null;
             BrandSubmit.submit({},brand,function(data){
-                toaster.pop('success', '提示', "提交成功,请等待审核");
+                toaster.pop('success', '提示', "提交成功,审核将在3个工作日内完成,耐心等待");
                 window.location.replace('vendor#/brand/apply_list');
             },function(res){
                 $scope.submitEnable = true;

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

@@ -401,7 +401,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
                     component: $scope.component
                 }
             }).success(function(data){
-                toaster.pop('success', '提示', '提交成功,请等待审核');
+                toaster.pop('success', '提示', '提交成功,审核将在3个工作日内完成,耐心等待');
                 window.location.replace('vendor#/component/applylist');
             }).error(function(response){
                 $scope.submitEnable = true;

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

@@ -789,7 +789,7 @@
                         <input type="text" class="form-control" placeholder="数量">
                         -
                         -->
-                        <input type="number" class="form-control" ng-blur="onReplyLapQtyBlur($index)" ng-change="onReplyLapQtyInput($index)" ng-model="reply.lapQty" placeholder="数量">
+                        <input type="number" class="form-control" ng-blur="onReplyLapQtyBlur($index)" ng-change="onReplyLapQtyInput($index)" ng-model="reply.lapQty" placeholder="分段数量">
                     </div>
                     <div class="form-item form-right">
                         <span><i>*</i>单价<span ng-if="inquiryItem.currency" ng-bind="inquiryItem.currency == 'USD' ? '$' : '¥'"></span>:</span>
@@ -797,7 +797,7 @@
                             <option value="RMB">¥</option>
                             <option value="USD">$</option>
                         </select>
-                        <input type="number" class="form-control" ng-change="onReplyPriceInput($index)" ng-blur="onReplyPriceBlur($index)" ng-model="reply.price" placeholder="单价">
+                        <input type="number" class="form-control" ng-change="onReplyPriceInput($index)" ng-blur="onReplyPriceBlur($index)" ng-model="reply.price" placeholder="分段单价">
                         <i class="fa fa-minus-circle" ng-if="inquiryItem.replies.length > 1" ng-click="setReplies('sub', $index)"></i>
                         <i class="fa fa-plus-circle" ng-if="inquiryItem.replies.length < 5" ng-click="setReplies('add', $index)"></i>
                     </div>

+ 84 - 0
src/test/java/com/uas/platform/b2c/common/gor/GorTest.java

@@ -0,0 +1,84 @@
+package com.uas.platform.b2c.common.gor;
+
+import com.uas.platform.core.util.HttpUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.UUID;
+
+/**
+ * 测试模拟发起请求<br/>
+ * 用于测试Gor流量复制
+ * @author suntg
+ * @date 2018年5月8日17:26:46
+ */
+public class GorTest {
+
+//    private static String HOST_URL = "http://localhost:20210/article";
+
+    private static String HOST_URL = "http://192.168.253.6:20218/article";
+
+    public static void main(String[] args) {
+        generalTest();
+    }
+
+    /**
+     * 集成测试
+     */
+    public static void generalTest() {
+        int i = 0, getCount = 0, postCount = 0;
+        while (i < 10000) {
+            Random random = new Random();
+            // 随机事件,50-150ms
+            int timer = 50 + random.nextInt(100);
+            // 随机类型,1 get请求,2 post请求
+            int type = 1 + random.nextInt(2);
+            switch (type) {
+                case 1 :
+                    testGetApi();
+                    System.out.println("i: " + i + ", send get request.");
+                    getCount ++;
+                    break;
+                case 2 :
+                    testPostApi();
+                    System.out.println("i: " + i + ", send post request.");
+                    postCount ++;
+                    break;
+            }
+            try {
+                Thread.sleep(timer);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            i++;
+        }
+        System.out.println(i + " requests send, " + getCount + " getRequest, " + postCount + " postRequest.");
+    }
+
+    /**
+     * 发起get请求
+     */
+    public static void testGetApi() {
+        try {
+            HttpUtil.sendGetRequest(HOST_URL, null);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 发起post请求
+     */
+    public static void testPostApi() {
+        try {
+            Map<String, Object> params = new HashMap<String, Object>();
+            // 生成随机的字符串
+            String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+            params.put("content", uuid);
+            HttpUtil.sendPostRequest(HOST_URL, params, false, false);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}