|
@@ -17,10 +17,9 @@ import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.LinkedHashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.*;
|
|
|
|
+
|
|
@Api("用户信息管理")
|
|
@Api("用户信息管理")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/api/advalidateciphertext")
|
|
@RequestMapping("/api/advalidateciphertext")
|
|
@@ -44,7 +43,7 @@ public class ActionApi {
|
|
*/
|
|
*/
|
|
@ApiOperation("子系统调AD")
|
|
@ApiOperation("子系统调AD")
|
|
@PostMapping()
|
|
@PostMapping()
|
|
- public AjaxResult userList(@RequestBody ValidateMessage validateMessage)
|
|
|
|
|
|
+ public AjaxResult userList(@RequestBody ValidateMessage validateMessage)throws Exception
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
@@ -71,6 +70,22 @@ public class ActionApi {
|
|
if(!StringUtils.isEmpty(validateMessage.getReqid())){
|
|
if(!StringUtils.isEmpty(validateMessage.getReqid())){
|
|
String reqid = validateMessage.getReqid();
|
|
String reqid = validateMessage.getReqid();
|
|
if(reqid.indexOf("newReqid")>0){
|
|
if(reqid.indexOf("newReqid")>0){
|
|
|
|
+ String[] reqidlist = reqid.split("newReqid");
|
|
|
|
+ if(reqidlist.length>1){
|
|
|
|
+ //TODO 说明有newReqid
|
|
|
|
+ long nd = 1000 * 24 * 60 * 60;
|
|
|
|
+ long nh = 1000 * 60 * 60;
|
|
|
|
+ long nm = 1000 * 60;
|
|
|
|
+ String time = reqidlist[1];
|
|
|
|
+ Date date = new Date(Long.valueOf(time));
|
|
|
|
+ // 获得两个时间的毫秒时间差异
|
|
|
|
+ long diff = new Date().getTime() - date.getTime();
|
|
|
|
+ long min = diff % nd % nh / nm;
|
|
|
|
+ if(min>1){
|
|
|
|
+ logger.error("reqid已过期");
|
|
|
|
+ return AjaxResult.error("授权已过期!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
StringBuilder stringBuilder = new StringBuilder(reqid);
|
|
StringBuilder stringBuilder = new StringBuilder(reqid);
|
|
stringBuilder.replace(reqid.indexOf("newReqid"),reqid.length(),"");
|
|
stringBuilder.replace(reqid.indexOf("newReqid"),reqid.length(),"");
|
|
validateMessage.setReqid(stringBuilder.toString());
|
|
validateMessage.setReqid(stringBuilder.toString());
|