Skip to content

Commit 4d6eb93

Browse files
committed
取掉了不必要的数据库与MyBatis配置
1 parent 7440b67 commit 4d6eb93

File tree

6 files changed

+38
-346
lines changed

6 files changed

+38
-346
lines changed

SpringBootDemo/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@
8383
<dependency>
8484
<groupId>commons-codec</groupId>
8585
<artifactId>commons-codec</artifactId>
86-
<version>1.10</version>
87-
</dependency>
86+
</dependency>
8887

8988
<dependency>
9089
<groupId>com.alibaba</groupId>
Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.xiaour.spring.boot.controller;
22

3-
import java.util.HashMap;
4-
import java.util.Map;
5-
6-
import javax.servlet.http.HttpServletRequest;
73

84
import org.springframework.beans.factory.annotation.Autowired;
95
import org.springframework.web.bind.annotation.PathVariable;
@@ -14,7 +10,7 @@
1410
import com.xiaour.spring.boot.mapper.UserInfoMapper;
1511
import com.xiaour.spring.boot.utils.JsonUtil;
1612
import com.xiaour.spring.boot.utils.RedisUtil;
17-
import com.xiaour.spring.boot.utils.aes.AuthHelper;
13+
1814

1915
/**
2016
* Created by xiaour on 2017/4/19.
@@ -78,59 +74,5 @@ public String get(@PathVariable("id")int id){
7874
return "";
7975
}
8076

81-
/**
82-
* 获取数据库中的用户
83-
* @param id
84-
* @return
85-
*/
86-
@RequestMapping("/getAccessToken")
87-
public String getAccessToken(){
88-
try {
89-
Map<String,Object> data= new HashMap<>();
90-
data.put("access_token", AuthHelper.getAccessToken());
91-
return JsonUtil.getJsonString(data);
92-
} catch (Exception e) {
93-
e.printStackTrace();
94-
}
95-
return "";
96-
}
97-
98-
/**
99-
* 获取数据库中的用户
100-
* @param id
101-
* @return
102-
*/
103-
@RequestMapping("/ding")
104-
public String ding(HttpServletRequest request){
105-
try {
106-
return AuthHelper.getConfig(request);
107-
} catch (Exception e) {
108-
e.printStackTrace();
109-
}
110-
return "";
111-
}
112-
113-
@RequestMapping("/userinfo")
114-
public String userinfo(String code){
115-
try {
116-
String jsonStr=AuthHelper.getUserinfo(code);
117-
System.err.println(jsonStr);
118-
return jsonStr;
119-
} catch (Exception e) {
120-
e.printStackTrace();
121-
}
122-
return "";
123-
}
124-
125-
@RequestMapping("/snsUser")
126-
public String snsUser(String code){
127-
try {
128-
String jsonStr=AuthHelper.snsTokenUser(code);
129-
System.err.println(jsonStr);
130-
return jsonStr;
131-
} catch (Exception e) {
132-
e.printStackTrace();
133-
}
134-
return "";
135-
}
77+
13678
}

SpringBootDemo/src/main/java/com/xiaour/spring/boot/entity/UserInfo.java

Lines changed: 21 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -3,123 +3,34 @@
33
import java.util.Date;
44

55
public class UserInfo {
6-
private Integer oid;
6+
private Integer id;
77

8-
private String userId;
8+
private String name;
99

10-
private String userName;
10+
private String age;
1111

12-
private String password;
12+
public Integer getId() {
13+
return id;
14+
}
1315

14-
private String region;
16+
public void setId(Integer id) {
17+
this.id = id;
18+
}
1519

16-
private Integer userType;
20+
public String getName() {
21+
return name;
22+
}
1723

18-
private Integer status;
24+
public void setName(String name) {
25+
this.name = name;
26+
}
1927

20-
private String cellphoneNo;
28+
public String getAge() {
29+
return age;
30+
}
2131

22-
private String telephoneNo;
32+
public void setAge(String age) {
33+
this.age = age;
34+
}
2335

24-
private Date lastLoginDate;
25-
26-
private String groupId;
27-
28-
private String description;
29-
30-
public Integer getOid() {
31-
return oid;
32-
}
33-
34-
public void setOid(Integer oid) {
35-
this.oid = oid;
36-
}
37-
38-
public String getUserId() {
39-
return userId;
40-
}
41-
42-
public void setUserId(String userId) {
43-
this.userId = userId == null ? null : userId.trim();
44-
}
45-
46-
public String getUserName() {
47-
return userName;
48-
}
49-
50-
public void setUserName(String userName) {
51-
this.userName = userName == null ? null : userName.trim();
52-
}
53-
54-
public String getPassword() {
55-
return password;
56-
}
57-
58-
public void setPassword(String password) {
59-
this.password = password == null ? null : password.trim();
60-
}
61-
62-
public String getRegion() {
63-
return region;
64-
}
65-
66-
public void setRegion(String region) {
67-
this.region = region == null ? null : region.trim();
68-
}
69-
70-
public Integer getUserType() {
71-
return userType;
72-
}
73-
74-
public void setUserType(Integer userType) {
75-
this.userType = userType;
76-
}
77-
78-
public Integer getStatus() {
79-
return status;
80-
}
81-
82-
public void setStatus(Integer status) {
83-
this.status = status;
84-
}
85-
86-
public String getCellphoneNo() {
87-
return cellphoneNo;
88-
}
89-
90-
public void setCellphoneNo(String cellphoneNo) {
91-
this.cellphoneNo = cellphoneNo == null ? null : cellphoneNo.trim();
92-
}
93-
94-
public String getTelephoneNo() {
95-
return telephoneNo;
96-
}
97-
98-
public void setTelephoneNo(String telephoneNo) {
99-
this.telephoneNo = telephoneNo == null ? null : telephoneNo.trim();
100-
}
101-
102-
public Date getLastLoginDate() {
103-
return lastLoginDate;
104-
}
105-
106-
public void setLastLoginDate(Date lastLoginDate) {
107-
this.lastLoginDate = lastLoginDate;
108-
}
109-
110-
public String getGroupId() {
111-
return groupId;
112-
}
113-
114-
public void setGroupId(String groupId) {
115-
this.groupId = groupId == null ? null : groupId.trim();
116-
}
117-
118-
public String getDescription() {
119-
return description;
120-
}
121-
122-
public void setDescription(String description) {
123-
this.description = description == null ? null : description.trim();
124-
}
12536
}

SpringBootDemo/src/main/java/com/xiaour/spring/boot/mapper/UserInfoMapper.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@
33
import com.xiaour.spring.boot.entity.UserInfo;
44

55
public interface UserInfoMapper {
6-
int deleteByPrimaryKey(Integer oid);
76

8-
int insert(UserInfo record);
7+
UserInfo selectByPrimaryKey(Integer id);
98

10-
int insertSelective(UserInfo record);
11-
12-
UserInfo selectByPrimaryKey(Integer oid);
13-
14-
int updateByPrimaryKeySelective(UserInfo record);
15-
16-
int updateByPrimaryKeyWithBLOBs(UserInfo record);
17-
18-
int updateByPrimaryKey(UserInfo record);
199
}

0 commit comments

Comments
 (0)