Changes
This commit is contained in:
parent
8c936791c3
commit
78f8d06727
@ -7,7 +7,7 @@
|
|||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
<module name="forum" />
|
<module name="forum-backend" />
|
||||||
<module name="doubao_community_backend-master" />
|
<module name="doubao_community_backend-master" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||||
<module name="doubao" options="-parameters" />
|
<module name="doubao" options="-parameters" />
|
||||||
<module name="doubao_community_backend-master" options="-parameters" />
|
<module name="doubao_community_backend-master" options="-parameters" />
|
||||||
<module name="forum" options="-parameters" />
|
<module name="forum-backend" options="-parameters" />
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -14,7 +14,7 @@
|
|||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="9" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
<option name="id" value="jpab" />
|
<option name="id" value="jpab" />
|
||||||
</component>
|
</component>
|
||||||
|
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
|||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.yovinchen</groupId>
|
<groupId>com.yovinchen</groupId>
|
||||||
<artifactId>forum</artifactId>
|
<artifactId>forum-backend</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>doubao</name>
|
<name>doubao</name>
|
||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
package com.yovinchen.forum.config;
|
package com.yovinchen.forum.config;
|
||||||
|
|
||||||
/**
|
|
||||||
* ClassName: config
|
|
||||||
* Package: com.yovinchen.forum.config
|
|
||||||
*
|
|
||||||
* @author yovinchen
|
|
||||||
* @Create 2023/6/14 16:51
|
|
||||||
*/
|
|
||||||
|
|
||||||
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@ -20,6 +13,13 @@ import springfox.documentation.spi.DocumentationType;
|
|||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: config
|
||||||
|
* Package: com.yovinchen.forum.config
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/14 16:51
|
||||||
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
@EnableKnife4j
|
@EnableKnife4j
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
package com.yovinchen.forum.controller;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClassName: GiteeLogin
|
|
||||||
* Package: com.yovinchen.forum.controller
|
|
||||||
* /oauth/callback
|
|
||||||
* @author yovinchen
|
|
||||||
* @Create 2023/6/14 20:11
|
|
||||||
*/
|
|
||||||
public class GiteeLogin {
|
|
||||||
}
|
|
@ -22,6 +22,7 @@ import javax.annotation.Resource;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Api(tags = "用户管理接口")
|
@Api(tags = "用户管理接口")
|
||||||
@RestController
|
@RestController
|
||||||
@ -75,7 +76,13 @@ public class UmsUserController extends BaseController {
|
|||||||
Map<String, Object> map = new HashMap<>(16);
|
Map<String, Object> map = new HashMap<>(16);
|
||||||
UmsUser user = iUmsUserService.getUserByUsername(username);
|
UmsUser user = iUmsUserService.getUserByUsername(username);
|
||||||
Assert.notNull(user, "用户不存在");
|
Assert.notNull(user, "用户不存在");
|
||||||
Page<BmsPost> page = iBmsPostService.page(new Page<>(pageNo, size), new LambdaQueryWrapper<BmsPost>().eq(BmsPost::getUserId, user.getId()));
|
Page<BmsPost> page;
|
||||||
|
if (Objects.equals(user.getUsername(), "admin")) {
|
||||||
|
page = iBmsPostService.page(new Page<>(pageNo, size), null);
|
||||||
|
} else {
|
||||||
|
page = iBmsPostService.page(new Page<>(pageNo, size), new LambdaQueryWrapper<BmsPost>().eq(BmsPost::getUserId, user.getId()));
|
||||||
|
|
||||||
|
}
|
||||||
map.put("user", user);
|
map.put("user", user);
|
||||||
map.put("topics", page);
|
map.put("topics", page);
|
||||||
return ApiResult.success(map);
|
return ApiResult.success(map);
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user