Merge branch 'feature/REQ-1855' into 'master'
Feature/req 1855 官网 See merge request universal/infrastructure/backend/nanopart!6
This commit is contained in:
commit
1431c49da0
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ target/
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
.DS_Store
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
|
||||
39
config/.gitignore
vendored
Normal file
39
config/.gitignore
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
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/
|
||||
|
||||
application-local.yml
|
||||
*.log
|
||||
|
||||
rebel.xml
|
||||
.flattened-pom.xml
|
||||
1
config/README.md
Normal file
1
config/README.md
Normal file
@ -0,0 +1 @@
|
||||
# 项目介绍
|
||||
2
config/RELEASE.md
Normal file
2
config/RELEASE.md
Normal file
@ -0,0 +1,2 @@
|
||||
# 发布记录
|
||||
|
||||
21
config/config-api/pom.xml
Normal file
21
config/config-api/pom.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>config-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>config-api</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-consumer-spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.axzo.nanopart.api;
|
||||
|
||||
import cn.axzo.framework.web.http.ApiResponse;
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import cn.axzo.nanopart.api.request.CreateConfigReq;
|
||||
import cn.axzo.nanopart.api.response.ConfigResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@FeignClient(name = "nanopart", url = "http://nanopart:8080")
|
||||
public interface ConfigApi {
|
||||
|
||||
/**
|
||||
* 创建或者更新配置
|
||||
*
|
||||
* @param req 创建参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@PostMapping("/api/v1/configs")
|
||||
ApiResult<String> createOrUpdateConfig(@Validated @RequestBody CreateConfigReq req);
|
||||
|
||||
/**
|
||||
* 通过 bizCode 和 bizType 获取配置
|
||||
*
|
||||
* @param bizCode 业务码
|
||||
* @param bizType 业务类型
|
||||
* @return 配置
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@GetMapping("/api/v1/configs")
|
||||
ApiResult<ConfigResp> getConfigByBizCode(@RequestParam String bizCode, @RequestParam BizTypeEnum bizType);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.nanopart.api.annotation;
|
||||
|
||||
import cn.axzo.nanopart.api.validator.JsonStringValidator;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD, ElementType.PARAMETER})
|
||||
@Constraint(validatedBy = JsonStringValidator.class)
|
||||
public @interface JsonString {
|
||||
String message() default "无效的 JSON 字符串";
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.axzo.nanopart.api.config;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.NanopartConstant;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@EnableFeignClients(NanopartConstant.BASIC_FEIGN_PACKAGE)
|
||||
public class NanopartApiAutoConfiguration {
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.api.constant;
|
||||
|
||||
/**
|
||||
* @author: chenwenjian
|
||||
* @date: 2023/8/14 9:38
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class NanopartConstant {
|
||||
|
||||
public static final String BASIC_FEIGN_PACKAGE = "cn.axzo.nanopart.api";
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.nanopart.api.constant.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BizTypeEnum {
|
||||
/**
|
||||
* 前端
|
||||
*/
|
||||
|
||||
FRONT(0, "前端");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package cn.axzo.nanopart.api.dto;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class ConfigDto {
|
||||
private String bizCode;
|
||||
private BizTypeEnum bizType;
|
||||
private Map<String, Object> content;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.nanopart.api.dto;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class CreateConfigDto {
|
||||
private BizTypeEnum bizType;
|
||||
private String bizCode;
|
||||
private Map<String, Object> content;
|
||||
private Long createBy;
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.axzo.nanopart.api.request;
|
||||
|
||||
import cn.axzo.nanopart.api.annotation.JsonString;
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class CreateConfigReq {
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
@NotNull(message = "业务类型不能为空")
|
||||
private BizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 业务码
|
||||
*/
|
||||
@NotBlank(message = "业务码不能为空")
|
||||
@Length(max = 20, message = "业务码长度不能超过20")
|
||||
private String bizCode;
|
||||
|
||||
/**
|
||||
* 配置内容
|
||||
*/
|
||||
@NotNull(message = "配置内容不能为空")
|
||||
private Map<String, Object> content;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@NotNull(message = "创建人不能为空")
|
||||
private Long createBy;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.nanopart.api.response;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class ConfigResp {
|
||||
/**
|
||||
* 业务码
|
||||
*/
|
||||
private String bizCode;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private BizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 配置内容
|
||||
*/
|
||||
private Map<String, Object> content;
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.axzo.nanopart.api.validator;
|
||||
|
||||
import cn.axzo.framework.core.util.StringUtil;
|
||||
import cn.axzo.nanopart.api.annotation.JsonString;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
|
||||
public class JsonStringValidator implements ConstraintValidator<JsonString, String> {
|
||||
@Override
|
||||
public boolean isValid(String value, ConstraintValidatorContext context) {
|
||||
if (StringUtil.isEmpty(value)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return JSONUtil.isTypeJSON(value);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.axzo.nanopart.api.config.NanopartApiAutoConfiguration
|
||||
70
config/config-server/pom.xml
Normal file
70
config/config-server/pom.xml
Normal file
@ -0,0 +1,70 @@
|
||||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>config-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>config-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.basics</groupId>
|
||||
<artifactId>basics-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-logger-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.axzo.nanopart.server.controller;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.nanopart.api.ConfigApi;
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import cn.axzo.nanopart.api.dto.ConfigDto;
|
||||
import cn.axzo.nanopart.api.dto.CreateConfigDto;
|
||||
import cn.axzo.nanopart.api.request.CreateConfigReq;
|
||||
import cn.axzo.nanopart.api.response.ConfigResp;
|
||||
import cn.axzo.nanopart.server.service.ConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19 10:00
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigController implements ConfigApi {
|
||||
private final ConfigService configService;
|
||||
|
||||
/**
|
||||
* 创建或者更新配置
|
||||
*/
|
||||
@Override
|
||||
public ApiResult<String> createOrUpdateConfig(CreateConfigReq req) {
|
||||
configService.createOrUpdateConfig(BeanMapper.copyBean(req, CreateConfigDto::new));
|
||||
return ApiResult.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<ConfigResp> getConfigByBizCode(String bizCode, BizTypeEnum bizType) {
|
||||
ConfigDto configDto = configService.getConfigByBizCode(bizCode, bizType);
|
||||
return ApiResult.ok(BeanMapper.copyBean(configDto, ConfigResp::new));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package cn.axzo.nanopart.server.dao.entity;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "nanopart_config", autoResultMap = true)
|
||||
public class Config {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private BizTypeEnum bizType;
|
||||
private String bizCode;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private Map<String, Object> content;
|
||||
|
||||
private Boolean isDelete;
|
||||
private Date createAt;
|
||||
private Date updateAt;
|
||||
|
||||
private Long createBy;
|
||||
private Long updateBy;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.server.dao.mapper;
|
||||
|
||||
import cn.axzo.nanopart.server.dao.entity.Config;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConfigMapper extends BaseMapper<Config> {
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package cn.axzo.nanopart.server.service;
|
||||
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import cn.axzo.nanopart.api.dto.ConfigDto;
|
||||
import cn.axzo.nanopart.api.dto.CreateConfigDto;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
public interface ConfigService {
|
||||
/**
|
||||
* 创建或者更新配置
|
||||
*
|
||||
* @param dto 创建参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
void createOrUpdateConfig(CreateConfigDto dto);
|
||||
|
||||
|
||||
/**
|
||||
* 通过 bizCode 获取配置
|
||||
*
|
||||
* @param bizCode 业务码
|
||||
* @param bizType 业务类型
|
||||
* @return 配置
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
ConfigDto getConfigByBizCode(String bizCode, BizTypeEnum bizType);
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package cn.axzo.nanopart.server.service.impl;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.basics.common.exception.ServiceException;
|
||||
import cn.axzo.nanopart.api.constant.enums.BizTypeEnum;
|
||||
import cn.axzo.nanopart.api.dto.ConfigDto;
|
||||
import cn.axzo.nanopart.api.dto.CreateConfigDto;
|
||||
import cn.axzo.nanopart.server.dao.entity.Config;
|
||||
import cn.axzo.nanopart.server.dao.mapper.ConfigMapper;
|
||||
import cn.axzo.nanopart.server.service.ConfigService;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements ConfigService {
|
||||
private final ConfigMapper configMapper;
|
||||
|
||||
@Override
|
||||
public void createOrUpdateConfig(CreateConfigDto dto) {
|
||||
Config config = configMapper.selectOne(
|
||||
Wrappers.<Config>lambdaQuery()
|
||||
.eq(Config::getBizCode, dto.getBizCode())
|
||||
.eq(Config::getBizType, dto.getBizType())
|
||||
);
|
||||
|
||||
if (config == null) {
|
||||
config = BeanMapper.copyBean(dto, Config::new);
|
||||
config.setCreateAt(new Date());
|
||||
config.setUpdateAt(new Date());
|
||||
} else {
|
||||
config.setBizCode(dto.getBizCode());
|
||||
config.setBizType(dto.getBizType());
|
||||
config.setContent(dto.getContent());
|
||||
config.setUpdateBy(dto.getCreateBy());
|
||||
config.setIsDelete(false);
|
||||
config.setUpdateAt(new Date());
|
||||
}
|
||||
|
||||
saveOrUpdate(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigDto getConfigByBizCode(String bizCode, BizTypeEnum bizType) {
|
||||
Config config = configMapper.selectOne(
|
||||
Wrappers.<Config>lambdaQuery()
|
||||
.eq(Config::getBizCode, bizCode)
|
||||
.eq(Config::getBizType, bizType)
|
||||
.eq(Config::getIsDelete, false)
|
||||
);
|
||||
if (config == null) {
|
||||
throw new ServiceException("未找到该配置");
|
||||
}
|
||||
|
||||
return BeanMapper.copyBean(config, ConfigDto::new);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package cn.axzo.maven.archetype.server;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class AppTest {
|
||||
|
||||
}
|
||||
101
config/pom.xml
Normal file
101
config/pom.xml
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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 http://maven.apache.org/maven-v4_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>
|
||||
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>config</name>
|
||||
|
||||
<properties>
|
||||
<axzo-bom.version>2.0.0-SNAPSHOT</axzo-bom.version>
|
||||
<axzo-dependencies.version>2.0.0-SNAPSHOT</axzo-dependencies.version>
|
||||
<lombok.version>1.18.22</lombok.version>
|
||||
<mapstruct.version>1.4.2.Final</mapstruct.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- 导入axzo通用api依赖 -->
|
||||
<dependency>
|
||||
<groupId>cn.axzo.infra</groupId>
|
||||
<artifactId>axzo-bom</artifactId>
|
||||
<version>${axzo-bom.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.infra</groupId>
|
||||
<artifactId>axzo-dependencies</artifactId>
|
||||
<version>${axzo-dependencies.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- for test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<modules>
|
||||
<module>config-server</module>
|
||||
<module>config-api</module>
|
||||
</modules>
|
||||
</project>
|
||||
39
job/.gitignore
vendored
Normal file
39
job/.gitignore
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
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/
|
||||
|
||||
application-local.yml
|
||||
*.log
|
||||
|
||||
rebel.xml
|
||||
.flattened-pom.xml
|
||||
1
job/README.md
Normal file
1
job/README.md
Normal file
@ -0,0 +1 @@
|
||||
# 项目介绍
|
||||
2
job/RELEASE.md
Normal file
2
job/RELEASE.md
Normal file
@ -0,0 +1,2 @@
|
||||
# 发布记录
|
||||
|
||||
33
job/job-api/pom.xml
Normal file
33
job/job-api/pom.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<artifactId>job</artifactId>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>job-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>job-api</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-common-domain</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.basics</groupId>
|
||||
<artifactId>basics-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
64
job/job-api/src/main/java/cn/axzo/nanopart/api/JobApi.java
Normal file
64
job/job-api/src/main/java/cn/axzo/nanopart/api/JobApi.java
Normal file
@ -0,0 +1,64 @@
|
||||
package cn.axzo.nanopart.api;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.nanopart.api.request.CreateJobReq;
|
||||
import cn.axzo.nanopart.api.request.ListJobsReq;
|
||||
import cn.axzo.nanopart.api.request.UpdateJobReq;
|
||||
import cn.axzo.nanopart.api.response.JobDetailResp;
|
||||
import cn.axzo.nanopart.api.response.JobResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@FeignClient(name = "nanopart", url = "http://nanopart:8080")
|
||||
public interface JobApi {
|
||||
|
||||
/**
|
||||
* 获取职位列表
|
||||
*
|
||||
* @param req 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@GetMapping("/api/v1/jobs")
|
||||
ApiPageResult<JobResp> listJobs(@Valid @ModelAttribute @SpringQueryMap ListJobsReq req);
|
||||
|
||||
/**
|
||||
* 通过职位id查询
|
||||
*
|
||||
* @param id 职位id
|
||||
* @return 任务详情
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@GetMapping("/api/v1/jobs/{id}")
|
||||
ApiResult<JobDetailResp> getJobById(@PathVariable("id") Long id);
|
||||
|
||||
/**
|
||||
* 创建 job
|
||||
*
|
||||
* @param req 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@PostMapping("/api/v1/jobs")
|
||||
ApiResult<Void> createJob(@Validated @RequestBody CreateJobReq req);
|
||||
|
||||
/**
|
||||
* 更新 job
|
||||
*
|
||||
* @param req 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
@PostMapping("/api/v1/jobs/{id}")
|
||||
ApiResult<Void> updateJobById(@PathVariable("id") Long id, @Validated @RequestBody UpdateJobReq req);
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.axzo.nanopart.api.config;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.NanopartConstant;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@EnableFeignClients(NanopartConstant.BASIC_FEIGN_PACKAGE)
|
||||
public class NanopartApiAutoConfiguration {
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.api.constant;
|
||||
|
||||
/**
|
||||
* @author: chenwenjian
|
||||
* @date: 2023/8/14 9:38
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class NanopartConstant {
|
||||
|
||||
public static final String BASIC_FEIGN_PACKAGE = "cn.axzo.nanopart.api";
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.axzo.nanopart.api.constant.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum JobStatusEnum {
|
||||
/**
|
||||
* 已发布
|
||||
*/
|
||||
ENABLED(0, "已发布"),
|
||||
|
||||
/**
|
||||
* 已下线
|
||||
*/
|
||||
DISABLED(1, "已下线");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.axzo.nanopart.api.constant.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum JobTypeEnum {
|
||||
/**
|
||||
* 社招
|
||||
*/
|
||||
SOCIAL(0, "社招"),
|
||||
|
||||
/**
|
||||
* 校招
|
||||
*/
|
||||
SCHOOL(1, "校园招聘");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package cn.axzo.nanopart.api.request;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class CreateJobReq {
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
@NotBlank(message = "岗位名称不能为空")
|
||||
@Length(max = 30, message = "岗位名称不能超过30个字符")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
@NotNull(message = "岗位类型不能为空")
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
@NotBlank(message = "岗位描述不能为空")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
@NotBlank(message = "岗位要求不能为空")
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@NotNull(message = "创建人不能为空")
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@NotBlank(message = "创建人姓名不能为空")
|
||||
@Length(max = 30, message = "不能超过30个字符")
|
||||
private String createByName;
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package cn.axzo.nanopart.api.request;
|
||||
|
||||
import cn.axzo.core.domain.PageRequest;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ListJobsReq extends PageRequest {
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.axzo.nanopart.api.request;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class UpdateJobReq {
|
||||
@NotBlank(message = "更新人不能为空")
|
||||
@Length(max = 30, message = "不能超过30个字符")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
@Length(max = 30, message = "岗位名称不能超过30个字符")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.axzo.nanopart.api.response;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class JobDetailResp {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package cn.axzo.nanopart.api.response;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class JobResp {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
/**
|
||||
* 更新人员
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateAt;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private Date createAt;
|
||||
|
||||
}
|
||||
2
job/job-api/src/main/resources/META-INF/spring.factories
Normal file
2
job/job-api/src/main/resources/META-INF/spring.factories
Normal file
@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.axzo.nanopart.api.config.NanopartApiAutoConfiguration
|
||||
69
job/job-server/pom.xml
Normal file
69
job/job-server/pom.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>job</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>job-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>job-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.basics</groupId>
|
||||
<artifactId>basics-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.framework</groupId>
|
||||
<artifactId>axzo-logger-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>job-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.axzo.nanopart.server.controller;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.nanopart.api.JobApi;
|
||||
import cn.axzo.nanopart.api.request.CreateJobReq;
|
||||
import cn.axzo.nanopart.api.request.ListJobsReq;
|
||||
import cn.axzo.nanopart.api.request.UpdateJobReq;
|
||||
import cn.axzo.nanopart.api.response.JobDetailResp;
|
||||
import cn.axzo.nanopart.api.response.JobResp;
|
||||
import cn.axzo.nanopart.server.dto.CreateJobDto;
|
||||
import cn.axzo.nanopart.server.dto.ListJobsDto;
|
||||
import cn.axzo.nanopart.server.dto.UpdateJobDto;
|
||||
import cn.axzo.nanopart.server.service.JobService;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19 10:00
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class JobController implements JobApi {
|
||||
private final JobService jobService;
|
||||
|
||||
@Override
|
||||
public ApiPageResult<JobResp> listJobs(ListJobsReq req) {
|
||||
Page<JobResp> pageResult = jobService.listJobs(BeanMapper.copyBean(req, ListJobsDto::new));
|
||||
return ApiPageResult.ok(pageResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<JobDetailResp> getJobById(Long id) {
|
||||
return ApiResult.ok(jobService.getJobById(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<Void> createJob(CreateJobReq req) {
|
||||
CreateJobDto dto = BeanMapper.copyBean(req, CreateJobDto::new);
|
||||
jobService.createJob(dto);
|
||||
return ApiResult.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResult<Void> updateJobById(Long id, UpdateJobReq req) {
|
||||
UpdateJobDto dto = BeanMapper.copyBean(req, UpdateJobDto::new);
|
||||
dto.setId(id);
|
||||
jobService.updateJobById(dto);
|
||||
return ApiResult.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.axzo.nanopart.server.controller;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.nanopart.api.response.JobDetailResp;
|
||||
import cn.axzo.nanopart.api.response.JobResp;
|
||||
import cn.axzo.nanopart.server.dto.ListJobsDto;
|
||||
import cn.axzo.nanopart.server.service.JobService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/webApi/jobs")
|
||||
@RequiredArgsConstructor
|
||||
public class JobExternalController {
|
||||
private final JobService jobService;
|
||||
|
||||
/**
|
||||
* 官网获取职位列表
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public ApiResult<List<JobResp>> listJobsForUser() {
|
||||
return ApiResult.ok(jobService.listAllJobs());
|
||||
}
|
||||
|
||||
/**
|
||||
* 官网获取职位详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public ApiResult<JobDetailResp> getJobById(@RequestParam("id") Long id) {
|
||||
return ApiResult.ok(jobService.getJobByIdForUser(id));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package cn.axzo.nanopart.server.dao.entity;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "nanopart_job", autoResultMap = true)
|
||||
public class Job {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean isDelete;
|
||||
|
||||
/**
|
||||
* 更新人员
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新人员名字
|
||||
*/
|
||||
private String createByName;
|
||||
|
||||
/**
|
||||
* 更新人员
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateAt;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createAt;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.nanopart.server.dao.mapper;
|
||||
|
||||
import cn.axzo.nanopart.server.dao.entity.Job;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Mapper
|
||||
public interface JobMapper extends BaseMapper<Job> {
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.axzo.nanopart.server.dto;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class CreateJobDto {
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
private String createByName;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package cn.axzo.nanopart.server.dto;
|
||||
|
||||
import cn.axzo.core.domain.PageRequest;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ListJobsDto extends PageRequest {
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.axzo.nanopart.server.dto;
|
||||
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobTypeEnum;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Data
|
||||
public class UpdateJobDto {
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 职位类型
|
||||
*/
|
||||
private JobTypeEnum jobType;
|
||||
|
||||
/**
|
||||
* 职位描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 岗位要求
|
||||
*/
|
||||
private String requirement;
|
||||
|
||||
/**
|
||||
* 职位状态
|
||||
*/
|
||||
private JobStatusEnum jobStatus;
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.axzo.nanopart.server.service;
|
||||
|
||||
|
||||
import cn.axzo.nanopart.api.response.JobDetailResp;
|
||||
import cn.axzo.nanopart.api.response.JobResp;
|
||||
import cn.axzo.nanopart.server.dto.CreateJobDto;
|
||||
import cn.axzo.nanopart.server.dto.ListJobsDto;
|
||||
import cn.axzo.nanopart.server.dto.UpdateJobDto;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
public interface JobService {
|
||||
/**
|
||||
* 获取所有job
|
||||
*
|
||||
* @param dto 参数
|
||||
* @return 所有job
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
List<JobResp> listAllJobs();
|
||||
|
||||
/**
|
||||
* 获取职位列表
|
||||
*
|
||||
* @param dto 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
Page<JobResp> listJobs(ListJobsDto dto);
|
||||
|
||||
/**
|
||||
* 通过职位id查询
|
||||
*
|
||||
* @param id 职位id
|
||||
* @return 任务详情
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
JobDetailResp getJobByIdForUser(Long id);
|
||||
|
||||
/**
|
||||
* 通过职位id查询
|
||||
*
|
||||
* @param id 职位id
|
||||
* @return 任务详情
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
JobDetailResp getJobById(Long id);
|
||||
|
||||
/**
|
||||
* 创建 job
|
||||
*
|
||||
* @param dto 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
void createJob(CreateJobDto dto);
|
||||
|
||||
/**
|
||||
* 更新 job
|
||||
*
|
||||
* @param dto 请求参数
|
||||
* @author wangsiqian
|
||||
* @since 2024-02-19
|
||||
*/
|
||||
void updateJobById(UpdateJobDto dto);
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
package cn.axzo.nanopart.server.service.impl;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.basics.common.exception.ServiceException;
|
||||
import cn.axzo.nanopart.api.constant.enums.JobStatusEnum;
|
||||
import cn.axzo.nanopart.api.response.JobDetailResp;
|
||||
import cn.axzo.nanopart.api.response.JobResp;
|
||||
import cn.axzo.nanopart.server.dao.entity.Job;
|
||||
import cn.axzo.nanopart.server.dao.mapper.JobMapper;
|
||||
import cn.axzo.nanopart.server.dto.CreateJobDto;
|
||||
import cn.axzo.nanopart.server.dto.ListJobsDto;
|
||||
import cn.axzo.nanopart.server.dto.UpdateJobDto;
|
||||
import cn.axzo.nanopart.server.service.JobService;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangsiqian
|
||||
* @since 2024/02/19
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class JobServiceImpl implements JobService {
|
||||
private final JobMapper jobMapper;
|
||||
|
||||
@Override
|
||||
public List<JobResp> listAllJobs() {
|
||||
List<Job> jobs = jobMapper.selectList(Wrappers.<Job>lambdaQuery()
|
||||
.eq(Job::getJobStatus, JobStatusEnum.ENABLED)
|
||||
.eq(Job::getIsDelete, false)
|
||||
.orderByDesc(Job::getUpdateAt));
|
||||
return BeanMapper.copyList(jobs, JobResp::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<JobResp> listJobs(ListJobsDto dto) {
|
||||
Page<Job> page = new Page<>(dto.getPage(), dto.getPageSize());
|
||||
LambdaQueryWrapper<Job> wrapper =
|
||||
Wrappers.<Job>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(dto.getTitle()), Job::getTitle, dto.getTitle())
|
||||
.eq(Job::getIsDelete, false)
|
||||
.eq(dto.getJobType() != null, Job::getJobType, dto.getJobType())
|
||||
.eq(dto.getJobStatus() != null, Job::getJobStatus, dto.getJobStatus())
|
||||
.orderByDesc(Job::getUpdateAt);
|
||||
|
||||
Page<Job> jobPage = jobMapper.selectPage(page, wrapper);
|
||||
|
||||
Page<JobResp> result = BeanMapper.copyBean(jobPage, Page::new);
|
||||
result.setRecords(BeanMapper.copyList(jobPage.getRecords(), JobResp::new));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobDetailResp getJobByIdForUser(Long id) {
|
||||
Job job = jobMapper.selectOne(Wrappers.<Job>lambdaQuery()
|
||||
.eq(Job::getId, id)
|
||||
.eq(Job::getIsDelete, false)
|
||||
.eq(Job::getJobStatus, JobStatusEnum.ENABLED)
|
||||
);
|
||||
if (job == null) {
|
||||
throw new ServiceException("未找到该职位或已被删除");
|
||||
}
|
||||
|
||||
return BeanMapper.copyBean(job, JobDetailResp::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobDetailResp getJobById(Long id) {
|
||||
Job job = jobMapper.selectById(id);
|
||||
if (job == null || BooleanUtil.isTrue(job.getIsDelete())) {
|
||||
throw new ServiceException("未找到该职位或已被删除");
|
||||
}
|
||||
|
||||
return BeanMapper.copyBean(job, JobDetailResp::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createJob(CreateJobDto dto) {
|
||||
Job job = BeanMapper.copyBean(dto, Job::new);
|
||||
job.setUpdateBy(dto.getCreateByName());
|
||||
job.setUpdateAt(new Date());
|
||||
job.setCreateAt(new Date());
|
||||
|
||||
jobMapper.insert(job);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateJobById(UpdateJobDto dto) {
|
||||
if (dto.getJobType() == null
|
||||
&& dto.getJobStatus() == null
|
||||
&& StrUtil.isBlank(dto.getDescription())
|
||||
&& StrUtil.isBlank(dto.getRequirement())
|
||||
&& StrUtil.isBlank(dto.getTitle())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Job job = jobMapper.selectById(dto.getId());
|
||||
if (job == null || BooleanUtil.isTrue(job.getIsDelete())) {
|
||||
throw new ServiceException("未找到该职位或已被删除");
|
||||
}
|
||||
|
||||
LambdaUpdateWrapper<Job> wrapper =
|
||||
Wrappers.<Job>lambdaUpdate()
|
||||
.eq(Job::getId, job.getId())
|
||||
.set(Job::getUpdateAt, new Date())
|
||||
.set(Job::getUpdateBy, dto.getUpdateBy())
|
||||
.set(StrUtil.isNotBlank(dto.getTitle()), Job::getTitle, dto.getTitle())
|
||||
.set(
|
||||
StrUtil.isNotBlank(dto.getRequirement()),
|
||||
Job::getRequirement,
|
||||
dto.getRequirement())
|
||||
.set(
|
||||
StrUtil.isNotBlank(dto.getDescription()),
|
||||
Job::getDescription,
|
||||
dto.getDescription())
|
||||
.set(dto.getJobType() != null, Job::getJobType, dto.getJobType())
|
||||
.set(dto.getJobStatus() != null, Job::getJobStatus, dto.getJobStatus());
|
||||
jobMapper.update(null, wrapper);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package cn.axzo.maven.archetype.server;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class AppTest {
|
||||
|
||||
}
|
||||
102
job/pom.xml
Normal file
102
job/pom.xml
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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 http://maven.apache.org/maven-v4_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>
|
||||
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>job</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>job</name>
|
||||
|
||||
<properties>
|
||||
<axzo-bom.version>2.0.0-SNAPSHOT</axzo-bom.version>
|
||||
<axzo-dependencies.version>2.0.0-SNAPSHOT</axzo-dependencies.version>
|
||||
<lombok.version>1.18.22</lombok.version>
|
||||
<mapstruct.version>1.4.2.Final</mapstruct.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- 导入axzo通用api依赖 -->
|
||||
<dependency>
|
||||
<groupId>cn.axzo.infra</groupId>
|
||||
<artifactId>axzo-bom</artifactId>
|
||||
<version>${axzo-bom.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.infra</groupId>
|
||||
<artifactId>axzo-dependencies</artifactId>
|
||||
<version>${axzo-dependencies.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- for test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>axzo</id>
|
||||
<name>axzo repository</name>
|
||||
<url>https://nexus.axzo.cn/repository/axzo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<modules>
|
||||
<module>job-server</module>
|
||||
<module>job-api</module>
|
||||
</modules>
|
||||
</project>
|
||||
@ -67,6 +67,30 @@
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>config-server</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>job-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>job-server</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.nanopart</groupId>
|
||||
<artifactId>black-list-service</artifactId>
|
||||
|
||||
@ -21,6 +21,7 @@ mybatis-plus:
|
||||
logic-delete-value: id #逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 #逻辑未删除值(默认为 0)
|
||||
logic-delete-field: isDelete #逻辑删除字段
|
||||
type-enums-package: cn.axzo.nanopart.api.constant.enums
|
||||
|
||||
logging:
|
||||
level:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user