Commit 695e4141 authored by zengtianlai3's avatar zengtianlai3

整合

parent 0ab6c99d
......@@ -39,6 +39,13 @@
<artifactId>lombok</artifactId>
<version>1.16.10</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.8.2</version>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
......
......@@ -3,8 +3,10 @@ package iot.sixiang.license;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan(basePackages ="iot.sixiang.license")
@SpringBootApplication
@MapperScan(basePackages = "iot.sixiang.license.mapper")
public class LicenseApplication {
......
......@@ -36,11 +36,11 @@ public class AuthManager {
}
private void initUsers() {
List<User> users = userService.getUserList(0, 20);
for (User user : users) {
String userId = user.getUserId();
allUsers.put(userId, user);
}
// List<User> users = userService.getUserList(0, 20);
// for (User user : users) {
// String userId = user.getUserId();
// allUsers.put(userId, user);
// }
}
private void initLicense() {
......
package iot.sixiang.license.model;
import lombok.Data;
/**
* Title: ResResult
* Description: TODO
*
* @author m33
* @version V1.0
* @date 2022-06-08
*/
@Data
public class ResResult {
private int code;
private String msg;
private Object record;
public static ResResult success() {
ResResult respResult = new ResResult();
respResult.setCode(200);
respResult.setMsg("success");
return respResult;
}
public static ResResult fail() {
ResResult respResult = new ResResult();
respResult.setCode(400);
respResult.setMsg("fail");
return respResult;
}
public ResResult msg(String message) {
this.msg = message;
return this;
}
public ResResult record(Object data){
this.record = data;
return this;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment