src/main/java/com/yssh/controller/SuYuanController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/entity/SuYuanFast.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/mapper/SuYuanMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/yssh/service/SuYuanService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/SuYuanMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/yssh/controller/SuYuanController.java
@@ -1,5 +1,6 @@ package com.yssh.controller; import cn.hutool.core.date.DateTime; import com.yssh.entity.*; import com.yssh.service.CommonService; import com.yssh.service.VocValsService; @@ -196,11 +197,21 @@ } @ApiOperation(value = "æ ¹æ®åç§°æ¥è¯¢æº¯æºID", notes = "æ ¹æ®åç§°æ¥è¯¢æº¯æºID") @ApiOperationSupport(order = 16) @ApiOperationSupport(order = 17) @GetMapping("/selectSuYuanIdByName") public Result selectSuYuanIdByName(@RequestParam(value = "name") String name) { if (null == name || name.length() == 0) return Result.OK(null); return Result.OK(suYuanService.selectSuYuanIdByName(name)); } @ApiOperation(value = "æ ¹æ®IDæ¥è¯¢å¿«é溯æº") @ApiOperationSupport(order = 18) @GetMapping("/selectFastById") public Result selectFastById(@RequestParam(value = "id") String id, @RequestParam(value = "date", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date date) { if (StringUtils.isEmpty(id)) return Result.OK(null); if (null == date) date = DateTime.now(); return Result.OK(suYuanService.selectFastById(id, date)); } } src/main/java/com/yssh/entity/SuYuanFast.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,87 @@ package com.yssh.entity; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * å¿«éæº¯æºè¡¨ * @author WWW * @date 2023-11-05 */ @Data public class SuYuanFast { private static final long serialVersionUID = 2023110510570000000L; public SuYuanFast() { } @ApiModelProperty(value = "主é®ID") private Long id; @ApiModelProperty(value = "溯æºID") private String suYuanId; @ApiModelProperty(value = "æ¹å") private Double dir; @ApiModelProperty(value = "X") private Double x; @ApiModelProperty(value = "Y") private Double y; @ApiModelProperty(value = "æ¶é´") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getSuYuanId() { return suYuanId; } public void setSuYuanId(String suYuanId) { this.suYuanId = suYuanId; } public Double getDir() { return dir; } public void setDir(Double dir) { this.dir = dir; } public Double getX() { return x; } public void setX(Double x) { this.x = x; } public Double getY() { return y; } public void setY(Double y) { this.y = y; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } } src/main/java/com/yssh/mapper/SuYuanMapper.java
@@ -45,4 +45,6 @@ SuYuan700 selectSuYuan700ById(@Param("id") String id, @Param("time") String time); SuYuan700 selectSuYuan46ById(@Param("id") String id, @Param("time") String time); List<SuYuanFast> selectFastById(@Param("id") String id, @Param("time") String time); } src/main/java/com/yssh/service/SuYuanService.java
@@ -346,4 +346,13 @@ return suYuanId; } /** * æ ¹æ®IDæ¥è¯¢å¿«éæº¯æº */ public List<SuYuanFast> selectFastById(String id, Date date) { String time = DateUtils.getYyyyMmDdHhMmSs(date); return suYuanMapper.selectFastById(id, time); } } src/main/resources/mapper/SuYuanMapper.xml
@@ -215,7 +215,13 @@ <select id="isTableExists" resultType="java.lang.Integer"> select count(*) from information_schema.tables where table_name = #{tableName}; </select> <select id="selectFastById" resultType="com.yssh.entity.SuYuanFast"> select * from yssh.suyuan_fast where su_yuan_id = #{id} and create_time = #{time} order by id; </select> <update id="createTable" parameterType="java.lang.String"> create table ${tableName} ( `id` varchar(10) not null comment '主é®',