Commit a482b39a authored by zengtianlai3's avatar zengtianlai3

Merge branch 'm33' into 'master'

整合

See merge request !6
parents 0ab6c99d 695e4141
...@@ -39,6 +39,13 @@ ...@@ -39,6 +39,13 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.16.10</version> <version>1.16.10</version>
</dependency> </dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.8.2</version>
</dependency>
<!--mysql--> <!--mysql-->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
......
...@@ -3,8 +3,10 @@ package iot.sixiang.license; ...@@ -3,8 +3,10 @@ package iot.sixiang.license;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan(basePackages ="iot.sixiang.license")
@SpringBootApplication @SpringBootApplication
@MapperScan(basePackages = "iot.sixiang.license.mapper") @MapperScan(basePackages = "iot.sixiang.license.mapper")
public class LicenseApplication { public class LicenseApplication {
......
...@@ -36,11 +36,11 @@ public class AuthManager { ...@@ -36,11 +36,11 @@ public class AuthManager {
} }
private void initUsers() { private void initUsers() {
List<User> users = userService.getUserList(0, 20); // List<User> users = userService.getUserList(0, 20);
for (User user : users) { // for (User user : users) {
String userId = user.getUserId(); // String userId = user.getUserId();
allUsers.put(userId, user); // allUsers.put(userId, user);
} // }
} }
private void initLicense() { 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