Browse Source

Merge remote-tracking branch 'origin/feature-201839-wangcz' into feature-201839-wangcz

yuj 7 years ago
parent
commit
ad507ba9bb

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/base/service/impl/MinioClientImpl.java

@@ -38,7 +38,7 @@ public class MinioClientImpl {
      * @throws Exception Exception
      */
     public String upload(InputStream inputStream, int size, String name) throws Exception {
-        String extension = name.lastIndexOf(".") == -1 ? "" : name.substring(name.lastIndexOf(".") + 1);
+        String extension = name.lastIndexOf(".") == -1 ? "" : name.substring(name.lastIndexOf(".") + 1).toLowerCase();
         JSONObject mime = FastjsonUtils.parseObject(COMMON_MIME);
         String contentType = DEFAULT_MIME;
         String objectName = UUID.randomUUID().toString();

+ 11 - 0
src/main/java/com/uas/platform/b2c/core/config/SysConf.java

@@ -188,6 +188,9 @@ public class SysConf {
 	@Value(("#{sys.productServiceIp}"))
 	private String productServiceIp;
 
+	@Value(("#{sys.lastCheckUserUU}"))
+	private Long lastCheckUserUU;
+
 	public Boolean getRebuildIndexesOnRefresh() {
 		return rebuildIndexesOnRefresh;
 	}
@@ -417,4 +420,12 @@ public class SysConf {
 		this.productServiceIp = productServiceIp;
 		return this;
 	}
+
+	public Long getLastCheckUserUU() {
+		return lastCheckUserUU;
+	}
+
+	public void setLastCheckUserUU(Long lastCheckUserUU) {
+		this.lastCheckUserUU = lastCheckUserUU;
+	}
 }

+ 8 - 0
src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreApplyFacadeImpl.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2c.prod.store.facade.impl;
 
 import com.uas.platform.b2c.common.account.model.User;
+import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.prod.store.facade.StoreApplyFacade;
 import com.uas.platform.b2c.prod.store.model.EnterpriseSimple;
@@ -36,6 +37,9 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 
 	private final StoreApplyService storeApplyService;
 
+	@Autowired
+	private SysConf sysConf;
+
 
 	@Autowired
 	public StoreApplyFacadeImpl(StoreInService storeService, StoreApplyService storeApplyService) {
@@ -50,6 +54,10 @@ public class StoreApplyFacadeImpl implements StoreApplyFacade {
 		if (user == null || user.getEnterprise() == null) {
 			return new ResultMap(CodeType.NOT_PERMIT, "请进行用户登录操作");
 		}
+		// 验证终审人
+		if (!sysConf.getLastCheckUserUU().equals(user.getUserUU())) {
+			return new ResultMap(CodeType.NOT_PERMIT, "您无该操作权限");
+		}
 		// 验证参数合法性
 		if (StringUtils.isEmpty(uuid) || status == null) {
 			return new ResultMap(CodeType.NO_INFO, "店铺申请UUID或状态信息不存在");

+ 3 - 0
src/main/resources/dev/sys.properties

@@ -15,6 +15,9 @@ adminName=\u5218\u840C\u51B0
 enName=\u4F18\u8F6F\u6D4B\u8BD5\u4E8C
 storeid = 33069557578d44e69bd91ad12d28a8d4
 
+# Store check
+lastCheckUserUU=1000017605
+
 # YesPay config
 yes_gateway=https://mertest.ysepay.com/openapi_gateway/gateway.do
 notifyURL=http://218.17.158.219:9090/platform-b2c/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/prod/sys.properties

@@ -16,6 +16,9 @@ adminName=\u5218\u840C\u51B0
 storeid = 33069557578d44e69bd91ad12d28a8d4
 enName=\u6DF1\u5733\u4F18\u8F6F\u5546\u57CE\u79D1\u6280\u6709\u9650\u516C\u53F8
 
+# Store check
+lastCheckUserUU=1000002242
+
 # YesPay config
 yes_gateway=https://openapi.ysepay.com/gateway.do
 notifyURL=https://www.usoftmall.com/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/test/sys.properties

@@ -15,6 +15,9 @@ storeid = 33069557578d44e69bd91ad12d28a8d4
 adminName=\u5218\u840C\u51B0
 enName=\u4F18\u8F6F\u6D4B\u8BD5\u4E8C
 
+# Store check
+lastCheckUserUU=1000017605
+
 # YesPay config
 yes_gateway=https://mertest.ysepay.com/openapi_gateway/gateway.do
 notifyURL=http://218.17.158.219:9090/platform-b2c/api/payment/ysepayNotify

+ 3 - 0
src/main/resources/txcloud/sys.properties

@@ -16,6 +16,9 @@ adminName=\u5218\u840C\u51B0
 storeid = 33069557578d44e69bd91ad12d28a8d4
 enName=\u6DF1\u5733\u5E02\u4F18\u8F6F\u5546\u57CE\u79D1\u6280\u6709\u9650\u516C\u53F8
 
+# Store check
+lastCheckUserUU=1000002242
+
 # YesPay config
 yes_gateway=https://openapi.ysepay.com/gateway.do
 notifyURL=https://mall.usoftchina.com/api/payment/ysepayNotify