|
|
@@ -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;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 导出变更列表
|