Compare commits
No commits in common. "3a8119b61b58ca5b04db325b31396d152483e3de" and "9f6df86316b097ee5900befd151c94c729d30230" have entirely different histories.
3a8119b61b
...
9f6df86316
|
|
@ -124,10 +124,9 @@ public class TokenController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("loginApp")
|
@PostMapping("loginApp")
|
||||||
public R<?> loginApp(@RequestBody LoginBody form) throws Exception {
|
public R<?> loginApp(@RequestBody LoginBody form) {
|
||||||
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
|
||||||
// 用户登录
|
// 用户登录
|
||||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData);
|
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||||
if (userInfo != null) {
|
if (userInfo != null) {
|
||||||
userInfo.setLoginMethod("mobile");
|
userInfo.setLoginMethod("mobile");
|
||||||
return R.ok(tokenService.createToken(userInfo));
|
return R.ok(tokenService.createToken(userInfo));
|
||||||
|
|
|
||||||
|
|
@ -42,34 +42,34 @@ public class SysFileController {
|
||||||
private ResourceLoader resourceLoader;
|
private ResourceLoader resourceLoader;
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/upload")
|
// @PostMapping("/upload")
|
||||||
@ApiOperation(value = "文件上传")
|
// @ApiOperation(value = "文件上传")
|
||||||
public AjaxResult upload(HttpServletRequest request) {
|
// public AjaxResult upload(HttpServletRequest request) {
|
||||||
String limitWords = request.getParameter("limitWords");
|
// String limitWords = request.getParameter("limitWords");
|
||||||
FileInfo file = new FileInfo();
|
// FileInfo file = new FileInfo();
|
||||||
try {
|
// try {
|
||||||
file = service.uploadFile(request);
|
// file = service.uploadFile(request);
|
||||||
// String suffix = file.getFileName().substring(file.getFileName().lastIndexOf(".") + 1);
|
// // String suffix = file.getFileName().substring(file.getFileName().lastIndexOf(".") + 1);
|
||||||
|
//
|
||||||
/* if (! ATTACHMENT_FILE_SUFFIX.contains(suffix) || ! COST_FILE_SUFFIX.contains(suffix)) {
|
// /* if (! ATTACHMENT_FILE_SUFFIX.contains(suffix) || ! COST_FILE_SUFFIX.contains(suffix)) {
|
||||||
return AjaxResult.error(ErrorCode.COMMISSION_BILL_ATTACHMENT_NOT_SUPPORT.getCode(),
|
// return AjaxResult.error(ErrorCode.COMMISSION_BILL_ATTACHMENT_NOT_SUPPORT.getCode(),
|
||||||
ErrorCode.COMMISSION_BILL_ATTACHMENT_NOT_SUPPORT.getMessage());
|
// ErrorCode.COMMISSION_BILL_ATTACHMENT_NOT_SUPPORT.getMessage());
|
||||||
}*/
|
// }*/
|
||||||
if (limitWords != null && file.getWords() > Integer.parseInt(limitWords)){
|
// if (limitWords != null && file.getWords() > Integer.parseInt(limitWords)){
|
||||||
return AjaxResult.error(ErrorCode.ATTACHMENT_UPLOAD_FAILED.getCode(),
|
// return AjaxResult.error(ErrorCode.ATTACHMENT_UPLOAD_FAILED.getCode(),
|
||||||
ErrorCode.ATTACHMENT_UPLOAD_FAILED.getMessage());
|
// ErrorCode.ATTACHMENT_UPLOAD_FAILED.getMessage());
|
||||||
}
|
// }
|
||||||
}catch (Exception e){
|
// }catch (Exception e){
|
||||||
log.error(e.getMessage());
|
// log.error(e.getMessage());
|
||||||
}
|
// }
|
||||||
if (file != null && file.getId() != 0){
|
// if (file != null && file.getId() != 0){
|
||||||
return AjaxResult.success(file);
|
// return AjaxResult.success(file);
|
||||||
}else {
|
// }else {
|
||||||
return AjaxResult.error(ErrorCode.FAILURE_TO_UPLOAD_FILE.getCode(),
|
// return AjaxResult.error(ErrorCode.FAILURE_TO_UPLOAD_FILE.getCode(),
|
||||||
ErrorCode.FAILURE_TO_UPLOAD_FILE.getMessage());
|
// ErrorCode.FAILURE_TO_UPLOAD_FILE.getMessage());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ApiOperation(value = "模板", httpMethod = "GET")
|
@ApiOperation(value = "模板", httpMethod = "GET")
|
||||||
@GetMapping("download")
|
@GetMapping("download")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue