New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.AFEInverterControl; |
| | | import com.whyc.pojo.WaterQualityMonitoring; |
| | | import com.whyc.service.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * EnvMonitoring |
| | | * |
| | | * tb_water_quality_monitoring |
| | | * tb_leakage_monitoring |
| | | * tb_insulation_monitoring |
| | | */ |
| | | @RestController |
| | | @RequestMapping("EnvMonitoring") |
| | | @Api(tags = "环境监测") |
| | | public class EnvMonitoring { |
| | | |
| | | @Autowired |
| | | private WaterQualityMonitoringService waterQualityMonitoringService; |
| | | |
| | | @Autowired |
| | | private LeakageMonitoringService leakageMonitoringService; |
| | | |
| | | @Autowired |
| | | private InsulationMonitoringService insulationMonitoringService; |
| | | |
| | | |
| | | @GetMapping("stateWaterQuality") |
| | | @ApiOperation(value = "水质监测") |
| | | public Response<Object> getWaterQuality() { |
| | | |
| | | return waterQualityMonitoringService.getWaterQuality(); |
| | | } |
| | | |
| | | @GetMapping("stateLeakageMonitoring") |
| | | @ApiOperation(value = "漏水监测") |
| | | public Response<Object> getLeakageMonitoring() { |
| | | |
| | | return leakageMonitoringService.getLeakageMonitoring(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("stateInsulationMonitoring") |
| | | @ApiOperation(value = "绝缘监测") |
| | | public Response<Object> getInsulationMonitoring() { |
| | | |
| | | return insulationMonitoringService.getInsulationMonitoring(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | |
| | | import com.whyc.pojo.InsulationMonitoring; |
| | | |
| | | public interface InsulationMonitoringMapper extends CustomMapper<InsulationMonitoring> { |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(InsulationMonitoring record); |
| | | |
| | | int insertSelective(InsulationMonitoring record); |
| | | |
| | | InsulationMonitoring selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(InsulationMonitoring record); |
| | | |
| | | int updateByPrimaryKey(InsulationMonitoring record); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.LeakageMonitoring; |
| | | |
| | | public interface LeakageMonitoringMapper extends CustomMapper<LeakageMonitoring> { |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(LeakageMonitoring record); |
| | | |
| | | int insertSelective(LeakageMonitoring record); |
| | | |
| | | LeakageMonitoring selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(LeakageMonitoring record); |
| | | |
| | | int updateByPrimaryKey(LeakageMonitoring record); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | |
| | | import com.whyc.pojo.WaterQualityMonitoring; |
| | | |
| | | public interface WaterQualityMonitoringMapper extends CustomMapper<WaterQualityMonitoring> { |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(WaterQualityMonitoring record); |
| | | |
| | | int insertSelective(WaterQualityMonitoring record); |
| | | |
| | | WaterQualityMonitoring selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(WaterQualityMonitoring record); |
| | | |
| | | int updateByPrimaryKey(WaterQualityMonitoring record); |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * tb_insulation_monitoring |
| | | * @author |
| | | */ |
| | | @ApiModel |
| | | @Alias("InsulationMonitoring") |
| | | @TableName( schema = "`db_3.5mw_motor`",value = "tb_insulation_monitoring") |
| | | public class InsulationMonitoring implements Serializable { |
| | | private Long num; |
| | | |
| | | private Double param1; |
| | | |
| | | private Double param2; |
| | | |
| | | private Double param3; |
| | | |
| | | private Double param4; |
| | | |
| | | private Double param5; |
| | | |
| | | private Double param6; |
| | | |
| | | private Double param7; |
| | | |
| | | private Double param8; |
| | | |
| | | private Double param9; |
| | | |
| | | private Double param10; |
| | | |
| | | private String note; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public Long getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(Long num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public Double getParam1() { |
| | | return param1; |
| | | } |
| | | |
| | | public void setParam1(Double param1) { |
| | | this.param1 = param1; |
| | | } |
| | | |
| | | public Double getParam2() { |
| | | return param2; |
| | | } |
| | | |
| | | public void setParam2(Double param2) { |
| | | this.param2 = param2; |
| | | } |
| | | |
| | | public Double getParam3() { |
| | | return param3; |
| | | } |
| | | |
| | | public void setParam3(Double param3) { |
| | | this.param3 = param3; |
| | | } |
| | | |
| | | public Double getParam4() { |
| | | return param4; |
| | | } |
| | | |
| | | public void setParam4(Double param4) { |
| | | this.param4 = param4; |
| | | } |
| | | |
| | | public Double getParam5() { |
| | | return param5; |
| | | } |
| | | |
| | | public void setParam5(Double param5) { |
| | | this.param5 = param5; |
| | | } |
| | | |
| | | public Double getParam6() { |
| | | return param6; |
| | | } |
| | | |
| | | public void setParam6(Double param6) { |
| | | this.param6 = param6; |
| | | } |
| | | |
| | | public Double getParam7() { |
| | | return param7; |
| | | } |
| | | |
| | | public void setParam7(Double param7) { |
| | | this.param7 = param7; |
| | | } |
| | | |
| | | public Double getParam8() { |
| | | return param8; |
| | | } |
| | | |
| | | public void setParam8(Double param8) { |
| | | this.param8 = param8; |
| | | } |
| | | |
| | | public Double getParam9() { |
| | | return param9; |
| | | } |
| | | |
| | | public void setParam9(Double param9) { |
| | | this.param9 = param9; |
| | | } |
| | | |
| | | public Double getParam10() { |
| | | return param10; |
| | | } |
| | | |
| | | public void setParam10(Double param10) { |
| | | this.param10 = param10; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * tb_leakage_monitoring |
| | | * @author |
| | | */ |
| | | @ApiModel |
| | | @Alias("LeakageMonitoring") |
| | | @TableName( schema = "`db_3.5mw_motor`",value = "tb_leakage_monitoring") |
| | | public class LeakageMonitoring implements Serializable { |
| | | private Long num; |
| | | |
| | | private Double param1; |
| | | |
| | | private Double param2; |
| | | |
| | | private Double param3; |
| | | |
| | | private Double param4; |
| | | |
| | | private Double param5; |
| | | |
| | | private Double param6; |
| | | |
| | | private Double param7; |
| | | |
| | | private Double param8; |
| | | |
| | | private Double param9; |
| | | |
| | | private Double param10; |
| | | |
| | | private String note; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public Long getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(Long num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public Double getParam1() { |
| | | return param1; |
| | | } |
| | | |
| | | public void setParam1(Double param1) { |
| | | this.param1 = param1; |
| | | } |
| | | |
| | | public Double getParam2() { |
| | | return param2; |
| | | } |
| | | |
| | | public void setParam2(Double param2) { |
| | | this.param2 = param2; |
| | | } |
| | | |
| | | public Double getParam3() { |
| | | return param3; |
| | | } |
| | | |
| | | public void setParam3(Double param3) { |
| | | this.param3 = param3; |
| | | } |
| | | |
| | | public Double getParam4() { |
| | | return param4; |
| | | } |
| | | |
| | | public void setParam4(Double param4) { |
| | | this.param4 = param4; |
| | | } |
| | | |
| | | public Double getParam5() { |
| | | return param5; |
| | | } |
| | | |
| | | public void setParam5(Double param5) { |
| | | this.param5 = param5; |
| | | } |
| | | |
| | | public Double getParam6() { |
| | | return param6; |
| | | } |
| | | |
| | | public void setParam6(Double param6) { |
| | | this.param6 = param6; |
| | | } |
| | | |
| | | public Double getParam7() { |
| | | return param7; |
| | | } |
| | | |
| | | public void setParam7(Double param7) { |
| | | this.param7 = param7; |
| | | } |
| | | |
| | | public Double getParam8() { |
| | | return param8; |
| | | } |
| | | |
| | | public void setParam8(Double param8) { |
| | | this.param8 = param8; |
| | | } |
| | | |
| | | public Double getParam9() { |
| | | return param9; |
| | | } |
| | | |
| | | public void setParam9(Double param9) { |
| | | this.param9 = param9; |
| | | } |
| | | |
| | | public Double getParam10() { |
| | | return param10; |
| | | } |
| | | |
| | | public void setParam10(Double param10) { |
| | | this.param10 = param10; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * tb_water_quality_monitoring |
| | | * 参数类型和具体名称后期修改 |
| | | */ |
| | | @ApiModel |
| | | @Alias("WaterQualityMonitoring") |
| | | @TableName( schema = "`db_3.5mw_motor`",value = "tb_water_quality_monitoring") |
| | | public class WaterQualityMonitoring implements Serializable { |
| | | private Long num; |
| | | |
| | | private Double param1; |
| | | |
| | | private Double param2; |
| | | |
| | | private Double param3; |
| | | |
| | | private Double param4; |
| | | |
| | | private Double param5; |
| | | |
| | | private Double param6; |
| | | |
| | | private Double param7; |
| | | |
| | | private Double param8; |
| | | |
| | | private Double param9; |
| | | |
| | | private Double param10; |
| | | |
| | | private String note; |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public Long getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(Long num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public Double getParam1() { |
| | | return param1; |
| | | } |
| | | |
| | | public void setParam1(Double param1) { |
| | | this.param1 = param1; |
| | | } |
| | | |
| | | public Double getParam2() { |
| | | return param2; |
| | | } |
| | | |
| | | public void setParam2(Double param2) { |
| | | this.param2 = param2; |
| | | } |
| | | |
| | | public Double getParam3() { |
| | | return param3; |
| | | } |
| | | |
| | | public void setParam3(Double param3) { |
| | | this.param3 = param3; |
| | | } |
| | | |
| | | public Double getParam4() { |
| | | return param4; |
| | | } |
| | | |
| | | public void setParam4(Double param4) { |
| | | this.param4 = param4; |
| | | } |
| | | |
| | | public Double getParam5() { |
| | | return param5; |
| | | } |
| | | |
| | | public void setParam5(Double param5) { |
| | | this.param5 = param5; |
| | | } |
| | | |
| | | public Double getParam6() { |
| | | return param6; |
| | | } |
| | | |
| | | public void setParam6(Double param6) { |
| | | this.param6 = param6; |
| | | } |
| | | |
| | | public Double getParam7() { |
| | | return param7; |
| | | } |
| | | |
| | | public void setParam7(Double param7) { |
| | | this.param7 = param7; |
| | | } |
| | | |
| | | public Double getParam8() { |
| | | return param8; |
| | | } |
| | | |
| | | public void setParam8(Double param8) { |
| | | this.param8 = param8; |
| | | } |
| | | |
| | | public Double getParam9() { |
| | | return param9; |
| | | } |
| | | |
| | | public void setParam9(Double param9) { |
| | | this.param9 = param9; |
| | | } |
| | | |
| | | public Double getParam10() { |
| | | return param10; |
| | | } |
| | | |
| | | public void setParam10(Double param10) { |
| | | this.param10 = param10; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.InsulationMonitoringMapper; |
| | | import com.whyc.pojo.InsulationMonitoring; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class InsulationMonitoringService { |
| | | |
| | | @Resource |
| | | private InsulationMonitoringMapper mapper; |
| | | |
| | | |
| | | public List<InsulationMonitoring> getAll() { |
| | | |
| | | return mapper.selectList(null); |
| | | } |
| | | |
| | | public Response<Object> getInsulationMonitoring() { |
| | | |
| | | InsulationMonitoring insulationMonitoring = mapper.selectOne(null); |
| | | Response<Object> response = new Response<>(); |
| | | response.set(1, insulationMonitoring); |
| | | return response; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.LeakageMonitoringMapper; |
| | | import com.whyc.pojo.LeakageMonitoring; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class LeakageMonitoringService { |
| | | |
| | | |
| | | @Resource |
| | | private LeakageMonitoringMapper mapper; |
| | | |
| | | |
| | | public List<LeakageMonitoring> getAll() { |
| | | |
| | | return mapper.selectList(null); |
| | | } |
| | | |
| | | public Response<Object> getLeakageMonitoring() { |
| | | |
| | | LeakageMonitoring leakageMonitoring = mapper.selectOne(null); |
| | | Response<Object> response = new Response<>(); |
| | | response.set(1, leakageMonitoring); |
| | | return response; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.WaterQualityMonitoringMapper; |
| | | import com.whyc.pojo.WaterQualityMonitoring; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class WaterQualityMonitoringService { |
| | | |
| | | |
| | | @Resource |
| | | private WaterQualityMonitoringMapper mapper; |
| | | |
| | | |
| | | public Response<Object> getAll() { |
| | | |
| | | List<WaterQualityMonitoring> list = mapper.selectList(null); |
| | | Response<Object> response = new Response<>(); |
| | | return response.set(1, list); |
| | | } |
| | | |
| | | public Response<Object> getWaterQuality() { |
| | | |
| | | WaterQualityMonitoring waterQualityMonitoring = mapper.selectOne(null); |
| | | Response<Object> response = new Response<>(); |
| | | return response.set(1, waterQualityMonitoring); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.InsulationMonitoringMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.InsulationMonitoring"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="param1" jdbcType="FLOAT" property="param1" /> |
| | | <result column="param2" jdbcType="FLOAT" property="param2" /> |
| | | <result column="param3" jdbcType="FLOAT" property="param3" /> |
| | | <result column="param4" jdbcType="FLOAT" property="param4" /> |
| | | <result column="param5" jdbcType="FLOAT" property="param5" /> |
| | | <result column="param6" jdbcType="FLOAT" property="param6" /> |
| | | <result column="param7" jdbcType="FLOAT" property="param7" /> |
| | | <result column="param8" jdbcType="FLOAT" property="param8" /> |
| | | <result column="param9" jdbcType="FLOAT" property="param9" /> |
| | | <result column="param10" jdbcType="FLOAT" property="param10" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, |
| | | note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_insulation_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_insulation_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.InsulationMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_insulation_monitoring (param1, param2, param3, |
| | | param4, param5, param6, param7, |
| | | param8, param9, param10, |
| | | note) |
| | | values (#{param1,jdbcType=FLOAT}, #{param2,jdbcType=FLOAT}, #{param3,jdbcType=FLOAT}, |
| | | #{param4,jdbcType=FLOAT}, #{param5,jdbcType=FLOAT}, #{param6,jdbcType=FLOAT}, #{param7,jdbcType=FLOAT}, |
| | | #{param8,jdbcType=FLOAT}, #{param9,jdbcType=FLOAT}, #{param10,jdbcType=FLOAT}, |
| | | #{note,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.InsulationMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_insulation_monitoring |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | param1, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.InsulationMonitoring"> |
| | | update tb_insulation_monitoring |
| | | <set> |
| | | <if test="param1 != null"> |
| | | param1 = #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.InsulationMonitoring"> |
| | | update tb_insulation_monitoring |
| | | set param1 = #{param1,jdbcType=FLOAT}, |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.LeakageMonitoringMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.LeakageMonitoring"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="param1" jdbcType="FLOAT" property="param1" /> |
| | | <result column="param2" jdbcType="FLOAT" property="param2" /> |
| | | <result column="param3" jdbcType="FLOAT" property="param3" /> |
| | | <result column="param4" jdbcType="FLOAT" property="param4" /> |
| | | <result column="param5" jdbcType="FLOAT" property="param5" /> |
| | | <result column="param6" jdbcType="FLOAT" property="param6" /> |
| | | <result column="param7" jdbcType="FLOAT" property="param7" /> |
| | | <result column="param8" jdbcType="FLOAT" property="param8" /> |
| | | <result column="param9" jdbcType="FLOAT" property="param9" /> |
| | | <result column="param10" jdbcType="FLOAT" property="param10" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, |
| | | note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_leakage_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_leakage_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.LeakageMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_leakage_monitoring (param1, param2, param3, |
| | | param4, param5, param6, param7, |
| | | param8, param9, param10, |
| | | note) |
| | | values (#{param1,jdbcType=FLOAT}, #{param2,jdbcType=FLOAT}, #{param3,jdbcType=FLOAT}, |
| | | #{param4,jdbcType=FLOAT}, #{param5,jdbcType=FLOAT}, #{param6,jdbcType=FLOAT}, #{param7,jdbcType=FLOAT}, |
| | | #{param8,jdbcType=FLOAT}, #{param9,jdbcType=FLOAT}, #{param10,jdbcType=FLOAT}, |
| | | #{note,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.LeakageMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_leakage_monitoring |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | param1, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.LeakageMonitoring"> |
| | | update tb_leakage_monitoring |
| | | <set> |
| | | <if test="param1 != null"> |
| | | param1 = #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.LeakageMonitoring"> |
| | | update tb_leakage_monitoring |
| | | set param1 = #{param1,jdbcType=FLOAT}, |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.WaterQualityMonitoringMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.WaterQualityMonitoring"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="param1" jdbcType="FLOAT" property="param1" /> |
| | | <result column="param2" jdbcType="FLOAT" property="param2" /> |
| | | <result column="param3" jdbcType="FLOAT" property="param3" /> |
| | | <result column="param4" jdbcType="FLOAT" property="param4" /> |
| | | <result column="param5" jdbcType="FLOAT" property="param5" /> |
| | | <result column="param6" jdbcType="FLOAT" property="param6" /> |
| | | <result column="param7" jdbcType="FLOAT" property="param7" /> |
| | | <result column="param8" jdbcType="FLOAT" property="param8" /> |
| | | <result column="param9" jdbcType="FLOAT" property="param9" /> |
| | | <result column="param10" jdbcType="FLOAT" property="param10" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, |
| | | note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_water_quality_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_water_quality_monitoring |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.WaterQualityMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_water_quality_monitoring (param1, param2, param3, |
| | | param4, param5, param6, param7, |
| | | param8, param9, param10, |
| | | note) |
| | | values (#{param1,jdbcType=FLOAT}, #{param2,jdbcType=FLOAT}, #{param3,jdbcType=FLOAT}, |
| | | #{param4,jdbcType=FLOAT}, #{param5,jdbcType=FLOAT}, #{param6,jdbcType=FLOAT}, #{param7,jdbcType=FLOAT}, |
| | | #{param8,jdbcType=FLOAT}, #{param9,jdbcType=FLOAT}, #{param10,jdbcType=FLOAT}, |
| | | #{note,jdbcType=VARCHAR}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.WaterQualityMonitoring" useGeneratedKeys="true"> |
| | | insert into tb_water_quality_monitoring |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | param1, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="param1 != null"> |
| | | #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.WaterQualityMonitoring"> |
| | | update tb_water_quality_monitoring |
| | | <set> |
| | | <if test="param1 != null"> |
| | | param1 = #{param1,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param2 != null"> |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param3 != null"> |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param4 != null"> |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param5 != null"> |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param6 != null"> |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param7 != null"> |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param8 != null"> |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param9 != null"> |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="param10 != null"> |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.WaterQualityMonitoring"> |
| | | update tb_water_quality_monitoring |
| | | set param1 = #{param1,jdbcType=FLOAT}, |
| | | param2 = #{param2,jdbcType=FLOAT}, |
| | | param3 = #{param3,jdbcType=FLOAT}, |
| | | param4 = #{param4,jdbcType=FLOAT}, |
| | | param5 = #{param5,jdbcType=FLOAT}, |
| | | param6 = #{param6,jdbcType=FLOAT}, |
| | | param7 = #{param7,jdbcType=FLOAT}, |
| | | param8 = #{param8,jdbcType=FLOAT}, |
| | | param9 = #{param9,jdbcType=FLOAT}, |
| | | param10 = #{param10,jdbcType=FLOAT}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |