燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-06-09 702c1a3cf8112e610c5b3d62fc0b36b600b9f75c
添加查询su_yuan_700方法
已修改4个文件
25 ■■■■■ 文件已修改
src/main/java/com/yssh/dao/SuYuanMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/SuYuan700.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapping/SuYuanMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/dao/SuYuanMapper.java
@@ -40,5 +40,5 @@
    int updateVocsName(String table, String id, String vocsName);
    SuYuan700 selectSuYuan700ById(String id, String time);
    SuYuan700 selectSuYuan700ById(@Param("id") String id, @Param("time") String time);
}
src/main/java/com/yssh/entity/SuYuan700.java
@@ -1,5 +1,6 @@
package com.yssh.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -19,7 +20,7 @@
    private Long id;
    @ApiModelProperty(value = "溯源ID")
    private String su_yuan_id;
    private String suYuanId;
    @ApiModelProperty(value = "地址1")
    private String addr1;
@@ -58,6 +59,7 @@
    private Double y3;
    @ApiModelProperty(value = "时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    public SuYuan700() {
@@ -71,12 +73,12 @@
        this.id = id;
    }
    public String getSu_yuan_id() {
        return su_yuan_id;
    public String getSuYuanId() {
        return suYuanId;
    }
    public void setSu_yuan_id(String su_yuan_id) {
        this.su_yuan_id = su_yuan_id;
    public void setSuYuanId(String suYuanId) {
        this.suYuanId = suYuanId;
    }
    public String getAddr1() {
src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
@@ -296,8 +296,9 @@
    @Override
    public SuYuan700 selectSuYuan700ById(String id, Date date) {
        String time = DateUtils.getYyyyMmDdHhMmSs(date);
        id = id.substring(0, id.lastIndexOf("_") + 1) + "0";
        String time = DateUtils.getYyyyMmDdHhMmSs(date).substring(0, 13) + ":00:00";
        return null;
        return suYuanMapper.selectSuYuan700ById(id, time);
    }
}
src/main/resources/mapping/SuYuanMapper.xml
@@ -163,6 +163,12 @@
        ORDER BY value DESC
        LIMIT 1
    </select>
    <select id="selectSuYuan700ById" resultType="com.yssh.entity.SuYuan700">
        select * from suyuan_700
        where su_yuan_id = #{id} and create_time = #{time}
        limit 1;
    </select>
    
    <select id="getTemporary" resultMap="TemporaryResult">
        SELECT  x, y, z, u, v, w, format(c, 2) "c"