瀏覽代碼

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 年之前
父節點
當前提交
0c8d186241

+ 26 - 0
src/main/java/com/goafanti/demandCollection/controller/DemandCollectionApiController.java

@@ -1,10 +1,13 @@
 package com.goafanti.demandCollection.controller;
 
 
+import java.util.UUID;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -20,6 +23,12 @@ public class DemandCollectionApiController  extends CertifyApiController {
 	@Resource
 	private DemandCollectionService		demandCollectionService;
 	
+	@Value(value = "${skjt.userName}")
+	private String	username			= null;
+	
+	@Value(value = "${skjt.password}")
+	private String	password			= null;
+	
 	/**
 	 * 新增需求收集
 	 * @param d
@@ -48,6 +57,23 @@ public class DemandCollectionApiController  extends CertifyApiController {
 		return res;
 		
 	}
+	/**
+	   *模拟登陆
+	 * @param d
+	 * @return
+	 */
+	@RequestMapping(value="/open/login",method = RequestMethod.POST)
+	public Result demandCollectionList(String userName ,String password){
+		Result res =new Result();
+		//模拟登陆
+		if (username==null||password==null||!userName.equals(this.username)||!password.equals(this.password)) {
+			res.getError().add(buildError("账号密码不匹配!","账号密码不匹配!"));
+			return  res ;
+		}
+		res.data(UUID.randomUUID().toString());
+		return res;
+		
+	}
 	
 	/**
 	 * 	导出变更列表

+ 2 - 0
src/main/resources/props/config_local.properties

@@ -41,6 +41,8 @@ template.cacheable=false
 static.host=//ss.jishutao.com/client/1.2.5
 portal.host=//ss.jishutao.com/portal/1.2.5
 skjt.host=//statics.jishutao.com/skjt
+skjt.userName=admin
+skjt.password=asd123..
 #本地
 #static.host=//sclient.jishutao.com:8088/client/1.0.2
 #portal.host=//sportal.jishutao.com:80/portal/1.0.2

+ 3 - 0
src/main/resources/props/config_test.properties

@@ -59,6 +59,9 @@ template.cacheable=false
 static.host=//statics.jishutao.com/client/1.0.0
 portal.host=//statics.jishutao.com/portal/1.0.1
 skjt.host=//statics.jishutao.com/skjt
+skjt.userName=admin
+skjt.password=asd123..
+
 avatar.host=//statics.jishutao.com
 avatar.upload.host=//statics.jishutao.com/upload