Browse Source

Merge remote-tracking branch 'origin/release-201824-wangcz' into release-201824-wangcz

wangcz 7 years ago
parent
commit
d127429215

+ 3 - 3
src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java

@@ -42,7 +42,7 @@ public class SearchUrl {
      * 根据类目获取供应商数据
      *
      */
-    public static final String KIND_SELLER_URL = "/search/kindsAndSellers?keyword={keyword}&page={page}&size={size}";
+    public static final String KIND_SELLER_URL = "/search/kindsAndSellers?keyword={keyword}&page={page}&size={size}&storeType={storeType}";
 
     /**
      * 搜索品牌的id
@@ -57,7 +57,7 @@ public class SearchUrl {
     /**
      * 主搜索页搜索品牌带出供应商
      */
-    public static final String BRAND_SELLERS_URL = "/search/brandsAndSellers?keyword={keyword}&page={page}&size={size}";
+    public static final String BRAND_SELLERS_URL = "/search/brandsAndSellers?keyword={keyword}&page={page}&size={size}&storeType={storeType}";
 
 
     /**
@@ -152,7 +152,7 @@ public class SearchUrl {
     /**
      * 搜索库存信息
      */
-    public static final String GOODIS_URL= "/search/goodsIds?keyword={keyword}&params={params}";
+    public static final String GOODIS_URL= "/search/goodsIds?keyword={keyword}&params={params}&storeType={storeType}";
 
     /**
      * 搜索pcb库存信息

+ 6 - 6
src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java

@@ -330,12 +330,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=component")
 	@ResponseBody
-	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getCompGoodsBySearch(PageParams params, String keyword, String storeType, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.searchComponentGoods(keyword, params, request);
+		return searcherService.searchComponentGoods(keyword, params, storeType.replace("-",","), request);
 	}
 
 	/**
@@ -346,12 +346,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=kind")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchProduct(PageParams params, String keyword, String storeType, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchKind(keyword, params);
+		return searcherService.getEnterpriseBySearchKind(keyword, params, storeType.replace("-",","));
 	}
 	/**
 	 * 2018.19期搜索接口
@@ -376,12 +376,12 @@ public class SearcherController {
 	 */
 	@RequestMapping(value = "/201819", method = RequestMethod.GET, params = "type=brand")
 	@ResponseBody
-	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, HttpServletRequest request) {
+	public ModelMap getEnterpriseBySearchBrand(PageParams params, String keyword, String storeType, HttpServletRequest request) {
 		if (StringUtils.isEmpty(keyword) || "*".equals(keyword)) {
 			return new ModelMap("total",0);
 		}
 		keyword = keyword.trim();
-		return searcherService.getEnterpriseBySearchBrand(keyword, params);
+		return searcherService.getEnterpriseBySearchBrand(keyword, params, storeType.replace("-",","));
 	}
 
 	/**

+ 6 - 3
src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java

@@ -86,8 +86,9 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size) throws SearchException {
+    public Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException {
         Map<String, Object> map = initSearchMap(keyword, page, size);
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.KIND_SELLER_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;
@@ -171,8 +172,9 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size) throws SearchException {
+    public SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException {
         Map<String, Object> map = initSearchMap(keyword, page, size);
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.BRAND_SELLERS_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;
@@ -528,10 +530,11 @@ public class SearchServiceImpl implements SearchService{
     }
 
     @Override
-    public Map<String, Object> getGoodsIds(String keyword, PageParams var2) throws SearchException {
+    public Map<String, Object> getGoodsIds(String keyword, PageParams var2, String storeType) throws SearchException {
         Map<String, Object> map = new HashedMap();
         map.put("keyword", keyword);
         map.put("params", FlexJsonUtils.toJsonDeep(var2));
+        map.put("storeType", storeType);
         String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.GOODIS_URL, String.class, map);
         if(StringUtils.isEmpty(str)) {
             return null;

+ 3 - 3
src/main/java/com/uas/platform/b2c/common/search/rpc/service/SearchService.java

@@ -19,7 +19,7 @@ public interface SearchService {
 
     SPage<Map<String, Object>> getKinds(String keyword, Integer page, Integer size) throws SearchException;
 
-    Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size) throws SearchException;
+    Map<String, Object> getKindsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException;
 
     SPage<Long> getProducts(Long enUU, String keyword, Integer page, Integer size, String type) throws SearchException;
 
@@ -27,7 +27,7 @@ public interface SearchService {
 
     SPage<Map<String, Object>> getBrands(String keyword, Integer page, Integer size) throws SearchException;
 
-    SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size) throws SearchException;
+    SPage<Map<String, Object>> getbrandsAndSellers(String keyword, Integer page, Integer size, String storeType) throws SearchException;
 
     String getComponentIds(String keyword, PageParams var2) throws SearchException;
 
@@ -57,7 +57,7 @@ public interface SearchService {
 
     List<Map<String, String>> getSimilarPropertyValues(Long kindId, Long propertyId, String keyword, Long topNum) throws SearchException;
 
-    Map<String, Object> getGoodsIds(String keyword, PageParams var2) throws SearchException;
+    Map<String, Object> getGoodsIds(String keyword, PageParams var2, String storeType) throws SearchException;
 
     Map<String, Object> getGoodsIdsForKinds(PageParams var2) throws SearchException;
 

+ 4 - 4
src/main/java/com/uas/platform/b2c/common/search/service/SearcherService.java

@@ -80,15 +80,15 @@ public interface SearcherService {
 	 * @throws InterruptedException
 	 * @throws IOException
 	 */
-	public ModelMap searchComponentGoods(String keyword, PageParams page , HttpServletRequest request);
+	public ModelMap searchComponentGoods(String keyword, PageParams page , String storeType, HttpServletRequest request);
 
 
 	/**
 	 * 201819期搜索接口调整
 	 */
-	public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page);
+	public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page, String storeType);
 	public ModelMap getEnterpriseBySearchStore(String keyword, PageParams page, HttpServletRequest request);
