Compare commits
No commits in common. "e8274b1bebd7416645b9dd4a6c251056d53f1f0e" and "86fcd7a255c73f1e99e30d7263acd1de92f204ca" have entirely different histories.
e8274b1beb
...
86fcd7a255
@ -12,7 +12,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class WebCorsConfig implements WebMvcConfigurer {
|
public class WebCorsConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
// TODO 不放行全部,通过配置文件配置允许访问的域名
|
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
package xyz.zhouxy.plusone;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import xyz.zhouxy.plusone.system.application.query.AccountQueries;
|
|
||||||
import xyz.zhouxy.plusone.system.application.query.params.AccountQueryParams;
|
|
||||||
import xyz.zhouxy.plusone.system.application.query.result.AccountOverview;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@SpringBootTest(classes = PlusoneApplication.class)
|
|
||||||
class AccountQueriesTests {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
AccountQueries accountQueries;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testQueryPage() {
|
|
||||||
AccountQueryParams queryParams = new AccountQueryParams();
|
|
||||||
// queryParams.setOrderBy(List.of("email", "mobile_phone", "id"));
|
|
||||||
queryParams.setSize(20);
|
|
||||||
queryParams.setPageNum(1L);
|
|
||||||
queryParams.setOrderBy(Collections.emptyList());
|
|
||||||
List<AccountOverview> l = accountQueries.queryAccountOverview(queryParams);
|
|
||||||
log.info("l: {}", l);
|
|
||||||
}
|
|
||||||
}
|
|
@ -87,13 +87,10 @@
|
|||||||
AND sar.role_id = #{roleId}
|
AND sar.role_id = #{roleId}
|
||||||
AND sr.deleted = 0
|
AND sr.deleted = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="orderBy != null and !orderBy.isEmpty()">
|
<if test="orderBy != null">
|
||||||
ORDER BY
|
ORDER BY sa.${orderBy}, sa.id
|
||||||
<foreach item="col" index="index" collection="orderBy" open="" separator="," close="">
|
|
||||||
sa.${col}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
<if test="orderBy == null or orderBy.isEmpty()">
|
<if test="orderBy == null">
|
||||||
ORDER BY sa.id
|
ORDER BY sa.id
|
||||||
</if>
|
</if>
|
||||||
LIMIT #{size} OFFSET #{offset}
|
LIMIT #{size} OFFSET #{offset}
|
||||||
@ -102,7 +99,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
long count(AccountQueryParams queryParams);
|
long count(SysAccountQuery queryParams);
|
||||||
-->
|
-->
|
||||||
<select id="count" resultType="long">
|
<select id="count" resultType="long">
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
|
2
pom.xml
2
pom.xml
@ -25,7 +25,7 @@
|
|||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
|
||||||
<spring-boot.version>2.7.18</spring-boot.version>
|
<spring-boot.version>2.7.16</spring-boot.version>
|
||||||
<sa-token.version>1.34.0</sa-token.version>
|
<sa-token.version>1.34.0</sa-token.version>
|
||||||
<hutool.version>5.8.20</hutool.version>
|
<hutool.version>5.8.20</hutool.version>
|
||||||
<mybatis-starter.version>3.0.1</mybatis-starter.version>
|
<mybatis-starter.version>3.0.1</mybatis-starter.version>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user