Skip to content

Commit d91ac50

Browse files
committed
添加了rediestemplate配置
并设置了redis密码 搜索实例功能
1 parent b050afa commit d91ac50

File tree

20 files changed

+282
-41
lines changed

20 files changed

+282
-41
lines changed

.idea/libraries/Maven__com_alibaba_fastjson_1_2_33.xml renamed to .idea/libraries/Maven__com_alibaba_fastjson_1_2_75.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<dependency>
5050
<groupId>com.alibaba</groupId>
5151
<artifactId>fastjson</artifactId>
52-
<version>1.2.33</version>
52+
<version>1.2.75</version>
5353
</dependency>
5454
<!--commons文件-->
5555
<dependency>

springboot-dubbo-api/springboot-dubbo-api.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.12.RELEASE" level="project" />
7171
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-test:5.3.6.RELEASE" level="project" />
7272
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.3.6.RELEASE" level="project" />
73-
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.33" level="project" />
73+
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.75" level="project" />
7474
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
7575
<orderEntry type="library" name="Maven: io.springfox:springfox-boot-starter:3.0.0" level="project" />
7676
<orderEntry type="library" name="Maven: io.springfox:springfox-oas:3.0.0" level="project" />

springboot-dubbo-api/src/main/java/com/lzq/api/dto/AccountResult.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class AccountResult implements Serializable{
5757
*/
5858
@TableField(value = "user_picture")
5959
@JsonProperty("userPicture")
60-
private String userPicture="http://images.lliiooiill.cn/defAvatar.png";
60+
private String userPicture;
6161
/**
6262
* github主键id
6363
*/
@@ -94,6 +94,12 @@ public class AccountResult implements Serializable{
9494
@TableField("follow")
9595
@JsonProperty("follow")
9696
private Integer follow;
97+
@TableField(exist = false)
98+
/**
99+
* 我的关注
100+
*/
101+
@JsonProperty("myFollow")
102+
private Boolean myFollow;
97103
/**
98104
* 创建时间
99105
*/
@@ -104,7 +110,7 @@ public class AccountResult implements Serializable{
104110
* 乐观锁
105111
*/
106112
@JsonIgnore
107-
@Version //乐观锁注解
113+
@Version
108114
private Integer version;
109115
/**
110116
* 更新时间
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
package com.lzq.api.dto;
2+
3+
import com.baomidou.mybatisplus.annotation.IdType;
4+
import com.baomidou.mybatisplus.annotation.TableField;
5+
import com.baomidou.mybatisplus.annotation.TableId;
6+
import com.fasterxml.jackson.annotation.JsonIgnore;
7+
import com.fasterxml.jackson.annotation.JsonProperty;
8+
import lombok.Data;
9+
10+
import java.io.Serializable;
11+
12+
/**
13+
* @author :LZQ
14+
* @description:TODO
15+
* @date :2021/8/30 14:15
16+
*/
17+
@Data
18+
public class ExampleAccount implements Serializable {
19+
20+
private static final long serialVersionUID = 2555481963217920717L;
21+
/**
22+
* 用户名
23+
*/
24+
@TableId(value = "username")
25+
@JsonProperty("username")
26+
private String username;
27+
/**
28+
* 昵称
29+
*/
30+
@TableField(value = "name")
31+
@JsonProperty("name")
32+
private String name;
33+
/**
34+
* 头像
35+
*/
36+
@TableField(value = "user_picture")
37+
@JsonProperty("userPicture")
38+
private String userPicture;
39+
/**
40+
* 描述
41+
*/
42+
@TableField("description")
43+
@JsonProperty("description")
44+
private String description;
45+
/**
46+
* 我的关注
47+
*/
48+
@TableField(exist = false)
49+
@JsonProperty("myFollow")
50+
private Boolean myFollow;
51+
/**
52+
* 主键
53+
*/
54+
@TableId(value = "example_id")
55+
@JsonProperty("exampleId")
56+
private Integer exampleId;
57+
/**
58+
* 实列名称
59+
*/
60+
@TableField(value = "example_name")
61+
@JsonProperty("exampleName")
62+
private String exampleName;
63+
/**
64+
* 标签
65+
*/
66+
@TableField(value = "label")
67+
@JsonProperty("label")
68+
private String label;
69+
/**
70+
* 封面图片
71+
*/
72+
@TableField(value = "img")
73+
@JsonProperty("img")
74+
private String img;
75+
/**
76+
* 喜爱
77+
*/
78+
@TableField(value = "favorites")
79+
@JsonProperty("favorites")
80+
private String favorites;
81+
82+
@TableField(exist = false)
83+
@JsonProperty("myFavorites")
84+
private Boolean myFavorites;
85+
}

springboot-dubbo-api/src/main/java/com/lzq/api/pojo/Example.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class Example implements Serializable {
3939
* 是否公开
4040
*/
4141
@TableField(value = "ispublic")
42-
@JsonProperty("ispublic")
42+
@JsonIgnore
4343
private Integer ispublic;
4444
/**
4545
* 标签

springboot-dubbo-api/src/main/java/com/lzq/api/service/AccountResultService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
*/
1313
public interface AccountResultService {
1414

15-
/**
16-
* 查询用户
17-
* @param result
18-
* @return
19-
*/
20-
public List<AccountResult> searchUserByName(AccountResult result);
21-
2215
/**
2316
* 获取关注列表
2417
*/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.lzq.api.service;
2+
3+
import com.lzq.api.dto.ExampleAccount;
4+
5+
import java.util.List;
6+
7+
/**
8+
* @author :LZQ
9+
* @description:实例用户信息
10+
* @date :2021/8/30 14:21
11+
*/
12+
public interface ExampleAccountService {
13+
14+
public List<ExampleAccount> queryByExampleName(String exampleName);
15+
}

springboot-dubbo-service/springboot-dubbo-service.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.3.6.RELEASE" level="project" />
128128
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.security:spring-security-test:5.3.6.RELEASE" level="project" />
129129
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.3.6.RELEASE" level="project" />
130-
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.33" level="project" />
130+
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.75" level="project" />
131131
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
132132
<orderEntry type="library" name="Maven: io.springfox:springfox-boot-starter:3.0.0" level="project" />
133133
<orderEntry type="library" name="Maven: io.springfox:springfox-oas:3.0.0" level="project" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.lzq.dubboservice.mapper;
2+
3+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4+
import com.lzq.api.dto.ExampleAccount;
5+
import org.springframework.stereotype.Repository;
6+
7+
import java.util.List;
8+
9+
/**
10+
* @author :LZQ
11+
* @description:实例用户信息
12+
* @date :2021/8/30 14:21
13+
*/
14+
@Repository
15+
public interface ExampleAccountMapper extends BaseMapper<ExampleAccount> {
16+
public List<ExampleAccount> queryByExampleName(String exampleName);
17+
}

0 commit comments

Comments
 (0)