-	public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page);
+	public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page, String storeType);
 
 	/**
      * 批次搜索数量统计
@@ -99,7 +99,7 @@ public interface SearcherService {
      * @throws InterruptedException
      * @throws IOException
      */
-    public ModelMap searchComponentGoodsNums(String keyword, PageParams page);
+    public ModelMap searchComponentGoodsNums(String keyword, PageParams page, String storeType);
 
 	/**
 	 * 器件搜索的品牌统计列表

+ 8 - 8
src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java

@@ -262,7 +262,7 @@ public class SearcherServiceImpl implements SearcherService {
 	 */
 	@SuppressWarnings("unchecked")
 	@Override
-	public ModelMap searchComponentGoods(String keyword, PageParams page , HttpServletRequest request) {
+	public ModelMap searchComponentGoods(String keyword, PageParams page , String storeType, HttpServletRequest request) {
 		if (this.deviceResolver.resolveDevice(request).isMobile()) {
 			SystemSession.setUser((User)request.getSession().getAttribute("user"));
 			if (null != SystemSession.getUser() && null!= SystemSession.getUser().getUserUU()){
@@ -288,7 +288,7 @@ public class SearcherServiceImpl implements SearcherService {
 
 		Map<String,Object> results = null;
 		try {
-			results = searchService.getGoodsIds(keyword, convertPageParams(page));
+			results = searchService.getGoodsIds(keyword, convertPageParams(page), storeType);
 		} catch (SearchException e) {
 			throwSystemException(e);
 		}
@@ -338,11 +338,11 @@ public class SearcherServiceImpl implements SearcherService {
      * @return
      */
     @Override
-    public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page) {
+    public ModelMap getEnterpriseBySearchKind(String keyword, PageParams page, String storeType) {
         ModelMap resultMap = new ModelMap();
         Map<String, Object> kindsMap = null;
         try {
-            kindsMap = searchService.getKindsAndSellers(keyword, page.getPage(), page.getCount());
+            kindsMap = searchService.getKindsAndSellers(keyword, page.getPage(), page.getCount(), storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }
@@ -461,12 +461,12 @@ public class SearcherServiceImpl implements SearcherService {
     }
 
     @Override
-    public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page) {
+    public ModelMap getEnterpriseBySearchBrand(String keyword, PageParams page, String storeType) {
 
         ModelMap resultMap = new ModelMap();
         SPage<Map<String, Object>> brandsMap = null;
         try {
-            brandsMap = searchService.getbrandsAndSellers(keyword, page.getPage(), page.getCount());
+            brandsMap = searchService.getbrandsAndSellers(keyword, page.getPage(), page.getCount(), storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }
@@ -538,12 +538,12 @@ public class SearcherServiceImpl implements SearcherService {
      */
     @SuppressWarnings("unchecked")
     @Override
-    public ModelMap searchComponentGoodsNums(String keyword, PageParams page) {
+    public ModelMap searchComponentGoodsNums(String keyword, PageParams page, String storeType) {
         ModelMap map = new ModelMap();
         Map<String, Object> results = null;
         //Map<String, Object> results = new HashMap<>();
         try {
-            results = searchService.getGoodsIds(keyword, convertPageParams(page));
+            results = searchService.getGoodsIds(keyword, convertPageParams(page),storeType);
         } catch (SearchException e) {
             throwSystemException(e);
         }

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

@@ -778,7 +778,7 @@
                         <span>收款成功</span>
                         <span ng-bind="record.transferTime | date : 'yyyy-MM-dd HH:mm:ss'">2017.01.18</span>
                     </dd>
-                    <div class="total" ng-if="bankTransRecore && bankTransRecore.length > 0">
+                    <!--<div class="total" ng-if="bankTransRecore && bankTransRecore.length > 0">-->
                      <!--   <span>收入总计&nbsp;  <em><i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
                             <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>{{totalPrice}}</em></span>
                         <b>|</b>
@@ -787,24 +787,24 @@
                         <b>|</b>
                         <span>结余&nbsp;<em><i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
                             <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>{{totalPrice}}(共计{{totalElements}}笔交易)</em></span>-->
-                        <div class="fl">共计{{totalElements}}笔交易</div>
-                        <div class="fr">
-                            <p>已收总计:
-                                <em>
-                                    <i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
-                                    <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>
-                                    {{totalPrice}}
-                                </em>
-                            </p>
-                            <p>结余:
-                                <em>
-                                    <i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>
-                                    <i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>
-                                    {{totalPrice}}
-                                </em>
-                            </p>
-                        </div>
-                    </div>
+                        <!--<div class="fl">共计{{totalElements}}笔交易</div>-->
+                        <!--<div class="fr">-->
+                            <!--<p>已收总计:-->
+                                <!--<em>-->
+                                    <!--<i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>-->
+                                    <!--<i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>-->
+                                    <!--{{totalPrice}}-->
+                                <!--</em>-->
+                            <!--</p>-->
+                            <!--<p>结余:-->
+                                <!--<em>-->
+                                    <!--<i class="fa fa-yen" ng-if="currencySymbol.indexOf('RMB') > -1"></i>-->
+                                    <!--<i class="fa fa-usd" ng-if="currencySymbol.indexOf('USD') > -1"></i>-->
+                                    <!--{{totalPrice}}-->
+                                <!--</em>-->
+                            <!--</p>-->
+                        <!--</div>-->
+                    <!--</div>-->
 
                     <dd ng-if="!bankTransRecore || bankTransRecore.length == 0" class="tab-dd" style="height: 125px; padding: 30px;">
                         <div class="col-xs-offset-3 col-xs-2">