Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into function-productModify-hulh-0312

# Conflicts:
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
dongbw 7 years ago
parent
commit
44a01874df

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

@@ -279,10 +279,10 @@ public class ProductServiceImpl implements ProductService {
             }
         }
         userUU = SystemSession.getUser().getUserUU();
-        List<ProductPerson> ppList = productPersonDao.findByUserUU(userUU);
+        List<Long> productIds = productPersonDao.findIdByEnuuAndUserUU(enuu, userUU);
         for (V_ProductPrivate v_productPrivate : productList) {
-            for (ProductPerson productPerson : ppList) {
-                if (v_productPrivate.getId().equals(productPerson.getProductId())) {
+            for (Long productId : productIds) {
+                if (v_productPrivate.getId().equals(productId)) {
                     v_productPrivate.setAddProductPerson(true);
                 }
             }

+ 4 - 3
src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java

@@ -33,6 +33,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	 * @param size    每页大小
 	 * @param keyword 关键词
 	 * @return 供应商资源page
+     * @version 2018年5月15日 11:53:06 增加限制,要求营业执照号长度大于12才显示
 	 */
 	@Override
 	public Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword) {
@@ -124,7 +125,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 		// 获取企业sql
 		enterpriseSql.append("select en.en_uu enUU, en.en_name enName, en.en_shortname enShortname, en.en_address enAddress, en.en_tel enTel, " +
 				"en.en_email enEmail, en.en_corporation enCorporation, en.en_businesscode enBusinesscode, en.en_industry enIndustry, en.en_Businessscope enBusinessScope " +
-				",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%'  and en_name not like '%test%' and en_uu <> ")
+				",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ")
 			.append(enUU);
 		if (!StringUtils.isEmpty(keyword)) {
 			enterpriseSql.append(" and (en_name like '%").append(keyword).append("%' or en_address like '%").append(keyword).append("%' or en_industry like '%").append(keyword)
@@ -160,7 +161,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 			enCountSql.append("select count(1) from (").append(keywordSql);
 		} else {
 			enCountSql.append("select count(1) from (select en_uu,count(1) from sec$enterprises where en_name not like '%测试%' " +
-					" and en_name not like '%test%'and en_uu <> ").append(enUU);
+					" and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ").append(enUU);
 		}
 		enCountSql.append(" group by en_uu )a");
         System.out.println("en_count:" + enCountSql.toString());
@@ -175,7 +176,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	 */
 	private String getKeywordSql(Long enUU, String keyword) {
 		return "select en_uu,count(1) as counts from sec$enterprises where en_name not like '%测试%' " +
-				"and lower(en_name) not like '%test%' and (en_name like '%"
+				"and lower(en_name) not like '%test%' and length(en_businesscode) > 12 and (en_name like '%"
 				+ keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '%" + keyword
 				+ "%') and en_uu <> " + enUU;
 	}

+ 0 - 12
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -1,18 +1,6 @@
 define([ 'app/app', 'jquery-uploadify' ], function(app) {
 	'use strict';
 	app.register.controller('vendor_materialCtrl', ['$scope', 'Loading', '$rootScope', 'Material', 'toaster', 'ComponentActive', 'Enterprise', '$q', 'NumberService', '$location', '$stateParams', 'Search', '$modal', 'ComponentActiveAPI', 'BrandSubmit', 'BrandActiveAPI', 'DistributionRule', 'prodRepositoryService', 'AuthenticationService', 'StoreInfo', 'ProductServiceQuery', 'StoreCms', 'ByteCountService', 'Goods', 'UASBatchPutOnPropertyServices', '$filter', '$upload', function ($scope, Loading, $rootScope, Material, toaster, ComponentActive, Enterprise, $q, NumberService, $location, $stateParams, Search, $modal, ComponentActiveAPI, BrandSubmit, BrandActiveAPI, DistributionRule, prodRepositoryService, AuthenticationService, StoreInfo, ProductServiceQuery, StoreCms, ByteCountService, Goods, UASBatchPutOnPropertyServices, $filter, $upload) {
-    app.directive('onFinishRender', function ($timeout) {
-      return {
-        restrict: 'A',
-        link: function (scope) {
-          if (scope.$last === true) {
-            $timeout(function () {
-              scope.$emit('ngRepeatFinished');
-            });
-          }
-        }
-      }
-    })
 		$rootScope.active = 'vendor_material';
 		document.title = '卖家产品库-优软商城';
 		$scope.tab = 'material';