初始化项目
This commit is contained in:
36
xtools-app-sys/xtools-app-sys-call/pom.xml
Normal file
36
xtools-app-sys/xtools-app-sys-call/pom.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>org.xujun</groupId>
|
||||
<artifactId>xtools-app-sys</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>xtools-app-sys-call</artifactId>
|
||||
|
||||
<!-- 依赖 -->
|
||||
<dependencies>
|
||||
<!-- xtools begin -->
|
||||
<!-- xtools-cloud-call -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-cloud-call</artifactId>
|
||||
</dependency>
|
||||
<!-- xtools end -->
|
||||
|
||||
<!-- 项目模块 begin -->
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-common-call</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xujun</groupId>
|
||||
<artifactId>xtools-app-sys-api</artifactId>
|
||||
</dependency>
|
||||
<!-- 项目模块 end -->
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,32 @@
|
||||
package xtools.app.sys.call;
|
||||
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.service.annotation.GetExchange;
|
||||
import org.springframework.web.service.annotation.HttpExchange;
|
||||
import xtools.app.sys.api.SysAddressApi;
|
||||
import xtools.app.sys.model.dto.resp.SysAddressResp;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
|
||||
/**
|
||||
* <p>Title : SysAddressCall</p>
|
||||
* <p>Description : 公用地址表 Call</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : xujun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026-03-13 15:02:53
|
||||
*/
|
||||
@HttpExchange("/sys/address")
|
||||
public interface SysAddressCall extends SysAddressApi {
|
||||
|
||||
/**
|
||||
* 根据code获取地址信息
|
||||
*
|
||||
* @param code Code
|
||||
* @return 地址信息
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("/get-by-code/{code}")
|
||||
Result<SysAddressResp> getByCode(@PathVariable String code);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package xtools.app.sys.call;
|
||||
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.service.annotation.GetExchange;
|
||||
import org.springframework.web.service.annotation.HttpExchange;
|
||||
import xtools.app.sys.api.SysDictItemApi;
|
||||
import xtools.app.sys.model.dto.resp.SysDictItemResp;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>Title : SysDictItemCall</p>
|
||||
* <p>Description : SysDictItemCall</p>
|
||||
* <p>DevelopTools : Idea_x64_v2026.1</p>
|
||||
* <p>DevelopSystem : macOS Sequoia 15.7.5</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : XuJun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026/2/27 10:49
|
||||
*/
|
||||
@HttpExchange("/sys/dict-item")
|
||||
public interface SysDictItemCall extends SysDictItemApi {
|
||||
|
||||
/**
|
||||
* 根据字典编码查询字典项
|
||||
*
|
||||
* @param dictCode 字典编码
|
||||
* @return 字典项
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("/get-by-code/{dictCode}")
|
||||
Result<List<SysDictItemResp>> getByCode(@PathVariable String dictCode);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package xtools.app.sys.call;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.service.annotation.DeleteExchange;
|
||||
import org.springframework.web.service.annotation.GetExchange;
|
||||
import org.springframework.web.service.annotation.HttpExchange;
|
||||
import org.springframework.web.service.annotation.PostExchange;
|
||||
import xtools.app.sys.api.SysFileApi;
|
||||
import xtools.app.sys.model.dto.req.SysFileAddReq;
|
||||
import xtools.app.sys.model.dto.req.SysFileChangeReq;
|
||||
import xtools.app.sys.model.dto.req.SysFileUpdateReq;
|
||||
import xtools.app.sys.model.dto.resp.SysFileResp;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
import xtools.boot.api.model.dto.req.IdListReq;
|
||||
|
||||
/**
|
||||
* <p>Title : SysFileCall</p>
|
||||
* <p>Description : 系统文件表 Call</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : xujun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026-03-14 13:44:03
|
||||
*/
|
||||
@HttpExchange("/sys/file")
|
||||
public interface SysFileCall extends SysFileApi {
|
||||
|
||||
/**
|
||||
* 根据 ID 查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("base/{id}")
|
||||
Result<SysFileResp> getById(@PathVariable Long id);
|
||||
|
||||
/**
|
||||
* 根据文件名查询
|
||||
*
|
||||
* @param bucket 桶名称
|
||||
* @param fileName 文件名
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("base/get-by-name")
|
||||
Result<SysFileResp> getByName(
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String bucket,
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String fileName
|
||||
);
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param req 添加请求
|
||||
* @return 添加结果
|
||||
*/
|
||||
@Override
|
||||
@PostExchange("base")
|
||||
Result<Long> add(@RequestBody @Valid SysFileAddReq req);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param req 修改请求
|
||||
* @return 修改结果
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("base")
|
||||
Result<Boolean> update(@RequestBody @Valid SysFileUpdateReq req);
|
||||
|
||||
/**
|
||||
* 根据 ID 删除
|
||||
*
|
||||
* @param req ID 集合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@Override
|
||||
@DeleteExchange("base")
|
||||
Result<Boolean> delById(@RequestBody @Valid IdListReq req);
|
||||
|
||||
/**
|
||||
* 改变数据类型
|
||||
*
|
||||
* @param req 请求参数
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
@PostExchange("change-data-type-by-ids")
|
||||
Result<Boolean> changeDataTypeByIds(@RequestBody @Valid SysFileChangeReq req);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package xtools.app.sys.call;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.service.annotation.HttpExchange;
|
||||
import org.springframework.web.service.annotation.PostExchange;
|
||||
import org.springframework.web.service.annotation.PutExchange;
|
||||
import xtools.app.sys.api.SysParamApi;
|
||||
import xtools.app.sys.model.dto.req.SysParamAddReq;
|
||||
import xtools.app.sys.model.dto.req.SysParamUpdateReq;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
|
||||
/**
|
||||
* <p>Title : SysParamCall</p>
|
||||
* <p>Description : 系统参数表 Call</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : xujun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026-03-26 10:15:49
|
||||
*/
|
||||
@HttpExchange("/sys/param")
|
||||
public interface SysParamCall extends SysParamApi {
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param req 添加请求
|
||||
* @return 添加结果
|
||||
*/
|
||||
@Override
|
||||
@Operation(summary = "添加数据")
|
||||
@PostExchange("base")
|
||||
Result<Boolean> add(@RequestBody @Valid SysParamAddReq req);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param req 修改请求
|
||||
* @return 修改结果
|
||||
*/
|
||||
@Override
|
||||
@PutExchange("base")
|
||||
Result<Boolean> update(@RequestBody @Valid SysParamUpdateReq req);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package xtools.app.sys.call;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.service.annotation.GetExchange;
|
||||
import org.springframework.web.service.annotation.HttpExchange;
|
||||
import org.springframework.web.service.annotation.PostExchange;
|
||||
import xtools.app.sys.api.SysRiskApi;
|
||||
import xtools.app.sys.enums.SysRiskType;
|
||||
import xtools.app.sys.model.dto.resp.SysRiskResp;
|
||||
import xtools.boot.api.model.dto.Result;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>Title : SysRiskCall</p>
|
||||
* <p>Description : 系统风控表 Call</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : xujun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026-04-08 09:10:45
|
||||
*/
|
||||
@HttpExchange("/sys/risk")
|
||||
public interface SysRiskCall extends SysRiskApi {
|
||||
|
||||
/**
|
||||
* 根据类型获取数据
|
||||
*
|
||||
* @param type 类型
|
||||
* @return 数据
|
||||
*/
|
||||
@Override
|
||||
@GetExchange("type")
|
||||
Result<List<SysRiskResp>> getByType(
|
||||
@NotNull(message = "不能为空")
|
||||
@RequestParam SysRiskType type
|
||||
);
|
||||
|
||||
/**
|
||||
* 添加IP
|
||||
*
|
||||
* @param sysType 系统类型
|
||||
* @param ip IP
|
||||
* @return 添加结果
|
||||
*/
|
||||
@Override
|
||||
@PostExchange("add-ip")
|
||||
Result<Boolean> addIp(
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String sysType,
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String ip
|
||||
);
|
||||
|
||||
/**
|
||||
* 移除IP
|
||||
*
|
||||
* @param sysType 系统类型
|
||||
* @param ip IP
|
||||
* @return 移除结果
|
||||
*/
|
||||
@Override
|
||||
@PostExchange("remove-ip")
|
||||
Result<Boolean> removeIp(
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String sysType,
|
||||
@NotBlank(message = "不能为空")
|
||||
@RequestParam String ip
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package xtools.app.sys.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.service.registry.ImportHttpServices;
|
||||
|
||||
/**
|
||||
* <p>Title : SysHttpServiceConfig</p>
|
||||
* <p>Description : SysHttpServiceConfig</p>
|
||||
* <p>DevelopTools : Idea_x64_v2026.1</p>
|
||||
* <p>DevelopSystem : macOS Sequoia 15.7.5</p>
|
||||
* <p>Company : org.xujun</p>
|
||||
*
|
||||
* @author : XuJun
|
||||
* @version : 1.0.0
|
||||
* @date : 2026/2/25 08:28
|
||||
*/
|
||||
@Configuration
|
||||
@ImportHttpServices(group = "xtools-app-sys", basePackages = "xtools.app.sys.call")
|
||||
public class SysHttpServiceConfig {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user