Merge remote-tracking branch 'origin/master'
commit
5b1c22856a
13
pom.xml
13
pom.xml
|
|
@ -49,19 +49,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-lib</id>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>false</stripVersion>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@ import io.swagger.v3.oas.annotations.servers.Server;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.model.BzProtocolInfo;
|
||||
import com.gunshi.project.xyt.model.BzProtocolInfoAutoDao;
|
||||
import com.gunshi.project.xyt.service.ProtocolInfoService;
|
||||
import com.gunshi.project.xyt.so.BzProtocolInfoSo;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 协议信息控制器接口类
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/protocolInfo")
|
||||
@Tag(name = "系统管理-统一接收-协议管理")
|
||||
public class BzProtocolInfoController {
|
||||
@Autowired
|
||||
private BzProtocolInfoAutoDao dao;
|
||||
|
||||
@Autowired
|
||||
private ProtocolInfoService service;
|
||||
|
||||
@Operation(summary = "新增协议信息")
|
||||
@PostMapping("/save")
|
||||
public R<Boolean> save(@Validated({Insert.class}) @RequestBody BzProtocolInfo entity) {
|
||||
// todo 无论是数据库设置默认值为GETDATE()还是使用注解fill = FieldFill.INSERT都不能自动插入当前时间
|
||||
entity.setCreateTm(new Date());
|
||||
entity.setEnable(1);
|
||||
return R.ok(dao.save(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "更新协议信息")
|
||||
@PostMapping("/update")
|
||||
public R<Boolean> update(@Validated({Update.class}) @RequestBody BzProtocolInfo entity) {
|
||||
return R.ok(dao.updateById(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "删除协议信息")
|
||||
@GetMapping("/delete/{id}")
|
||||
public R<Boolean> delete(@PathVariable String id) {
|
||||
return R.ok(dao.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "按id查询接口")
|
||||
@GetMapping("/get/{id}")
|
||||
public R<BzProtocolInfo> getById(@PathVariable("id") String id) {
|
||||
return R.ok(dao.getById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询接口")
|
||||
@PostMapping("/page")
|
||||
public R<Page<BzProtocolInfo>> page(@Validated @RequestBody BzProtocolInfoSo so) {
|
||||
return R.ok(service.page(so));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.model.BzServiceResource;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceAutoDao;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceType;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceTypeAutoDao;
|
||||
import com.gunshi.project.xyt.service.BzServiceResourceMonitorRService;
|
||||
import com.gunshi.project.xyt.so.BzServiceResourceSo;
|
||||
import com.gunshi.project.xyt.so.BzServiceResourceTypeSo;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.QueryPage;
|
||||
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 服务资源及监控控制器接口类
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/serviceResource")
|
||||
@Tag(name = "系统管理-数据共享服务-服务资源及监控")
|
||||
public class BzServiceResourceController {
|
||||
|
||||
@Autowired
|
||||
private BzServiceResourceAutoDao serviceResourceDao;
|
||||
|
||||
@Autowired
|
||||
private BzServiceResourceMonitorRService serviceMonitorService;
|
||||
|
||||
@Autowired
|
||||
private BzServiceResourceTypeAutoDao serviceTypeDao;
|
||||
|
||||
@Operation(summary = "新增服务资源")
|
||||
@PostMapping("/save")
|
||||
public R<Boolean> save(@Validated(Insert.class) @RequestBody BzServiceResource entity) {
|
||||
entity.setId(IdWorker.getIdStr());
|
||||
entity.setRegisterDate(new Date());
|
||||
entity.setEnable(1);
|
||||
return R.ok(serviceResourceDao.save(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "更新服务资源")
|
||||
@PostMapping("/update")
|
||||
public R<Boolean> update(@Validated(Update.class) @RequestBody BzServiceResource entity) {
|
||||
BzServiceResource byId = serviceResourceDao.getById(entity.getId());
|
||||
if (byId == null) {
|
||||
return R.error(400, "数据不存在", false);
|
||||
}
|
||||
|
||||
entity.setRegisterDate(byId.getRegisterDate());
|
||||
return R.ok(serviceResourceDao.updateById(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "删除服务资源")
|
||||
@GetMapping("/delete/{id}")
|
||||
public R<Boolean> delete(@PathVariable("id") String id) {
|
||||
return R.ok(serviceMonitorService.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询服务资源")
|
||||
@PostMapping("/page")
|
||||
public R<Page<BzServiceResource>> page(
|
||||
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
||||
) {
|
||||
LambdaQueryWrapper<BzServiceResource> query = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(so.getName())) {
|
||||
query.like(BzServiceResource::getName, so.getName());
|
||||
}
|
||||
|
||||
query.le(BzServiceResource::getRegisterDate, so.getTimeSo().getEnd());
|
||||
query.ge(BzServiceResource::getRegisterDate, so.getTimeSo().getStart());
|
||||
query.orderByDesc(BzServiceResource::getRegisterDate);
|
||||
|
||||
Page<BzServiceResource> page = serviceResourceDao.page(so.getPageSo().toPage(), query);
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询服务资源监控")
|
||||
@PostMapping("/monitor/page")
|
||||
public R<Page<BzServiceResourceMonitorVo>> pageMonitorR(
|
||||
@Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so
|
||||
) {
|
||||
Page<BzServiceResourceMonitorVo> page = serviceMonitorService.page(so.getPageSo().toPage(), so);
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
@Operation(summary = "新增服务资源类型")
|
||||
@PostMapping("/type/save")
|
||||
public R<Boolean> saveType(@Validated(Insert.class) @RequestBody BzServiceResourceType entity) {
|
||||
entity.setId(IdWorker.getIdStr());
|
||||
return R.ok(serviceTypeDao.save(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "更新服务资源类型")
|
||||
@PostMapping("/type/update")
|
||||
public R<Boolean> updateType(@Validated(Update.class) @RequestBody BzServiceResourceType entity) {
|
||||
return R.ok(serviceTypeDao.updateById(entity));
|
||||
}
|
||||
|
||||
@Operation(summary = "删除服务资源类型")
|
||||
@GetMapping("/type/delete/{id}")
|
||||
public R<Boolean> deleteType(@PathVariable("id") String id) {
|
||||
return R.ok(serviceTypeDao.removeById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询服务资源类型")
|
||||
@PostMapping("/type/page")
|
||||
public R<Page<BzServiceResourceType>> pageType(
|
||||
@Validated({QueryPage.class}) @RequestBody BzServiceResourceTypeSo so
|
||||
) {
|
||||
LambdaQueryWrapper<BzServiceResourceType> query = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(so.getName())) {
|
||||
query.like(BzServiceResourceType::getName, so.getName());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(so.getType())) {
|
||||
query.like(BzServiceResourceType::getType, so.getType());
|
||||
}
|
||||
|
||||
Page<BzServiceResourceType> page = serviceTypeDao.page(so.getPageSo().toPage(), query);
|
||||
return R.ok(page);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.gunshi.logging.access.annotation.LoginLogging;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RequestMapping("/ping")
|
||||
public class PingController {
|
||||
@Operation(summary = "测试接口")
|
||||
@LoginLogging
|
||||
@GetMapping("")
|
||||
public String ping() {
|
||||
return "pong";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.gunshi.project.xyt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.xyt.so.BzServiceResourceSo;
|
||||
import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 服务资源及监控联合查询Mapper
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface BzServiceResourceMonitorRMapper {
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT r.*,sr.name FROM BZ_SERVICE_RESOURCE_MONITOR_R r
|
||||
LEFT JOIN BZ_SERVICE_RESOURCE sr ON r.SR_ID=sr.ID
|
||||
WHERE 1=1
|
||||
<if test="so.name != null and so.name != ''">
|
||||
AND sr.NAME LIKE CONCAT('%',#{so.name},'%')
|
||||
</if>
|
||||
<if test="so.timeSo.start != null">
|
||||
AND r.LAST_CHANGE_TM >= #{so.timeSo.start}
|
||||
</if>
|
||||
<if test="so.timeSo.end != null">
|
||||
AND r.LAST_CHANGE_TM <= #{so.timeSo.end}
|
||||
</if>
|
||||
</script>
|
||||
""")
|
||||
Page<BzServiceResourceMonitorVo> page(@Param("page") Page page, @Param("so") BzServiceResourceSo so);
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 接收协议
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Schema(description = "接收协议")
|
||||
@TableName("BZ_PROTOCOL_INFO")
|
||||
public class BzProtocolInfo {
|
||||
|
||||
@NotEmpty(message = "协议编码不能为空", groups = {Insert.class, Update.class})
|
||||
@Schema(description = "协议编码")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@NotEmpty(message = "协议名称不能为空", groups = {Insert.class})
|
||||
@Schema(description = "协议名称")
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
|
||||
@NotEmpty(message = "IP地址不能为空", groups = {Insert.class})
|
||||
@Schema(description = "IP地址")
|
||||
@TableField("IP")
|
||||
private String ip;
|
||||
|
||||
@NotNull(message = "监听端口不能为空", groups = {Insert.class})
|
||||
@Schema(description = "监听端口")
|
||||
@TableField("PORT")
|
||||
private Integer port;
|
||||
|
||||
@NotEmpty(message = "协议标准不能为空", groups = {Insert.class})
|
||||
@Schema(description = "协议标准")
|
||||
@TableField("STD")
|
||||
private String std;
|
||||
|
||||
@Schema(description = "传输协议,TCP或UDP")
|
||||
@TableField("TRANS")
|
||||
private String trans;
|
||||
|
||||
@Schema(description = "是否启用", $comment = "1启用,0不启用,默认1")
|
||||
@TableField(value = "ENABLE")
|
||||
private Integer enable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@TableField(value = "CREATE_TM")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date createTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据共享服务公共资源属性
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Schema(description = "服务资源")
|
||||
@TableName("BZ_SERVICE_RESOURCE")
|
||||
public class BzServiceResource {
|
||||
|
||||
@Schema(description = "id")
|
||||
@TableId("ID")
|
||||
@NotEmpty(message = "服务ID不能为空", groups = {Update.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "服务名称")
|
||||
@TableField("NAME")
|
||||
@NotEmpty(message = "服务名称不能为空", groups = {Insert.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "服务描述")
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "服务类型")
|
||||
@TableField("SERVICE_TYPE")
|
||||
private String serviceType;
|
||||
|
||||
@Schema(description = "服务地址")
|
||||
@TableField("URL")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "服务端口")
|
||||
@TableField("PORT")
|
||||
private Integer port;
|
||||
|
||||
@Schema(description = "服务提供者")
|
||||
@TableField("PROVIDER")
|
||||
private String provider;
|
||||
|
||||
@Schema(description = "目标表")
|
||||
@TableField("TARGET_TABLE")
|
||||
private String targetTable;
|
||||
|
||||
@Schema(description = "目标时间依据字段")
|
||||
@TableField("TARGET_TM_FIELD")
|
||||
private String targetTmField;
|
||||
|
||||
@Schema(description = "路由")
|
||||
@TableField("ROUTE")
|
||||
private String route;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
@TableField("CONTACT")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
@TableField("PHONE")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "注册日期")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
@TableField("REGISTER_DATE")
|
||||
private Date registerDate;
|
||||
|
||||
@Schema(description = "修改日期")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@TableField("UPDATE_TM")
|
||||
private Date updateTm;
|
||||
|
||||
@Schema(description = "是否启用,0-停用,1-启用")
|
||||
@TableField("ENABLE")
|
||||
private Integer enable;
|
||||
|
||||
@Schema(description = "状态,0-不在线/异常,1-在线/正常")
|
||||
@TableField("STATUS")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "最近数据时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@TableField("LAST_DATA_TM")
|
||||
private Date lastChangeTm;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 服务资源监控记录
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Schema(description = "服务资源监控记录")
|
||||
@TableName("BZ_SERVICE_RESOURCE_R")
|
||||
public class BzServiceResourceMonitorR {
|
||||
|
||||
@Schema(description = "id")
|
||||
@TableId("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "服务资源id")
|
||||
@TableField("SR_ID")
|
||||
private String srId;
|
||||
|
||||
@Schema(description = "最近数据时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@TableField("LAST_CHANGE_TM")
|
||||
private Date lastChangeTm;
|
||||
|
||||
@Schema(description = "共享数据(条)")
|
||||
@TableField("RECORD_COUNT")
|
||||
private Long recordCount;
|
||||
|
||||
@Schema(description = "共享站点数量")
|
||||
@TableField("ST_COUNT")
|
||||
private Integer stCount;
|
||||
|
||||
@Schema(description = "今日共享数据(条)")
|
||||
@TableField("TODAY_COUNT")
|
||||
private Long todayCount;
|
||||
|
||||
@Schema(description = "本周共享数据(条)")
|
||||
@TableField("WEEKLY_COUNT")
|
||||
private Long weeklyCount;
|
||||
|
||||
@Schema(description = "本月共享数据(条)")
|
||||
@TableField("MONTHLY_COUNT")
|
||||
private Long monthlyCount;
|
||||
|
||||
@Schema(description = "本年共享数据(条)")
|
||||
@TableField("YEARLY_COUNT")
|
||||
private Long yearlyCount;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.gunshi.project.xyt.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 服务类型
|
||||
* 纯字典,无意义,无关联,应标
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Schema(description = "服务类型")
|
||||
@TableName("BZ_SERVICE_RESOURCE_TYPE")
|
||||
public class BzServiceResourceType {
|
||||
@Schema(description = "id")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "服务类型")
|
||||
@TableField("TYPE")
|
||||
@NotEmpty(message = "服务类型不能为空", groups = {Insert.class, Update.class})
|
||||
private String type;
|
||||
|
||||
@Schema(description = "服务名称")
|
||||
@TableField("NAME")
|
||||
@NotEmpty(message = "服务类型不能为空", groups = {Insert.class, Update.class})
|
||||
private String name;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.xyt.mapper.BzServiceResourceMonitorRMapper;
|
||||
import com.gunshi.project.xyt.model.BzServiceResource;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceAutoDao;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceMonitorR;
|
||||
import com.gunshi.project.xyt.model.BzServiceResourceMonitorRAutoDao;
|
||||
import com.gunshi.project.xyt.so.BzServiceResourceSo;
|
||||
import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Service
|
||||
public class BzServiceResourceMonitorRService {
|
||||
@Autowired
|
||||
private BzServiceResourceAutoDao serviceResourceDao;
|
||||
|
||||
@Autowired
|
||||
private BzServiceResourceMonitorRAutoDao serviceMonitorDao;
|
||||
|
||||
@Autowired
|
||||
private BzServiceResourceMonitorRMapper serviceMonitorMapper;
|
||||
|
||||
public Page<BzServiceResourceMonitorVo> page(Page page, BzServiceResourceSo so) {
|
||||
return serviceMonitorMapper.page(page, so);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Boolean removeById(String id) {
|
||||
BzServiceResource byId = serviceResourceDao.getById(id);
|
||||
if (byId == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return serviceResourceDao.removeById(id) &&
|
||||
serviceMonitorDao.remove(
|
||||
new LambdaQueryWrapper<BzServiceResourceMonitorR>()
|
||||
.eq(BzServiceResourceMonitorR::getSrId, id)
|
||||
);
|
||||
}
|
||||
|
||||
public void scanByTm() {
|
||||
List<BzServiceResource> serviceResources = serviceResourceDao.list();
|
||||
for (BzServiceResource serviceResource : serviceResources) {
|
||||
if (StringUtils.isNotEmpty(serviceResource.getTargetTable()) &&
|
||||
StringUtils.isNotEmpty(serviceResource.getTargetTmField())) {
|
||||
// Db.getMap(new QueryWrapper<>().orderByDesc(serviceResource.getTargetTmField()).last("limit 1"), serviceResource.getTargetTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gunshi.project.xyt.model.BzProtocolInfo;
|
||||
import com.gunshi.project.xyt.model.BzProtocolInfoAutoDao;
|
||||
import com.gunshi.project.xyt.so.BzProtocolInfoSo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@Service
|
||||
public class ProtocolInfoService {
|
||||
@Autowired
|
||||
private BzProtocolInfoAutoDao dao;
|
||||
|
||||
|
||||
public Page<BzProtocolInfo> page(BzProtocolInfoSo so) {
|
||||
if (StringUtils.isNotEmpty(so.getId())) {
|
||||
BzProtocolInfo entity = dao.getById(so.getId());
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
List<BzProtocolInfo> records = List.of(entity);
|
||||
return new Page<BzProtocolInfo>(1, 1, 1).setRecords(records);
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<BzProtocolInfo> query = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(so.getName())) {
|
||||
query.like(StringUtils.isNotEmpty(so.getName()), BzProtocolInfo::getName, so.getName());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(so.getIp())) {
|
||||
query.like(BzProtocolInfo::getIp, so.getIp());
|
||||
}
|
||||
if (so.getPort() != null) {
|
||||
query.eq(BzProtocolInfo::getPort, so.getPort());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(so.getStd())) {
|
||||
query.like(BzProtocolInfo::getStd, so.getStd());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(so.getTrans())) {
|
||||
query.like(BzProtocolInfo::getTrans, so.getTrans());
|
||||
}
|
||||
if (so.getEnable() != null) {
|
||||
query.eq(BzProtocolInfo::getEnable, so.getEnable());
|
||||
}
|
||||
query.orderByDesc(BzProtocolInfo::getCreateTm);
|
||||
|
||||
return dao.page(so.getPageSo().toPage(), query);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.gunshi.project.xyt.so;
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import com.gunshi.project.xyt.validate.markers.Query;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 协议信息查询参数
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "协议信息查询参数")
|
||||
public class BzProtocolInfoSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空")
|
||||
private PageSo pageSo;
|
||||
|
||||
@Schema(description = "协议编码")
|
||||
@NotEmpty(groups = {Query.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "协议名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "IP地址")
|
||||
private String ip;
|
||||
|
||||
@Schema(description = "监听端口")
|
||||
private Integer port;
|
||||
|
||||
@Schema(description = "协议标准")
|
||||
private String std;
|
||||
|
||||
@Schema(description = "传输协议,TCP或UDP")
|
||||
private String trans;
|
||||
|
||||
@Schema(description = "是否启用, 1启用,0不启用,默认1")
|
||||
private Integer enable;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.gunshi.project.xyt.so;
|
||||
|
||||
import com.gunshi.db.dto.DateTimeRangeSo;
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import com.gunshi.project.xyt.validate.markers.QueryPage;
|
||||
import com.gunshi.project.xyt.validate.markers.QueryTimeRange;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 服务资源查询参数
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "服务资源查询参数")
|
||||
public class BzServiceResourceSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空", groups = {QueryPage.class})
|
||||
private PageSo pageSo;
|
||||
|
||||
@NotNull(message = "时间范围不能为空", groups = {QueryTimeRange.class})
|
||||
private DateTimeRangeSo timeSo;
|
||||
|
||||
@Schema(description = "服务名称")
|
||||
private String name;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.gunshi.project.xyt.so;
|
||||
|
||||
import com.gunshi.db.dto.PageSo;
|
||||
import com.gunshi.project.xyt.validate.markers.QueryPage;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 服务资源查询参数
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "服务资源查询参数")
|
||||
public class BzServiceResourceTypeSo {
|
||||
|
||||
@NotNull(message = "分页参数不能为空", groups = {QueryPage.class})
|
||||
private PageSo pageSo;
|
||||
|
||||
@Schema(description = "服务名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "服务类型")
|
||||
private String type;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
public interface Delete {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
public interface Insert {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
public interface Query {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
public interface QueryPage {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
public interface QueryTimeRange {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.gunshi.project.xyt.validate.markers;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
public interface Update {
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.gunshi.project.xyt.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-24
|
||||
*/
|
||||
public class BzServiceResourceMonitorVo {
|
||||
//region BzServiceResourceMonitorR
|
||||
@Schema(description = "id")
|
||||
@TableId("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "服务资源id")
|
||||
@TableField("SR_ID")
|
||||
private String srId;
|
||||
|
||||
@Schema(description = "最近数据时间")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
@TableField("LAST_CHANGE_TM")
|
||||
private Date lastChangeTm;
|
||||
|
||||
@Schema(description = "共享数据(条)")
|
||||
@TableField("RECORD_COUNT")
|
||||
private Long recordCount;
|
||||
|
||||
@Schema(description = "共享站点数量")
|
||||
@TableField("ST_COUNT")
|
||||
private Integer stCount;
|
||||
|
||||
@Schema(description = "今日共享数据(条)")
|
||||
@TableField("TODAY_COUNT")
|
||||
private Long todayCount;
|
||||
|
||||
@Schema(description = "本周共享数据(条)")
|
||||
@TableField("WEEKLY_COUNT")
|
||||
private Long weeklyCount;
|
||||
|
||||
@Schema(description = "本月共享数据(条)")
|
||||
@TableField("MONTHLY_COUNT")
|
||||
private Long monthlyCount;
|
||||
|
||||
@Schema(description = "本年共享数据(条)")
|
||||
@TableField("YEARLY_COUNT")
|
||||
private Long yearlyCount;
|
||||
//endregion
|
||||
|
||||
//region BzServiceResource
|
||||
@Schema(description = "服务名称")
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
//endregion
|
||||
}
|
||||
|
|
@ -56,3 +56,6 @@ gunshi:
|
|||
username: gunshi_logger
|
||||
password: 1234567a
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : dev-mssql
|
||||
Source Server Type : SQL Server
|
||||
Source Server Version : 16001000
|
||||
Source Host : 10.0.41.115:1433
|
||||
Source Catalog : xyt
|
||||
Source Schema : dbo
|
||||
|
||||
Target Server Type : SQL Server
|
||||
Target Server Version : 16001000
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 24/01/2024 16:12:30
|
||||
*/
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for SERVICE_RESOURCE
|
||||
-- ----------------------------
|
||||
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[SERVICE_RESOURCE]') AND type IN ('U'))
|
||||
DROP TABLE [dbo].[SERVICE_RESOURCE]
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[SERVICE_RESOURCE] (
|
||||
[ID] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[NAME] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[DESCRIPTION] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[SERVICE_TYPE] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[URL] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[PORT] int NULL,
|
||||
[PROVIDER] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[TARGET_TABLE] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[TARGET_TM_FIELD] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[ROUTE] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[CONTACT] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[PHONE] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
[REGISTER_DATE] datetime NULL,
|
||||
[UPDATE_TM] datetime NULL,
|
||||
[ENABLE] int NULL,
|
||||
[STATUS] int NULL,
|
||||
[LAST_DATA_TM] datetime NULL
|
||||
)
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[SERVICE_RESOURCE] SET (LOCK_ESCALATION = TABLE)
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'id',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'ID'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务名称',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'NAME'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务描述',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'DESCRIPTION'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务类型',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'SERVICE_TYPE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务地址',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'URL'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务端口',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'PORT'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'服务提供者',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'PROVIDER'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'目标表',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'TARGET_TABLE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'目标时间依据字段',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'TARGET_TM_FIELD'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'路由',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'ROUTE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'联系人',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'CONTACT'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'联系电话',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'PHONE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'注册日期',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'REGISTER_DATE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'修改日期',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'UPDATE_TM'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'启用, 0-停用,1-启用',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'ENABLE'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'状态, 0-不在线/异常,1-在线/正常',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'STATUS'
|
||||
GO
|
||||
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'最近数据时间',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'SERVICE_RESOURCE',
|
||||
'COLUMN', N'LAST_DATA_TM'
|
||||
GO
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.gunshi.project.xyt;
|
||||
|
||||
import com.gunshi.core.annotation.GunShiApplication;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@GunShiApplication
|
||||
@MapperScan(basePackages = {"com.gunshi.**.mapper", "com.gunshi.**.model"})
|
||||
public class TestMain {
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.gunshi.logging.access.annotation.LoginLogging;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 类描述
|
||||
*
|
||||
* @author lyf
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class TestController {
|
||||
@LoginLogging
|
||||
@GetMapping("/ping")
|
||||
public String pong() {
|
||||
return "pong";
|
||||
}
|
||||
}
|
||||
|
|
@ -28,6 +28,13 @@ spring:
|
|||
gunshi:
|
||||
core:
|
||||
appName: project-xyt
|
||||
file:
|
||||
key: test.by_lyf.tmp
|
||||
secret: xPXPAb63FphkGkPU0ZZkNIXmDzjDVeF3PBH6ZEKw
|
||||
endpoint: http://223.75.53.141:9102
|
||||
publicBucket: test.by-lyf.tmp
|
||||
loginBucket: test.by-lyf.tmp
|
||||
privateBucket: test.by-lyf.tmp
|
||||
access:
|
||||
logging:
|
||||
enabled: true
|
||||
|
|
@ -48,10 +55,4 @@ gunshi:
|
|||
database: gunshi-logging
|
||||
username: gunshi_logger
|
||||
password: 1234567a
|
||||
file:
|
||||
key: test.by_lyf.tmp
|
||||
secret: xPXPAb63FphkGkPU0ZZkNIXmDzjDVeF3PBH6ZEKw
|
||||
endpoint: http://223.75.53.141:9102
|
||||
publicBucket: test.by-lyf.tmp
|
||||
loginBucket: test.by-lyf.tmp
|
||||
privateBucket: test.by-lyf.tmp
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue