解决冲突
This commit is contained in:
@@ -12,6 +12,7 @@ import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.common.Page;
|
||||
import com.adc.da.login.util.JwtUtils;
|
||||
import com.adc.da.sys.common.EmailUtils;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.service.IUserEOService;
|
||||
@@ -30,9 +31,14 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
@@ -48,6 +54,10 @@ public class WorkFlowController {
|
||||
|
||||
@Autowired
|
||||
private workFlowFeignClientImpl workFlowFeignClient;
|
||||
@Autowired
|
||||
private IUserEOService userService;
|
||||
@Autowired
|
||||
private JwtUtils jwtUtils;
|
||||
|
||||
@Value("${stand.edit.file.path}")
|
||||
private String standEditFilePath;
|
||||
@@ -821,4 +831,30 @@ public class WorkFlowController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "手机端登录")
|
||||
@PostMapping(value = "/loginMobile")
|
||||
@ResponseBody
|
||||
public ResponseMessage<String> loginMobile(@RequestParam("taskIds") String taskIds, @RequestParam("pId") String pId)throws UnsupportedEncodingException {
|
||||
BusProcessNew busProcessNew = workFlowFeignClient.inboundLiaisonDetail(taskIds,pId);
|
||||
if(busProcessNew == null || StringUtils.isBlank(busProcessNew.getUserId())){
|
||||
return Result.error("","未通过流程实例获取到用户信息");
|
||||
}
|
||||
UserEO userEO = userService.getUserByLoginNameNotDeleted(busProcessNew.getUserId());
|
||||
if (null == userEO) {
|
||||
return Result.error("r0011", "用户不存在");
|
||||
}
|
||||
if(userEO.getDisableFlag()==1){
|
||||
return Result.error("r0011", "帐号已禁用");
|
||||
}
|
||||
String token = jwtUtils.generateToken(userEO.getUsid());
|
||||
userEO.setToken(token);
|
||||
// 加密重要信息
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
String userStr = JSON.toJSONString(userEO);
|
||||
String userStr2 = URLEncoder.encode(userStr,"UTF-8");
|
||||
userStr = encoder.encode(userStr2.getBytes());
|
||||
return Result.success(userStr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -97,6 +97,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/getImg");
|
||||
|
||||
addInterceptor.excludePathPatterns("/api/lawss/activiti/loginMobile");
|
||||
|
||||
|
||||
// //测试接口使用
|
||||
// addInterceptor.excludePathPatterns("/api/**");
|
||||
|
||||
Reference in New Issue
Block a user