增加字典模块
This commit is contained in:
parent
bddc8c3e3c
commit
de5ccdf2d9
@ -56,7 +56,6 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
||||
@Override
|
||||
public Page<PageBannerResp> page(PageBannerReq req) {
|
||||
LambdaQueryWrapper<Banner> pageLambdaQueryWrapper = buildPageLambdaQueryWrapper(req);
|
||||
|
||||
Page<Banner> bannerPage = page(new Page<>(req.getPageNumber(), req.getPageSize()), pageLambdaQueryWrapper);
|
||||
if (Objects.isNull(bannerPage) || bannerPage.getTotal() == 0) {
|
||||
return new Page<>();
|
||||
|
||||
33
dictionary/.gitignore
vendored
Normal file
33
dictionary/.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
33
dictionary/dictionary-api/.gitignore
vendored
Normal file
33
dictionary/dictionary-api/.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
42
dictionary/dictionary-api/pom.xml
Normal file
42
dictionary/dictionary-api/pom.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>dictionary-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>dictionary-api</name>
|
||||
|
||||
<properties>
|
||||
<axzo-bom.version>2.0.0-SNAPSHOT</axzo-bom.version>
|
||||
<axzo-dependencies.version>2.0.0-SNAPSHOT</axzo-dependencies.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-consumer-spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>13.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.nanopart.dictionary.api;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.nanopart.dictionary.api.request.QueryByDictTypeReq;
|
||||
import cn.axzo.nanopart.dictionary.api.response.QueryByDictTypeResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 字典相关 api
|
||||
*
|
||||
* @author xudawei
|
||||
* @version 1.0
|
||||
* @date 2024/04/29
|
||||
*/
|
||||
@FeignClient(name = "nanopart", url = "${axzo.service.nanopart:http://nanopart:8080}")
|
||||
public interface DictionaryApi {
|
||||
|
||||
/**
|
||||
* 分页查询banner
|
||||
*/
|
||||
@PostMapping("/api/dictionary/page")
|
||||
ApiPageResult<QueryByDictTypeResp> queryByType(@RequestBody @Valid QueryByDictTypeReq req);
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.axzo.nanopart.dictionary.api.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QueryByDictTypeReq {
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
@NotBlank(message = "dictType is blank")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNumber;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.axzo.nanopart.dictionary.api.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QueryPageDictReq {
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典key
|
||||
*/
|
||||
private String dictKey;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNumber;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.axzo.nanopart.dictionary.api.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QueryByDictTypeResp {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典key
|
||||
*/
|
||||
private String dictKey;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer orderBy;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package cn.axzo.nanopart.dictionary.api.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QueryDictResp {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典key
|
||||
*/
|
||||
private String dictKey;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer orderBy;
|
||||
|
||||
/**
|
||||
* 是否删除:0否,1是
|
||||
*/
|
||||
private String isDelete;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
spring.application.name=dictionary-api
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.dictionary.api;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class DictionaryApiApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
33
dictionary/dictionary-server/.gitignore
vendored
Normal file
33
dictionary/dictionary-server/.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
76
dictionary/dictionary-server/pom.xml
Normal file
76
dictionary/dictionary-server/pom.xml
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>dictionary-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>dictionary-server</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-web-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-consumer-spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-processor-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!--mybatis-plus-->
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-mybatisplus-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- swagger-yapi -->
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-swagger-yapi-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-logger-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.pokonyan</groupId>
|
||||
<artifactId>pokonyan</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>dictionary-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.axzo.nanopart.dictionary.server.controller;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.nanopart.dictionary.api.DictionaryApi;
|
||||
import cn.axzo.nanopart.dictionary.api.request.QueryByDictTypeReq;
|
||||
import cn.axzo.nanopart.dictionary.api.request.QueryPageDictReq;
|
||||
import cn.axzo.nanopart.dictionary.api.response.QueryByDictTypeResp;
|
||||
import cn.axzo.nanopart.dictionary.server.domain.Dictionary;
|
||||
import cn.axzo.nanopart.dictionary.server.service.DictionaryService;
|
||||
import cn.axzo.pokonyan.dao.converter.PageConverter;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 字典
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class DictionaryController implements DictionaryApi {
|
||||
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
@Override
|
||||
public ApiPageResult<QueryByDictTypeResp> queryByType(@RequestBody @Valid QueryByDictTypeReq req) {
|
||||
Page<Dictionary> page = dictionaryService.page(BeanUtil.copyProperties(req, QueryPageDictReq.class));
|
||||
return ApiPageResult.ok(PageConverter.convert(page, record -> BeanUtil.toBean(record, QueryByDictTypeResp.class)));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.axzo.nanopart.dictionary.server.domain;
|
||||
|
||||
import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 应用版本信息
|
||||
*
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "axzo_dictionary", autoResultMap = true)
|
||||
public class Dictionary extends BaseEntity<Dictionary> {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField(value = "dict_type")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典key
|
||||
*/
|
||||
@TableField(value = "dict_key")
|
||||
private String dictKey;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@TableField(value = "dict_value")
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField(value = "order_by")
|
||||
private Integer orderBy;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
private Long updateBy;
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.nanopart.dictionary.server.mapper;
|
||||
|
||||
import cn.axzo.nanopart.dictionary.server.domain.Dictionary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author chenwenjian
|
||||
* @version 1.0
|
||||
* @date 2024/4/5 11:02
|
||||
*/
|
||||
@Mapper
|
||||
public interface DictionaryDao extends BaseMapper<Dictionary> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.nanopart.dictionary.server.service;
|
||||
|
||||
import cn.axzo.nanopart.dictionary.api.request.QueryPageDictReq;
|
||||
import cn.axzo.nanopart.dictionary.server.domain.Dictionary;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
public interface DictionaryService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
Page<Dictionary> page(QueryPageDictReq req);
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package cn.axzo.nanopart.dictionary.server.service.impl;
|
||||
|
||||
import cn.axzo.nanopart.dictionary.api.request.QueryPageDictReq;
|
||||
import cn.axzo.nanopart.dictionary.server.domain.Dictionary;
|
||||
import cn.axzo.nanopart.dictionary.server.mapper.DictionaryDao;
|
||||
import cn.axzo.nanopart.dictionary.server.service.DictionaryService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author xudawei
|
||||
* @date 2024/4/29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DictionaryServiceImpl extends ServiceImpl<DictionaryDao, Dictionary> implements DictionaryService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@Override
|
||||
public Page<Dictionary> page(QueryPageDictReq req) {
|
||||
LambdaQueryWrapper<Dictionary> pageLambdaQueryWrapper = buildPageLambdaQueryWrapper(req);
|
||||
|
||||
Page<Dictionary> dictionaryPage = page(new Page<>(req.getPageNumber(), req.getPageSize()), pageLambdaQueryWrapper);
|
||||
if (Objects.isNull(dictionaryPage) || dictionaryPage.getTotal() == 0) {
|
||||
return new Page<>(req.getPageNumber(), req.getPageSize(), 0);
|
||||
}
|
||||
return dictionaryPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建分页查询条件
|
||||
*/
|
||||
private LambdaQueryWrapper<Dictionary> buildPageLambdaQueryWrapper(QueryPageDictReq req) {
|
||||
LambdaQueryWrapper<Dictionary> lambdaQueryWrapper = new LambdaQueryWrapper<Dictionary>();
|
||||
return lambdaQueryWrapper
|
||||
.like(StringUtils.isNotEmpty(req.getDictType()), Dictionary::getDictType, req.getDictType())
|
||||
.eq(Objects.nonNull(req.getDictKey()), Dictionary::getDictKey, req.getDictKey())
|
||||
.eq(Dictionary::getIsDelete, 0)
|
||||
.orderByDesc(Dictionary::getCreateAt);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
spring.application.name=dictionary-server
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.dictionary.server;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class DictionaryServerApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
62
dictionary/pom.xml
Normal file
62
dictionary/pom.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>nanopart</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<name>dictionary</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>dictionary-api</module>
|
||||
<module>dictionary-server</module>
|
||||
</modules>
|
||||
<properties>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>banner-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
@ -109,6 +109,18 @@
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>dictionary-server</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>dictionary-api</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>op-api</artifactId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user