正在显示
15 个修改的文件
包含
1077 行增加
和
94 行删除
1 | +package com.sunyo.energy.location.controller; | ||
2 | + | ||
3 | +import com.github.pagehelper.PageInfo; | ||
4 | +import com.sunyo.energy.location.controller.response.ResultJson; | ||
5 | +import com.sunyo.energy.location.model.PayRecords; | ||
6 | +import com.sunyo.energy.location.service.PayOrderService; | ||
7 | +import io.swagger.annotations.Api; | ||
8 | +import io.swagger.annotations.ApiOperation; | ||
9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
10 | +import org.springframework.web.bind.annotation.*; | ||
11 | + | ||
12 | +/** | ||
13 | + * Created by XYH on 2019/12/16. | ||
14 | + * 订单查询,新增,更新,删除 | ||
15 | + */ | ||
16 | +@Api(description = "订单管理") | ||
17 | +@RestController | ||
18 | +@RequestMapping("/order") | ||
19 | +public class PayOrderController { | ||
20 | + @Autowired | ||
21 | + PayOrderService payOrderService; | ||
22 | + | ||
23 | + | ||
24 | + @ApiOperation(value = "查询缴费订单") | ||
25 | + @RequestMapping("/list") | ||
26 | + public ResultJson<PageInfo> getOrder(){ | ||
27 | + return new ResultJson("200","wokao"); | ||
28 | + } | ||
29 | + | ||
30 | + | ||
31 | + @ApiOperation(value = "新增缴费订单") | ||
32 | + @PostMapping("/add") | ||
33 | + public ResultJson addOrder(@RequestBody PayRecords records){ | ||
34 | + int mgs=0; | ||
35 | + int result=payOrderService.addOrder(records); | ||
36 | + if(result>0){ | ||
37 | + mgs=1; | ||
38 | + } | ||
39 | + return mgs==1?new ResultJson("200","新增订单成功"):new ResultJson("500","新增订单失败"); | ||
40 | + } | ||
41 | + | ||
42 | + | ||
43 | + @ApiOperation(value = "更新缴费订单") | ||
44 | + @PutMapping("/edi") | ||
45 | + public ResultJson ediOrder(@RequestBody PayRecords records){ | ||
46 | + int mgs=0; | ||
47 | + int result=payOrderService.ediOrder(records); | ||
48 | + if(result>0){ | ||
49 | + mgs=1; | ||
50 | + } | ||
51 | + return mgs==1? new ResultJson("200","订单信息更新成功"):new ResultJson("500","订单信息更新失败"); | ||
52 | + } | ||
53 | + | ||
54 | + | ||
55 | + @ApiOperation(value = "删除缴费订单") | ||
56 | + @DeleteMapping("/del") | ||
57 | + public ResultJson delOrder(@RequestBody PayRecords payRecords){ | ||
58 | + int mgs=0; | ||
59 | + int result=payOrderService.delOrder(payRecords); | ||
60 | + if(result>0){ | ||
61 | + mgs=1; | ||
62 | + } | ||
63 | + return mgs==1? new ResultJson("200","订单信息删除成功"):new ResultJson("500","订单信息删除失败"); | ||
64 | + } | ||
65 | +} |
src/main/java/com/sunyo/energy/location/controller/WaterElectricityParameterController.java
0 → 100644
1 | +package com.sunyo.energy.location.controller; | ||
2 | + | ||
3 | +import com.sunyo.energy.location.controller.response.ResultJson; | ||
4 | +import com.sunyo.energy.location.model.WaterElectricityParameter; | ||
5 | +import com.sunyo.energy.location.service.WaterElectricityParameterService; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.stereotype.Controller; | ||
8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
9 | +import org.springframework.web.bind.annotation.RequestParam; | ||
10 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
11 | + | ||
12 | +import java.util.Date; | ||
13 | + | ||
14 | +@RequestMapping("/electricity_meter") | ||
15 | +@Controller | ||
16 | +public class WaterElectricityParameterController { | ||
17 | + | ||
18 | + @Autowired | ||
19 | + private WaterElectricityParameterService waterElectricityParameterService; | ||
20 | + | ||
21 | + | ||
22 | + /** | ||
23 | + * 电表参数配置 | ||
24 | + * | ||
25 | + */ | ||
26 | + @RequestMapping("/add") | ||
27 | + @ResponseBody | ||
28 | + public ResultJson eetParam(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){ | ||
29 | + | ||
30 | + try { | ||
31 | + if (waterElectricityParameterService.countOne(waterElectricityParameter.getEeId())>0){ | ||
32 | + resultJson.setCode("200"); | ||
33 | + return resultJson; | ||
34 | + }else { | ||
35 | + int i = waterElectricityParameterService.insertSelective(waterElectricityParameter); | ||
36 | + | ||
37 | + if (i>0){ | ||
38 | + resultJson.setCode("200"); | ||
39 | + resultJson.setMsg("添加成功"); | ||
40 | + return resultJson; | ||
41 | + }else { | ||
42 | + resultJson.setCode("500"); | ||
43 | + resultJson.setMsg("网络异常"); | ||
44 | + return resultJson; | ||
45 | + } | ||
46 | + } | ||
47 | + }catch (Exception e){ | ||
48 | + e.printStackTrace(); | ||
49 | + resultJson.setCode("500"); | ||
50 | + resultJson.setMsg("网络异常"); | ||
51 | + return resultJson; | ||
52 | + } | ||
53 | + | ||
54 | + } | ||
55 | + | ||
56 | + /** | ||
57 | + * 电表参数查询 | ||
58 | + */ | ||
59 | + @RequestMapping("/getEEModel") | ||
60 | + @ResponseBody | ||
61 | + public WaterElectricityParameter getEEModel(@RequestParam(value = "eeId", required = false) String eeId){ | ||
62 | + WaterElectricityParameter oneElectricity = waterElectricityParameterService.findOneElectricity(eeId); | ||
63 | + System.out.println("111"); | ||
64 | + return oneElectricity; | ||
65 | + | ||
66 | + } | ||
67 | + | ||
68 | + /** | ||
69 | + * 电表参数编辑 | ||
70 | + */ | ||
71 | + @RequestMapping("/edit") | ||
72 | + @ResponseBody | ||
73 | + public ResultJson edit(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){ | ||
74 | + | ||
75 | + try { | ||
76 | + if (waterElectricityParameterService.updateByPrimaryKeySelective(waterElectricityParameter)>0){ | ||
77 | + resultJson.setCode("200"); | ||
78 | + return resultJson; | ||
79 | + }else { | ||
80 | + resultJson.setCode("500"); | ||
81 | + resultJson.setMsg("网络异常"); | ||
82 | + return resultJson; | ||
83 | + } | ||
84 | + }catch (Exception e){ | ||
85 | + e.printStackTrace(); | ||
86 | + resultJson.setCode("500"); | ||
87 | + resultJson.setMsg("网络异常"); | ||
88 | + return resultJson; | ||
89 | + } | ||
90 | + } | ||
91 | + | ||
92 | +} |
1 | package com.sunyo.energy.location.controller; | 1 | package com.sunyo.energy.location.controller; |
2 | 2 | ||
3 | import com.sunyo.energy.location.controller.response.ResultJson; | 3 | import com.sunyo.energy.location.controller.response.ResultJson; |
4 | +import com.sunyo.energy.location.model.WaterElectricityParameter; | ||
4 | import com.sunyo.energy.location.model.WaterMeter; | 5 | import com.sunyo.energy.location.model.WaterMeter; |
5 | import com.sunyo.energy.location.service.WaterMeterService; | 6 | import com.sunyo.energy.location.service.WaterMeterService; |
6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
1 | +package com.sunyo.energy.location.dao; | ||
2 | + | ||
3 | +import com.sunyo.energy.location.model.PayRecords; | ||
4 | + | ||
5 | +public interface PayRecordsMapper { | ||
6 | + int deleteByPrimaryKey(Integer id); | ||
7 | + | ||
8 | + int insert(PayRecords record); | ||
9 | + | ||
10 | + int insertSelective(PayRecords record); | ||
11 | + | ||
12 | + PayRecords selectByPrimaryKey(Integer id); | ||
13 | + | ||
14 | + int updateByPrimaryKeySelective(PayRecords record); | ||
15 | + | ||
16 | + int updateByPrimaryKey(PayRecords record); | ||
17 | +} |
@@ -14,4 +14,8 @@ public interface WaterElectricityParameterMapper { | @@ -14,4 +14,8 @@ public interface WaterElectricityParameterMapper { | ||
14 | int updateByPrimaryKeySelective(WaterElectricityParameter record); | 14 | int updateByPrimaryKeySelective(WaterElectricityParameter record); |
15 | 15 | ||
16 | int updateByPrimaryKey(WaterElectricityParameter record); | 16 | int updateByPrimaryKey(WaterElectricityParameter record); |
17 | + | ||
18 | + int countOne(String eeId); | ||
19 | + | ||
20 | + WaterElectricityParameter findOneElectricity(String eeId); | ||
17 | } | 21 | } |
1 | +package com.sunyo.energy.location.model; | ||
2 | + | ||
3 | +import java.util.Date; | ||
4 | + | ||
5 | +public class PayRecords { | ||
6 | + private Integer id; | ||
7 | + | ||
8 | + private Long payfees; | ||
9 | + | ||
10 | + private Integer payuserid; | ||
11 | + | ||
12 | + private Date paytime; | ||
13 | + | ||
14 | + private Integer paylocationid; | ||
15 | + | ||
16 | + private Boolean paystatus; | ||
17 | + | ||
18 | + private Boolean paytype; | ||
19 | + | ||
20 | + private Boolean payfesstype; | ||
21 | + | ||
22 | + private String ordernumber; | ||
23 | + | ||
24 | + private String reamke1; | ||
25 | + | ||
26 | + private String reamke2; | ||
27 | + | ||
28 | + private String reamke3; | ||
29 | + | ||
30 | + private String reamke4; | ||
31 | + | ||
32 | + private String payusername; | ||
33 | + | ||
34 | + private String paylocationname; | ||
35 | + | ||
36 | + private String paytypeaddress; | ||
37 | + | ||
38 | + public Integer getId() { | ||
39 | + return id; | ||
40 | + } | ||
41 | + | ||
42 | + public void setId(Integer id) { | ||
43 | + this.id = id; | ||
44 | + } | ||
45 | + | ||
46 | + public Long getPayfees() { | ||
47 | + return payfees; | ||
48 | + } | ||
49 | + | ||
50 | + public void setPayfees(Long payfees) { | ||
51 | + this.payfees = payfees; | ||
52 | + } | ||
53 | + | ||
54 | + public Integer getPayuserid() { | ||
55 | + return payuserid; | ||
56 | + } | ||
57 | + | ||
58 | + public void setPayuserid(Integer payuserid) { | ||
59 | + this.payuserid = payuserid; | ||
60 | + } | ||
61 | + | ||
62 | + public Date getPaytime() { | ||
63 | + return paytime; | ||
64 | + } | ||
65 | + | ||
66 | + public void setPaytime(Date paytime) { | ||
67 | + this.paytime = paytime; | ||
68 | + } | ||
69 | + | ||
70 | + public Integer getPaylocationid() { | ||
71 | + return paylocationid; | ||
72 | + } | ||
73 | + | ||
74 | + public void setPaylocationid(Integer paylocationid) { | ||
75 | + this.paylocationid = paylocationid; | ||
76 | + } | ||
77 | + | ||
78 | + public Boolean getPaystatus() { | ||
79 | + return paystatus; | ||
80 | + } | ||
81 | + | ||
82 | + public void setPaystatus(Boolean paystatus) { | ||
83 | + this.paystatus = paystatus; | ||
84 | + } | ||
85 | + | ||
86 | + public Boolean getPaytype() { | ||
87 | + return paytype; | ||
88 | + } | ||
89 | + | ||
90 | + public void setPaytype(Boolean paytype) { | ||
91 | + this.paytype = paytype; | ||
92 | + } | ||
93 | + | ||
94 | + public Boolean getPayfesstype() { | ||
95 | + return payfesstype; | ||
96 | + } | ||
97 | + | ||
98 | + public void setPayfesstype(Boolean payfesstype) { | ||
99 | + this.payfesstype = payfesstype; | ||
100 | + } | ||
101 | + | ||
102 | + public String getOrdernumber() { | ||
103 | + return ordernumber; | ||
104 | + } | ||
105 | + | ||
106 | + public void setOrdernumber(String ordernumber) { | ||
107 | + this.ordernumber = ordernumber == null ? null : ordernumber.trim(); | ||
108 | + } | ||
109 | + | ||
110 | + public String getReamke1() { | ||
111 | + return reamke1; | ||
112 | + } | ||
113 | + | ||
114 | + public void setReamke1(String reamke1) { | ||
115 | + this.reamke1 = reamke1 == null ? null : reamke1.trim(); | ||
116 | + } | ||
117 | + | ||
118 | + public String getReamke2() { | ||
119 | + return reamke2; | ||
120 | + } | ||
121 | + | ||
122 | + public void setReamke2(String reamke2) { | ||
123 | + this.reamke2 = reamke2 == null ? null : reamke2.trim(); | ||
124 | + } | ||
125 | + | ||
126 | + public String getReamke3() { | ||
127 | + return reamke3; | ||
128 | + } | ||
129 | + | ||
130 | + public void setReamke3(String reamke3) { | ||
131 | + this.reamke3 = reamke3 == null ? null : reamke3.trim(); | ||
132 | + } | ||
133 | + | ||
134 | + public String getReamke4() { | ||
135 | + return reamke4; | ||
136 | + } | ||
137 | + | ||
138 | + public void setReamke4(String reamke4) { | ||
139 | + this.reamke4 = reamke4 == null ? null : reamke4.trim(); | ||
140 | + } | ||
141 | + | ||
142 | + public String getPayusername() { | ||
143 | + return payusername; | ||
144 | + } | ||
145 | + | ||
146 | + public void setPayusername(String payusername) { | ||
147 | + this.payusername = payusername == null ? null : payusername.trim(); | ||
148 | + } | ||
149 | + | ||
150 | + public String getPaylocationname() { | ||
151 | + return paylocationname; | ||
152 | + } | ||
153 | + | ||
154 | + public void setPaylocationname(String paylocationname) { | ||
155 | + this.paylocationname = paylocationname == null ? null : paylocationname.trim(); | ||
156 | + } | ||
157 | + | ||
158 | + public String getPaytypeaddress() { | ||
159 | + return paytypeaddress; | ||
160 | + } | ||
161 | + | ||
162 | + public void setPaytypeaddress(String paytypeaddress) { | ||
163 | + this.paytypeaddress = paytypeaddress == null ? null : paytypeaddress.trim(); | ||
164 | + } | ||
165 | +} |
@@ -15,7 +15,7 @@ public class WaterElectricityParameter { | @@ -15,7 +15,7 @@ public class WaterElectricityParameter { | ||
15 | 15 | ||
16 | private Long overdraftthreshold; | 16 | private Long overdraftthreshold; |
17 | 17 | ||
18 | - private Boolean load; | 18 | + private Boolean waterload; |
19 | 19 | ||
20 | private Long water; | 20 | private Long water; |
21 | 21 | ||
@@ -87,12 +87,12 @@ public class WaterElectricityParameter { | @@ -87,12 +87,12 @@ public class WaterElectricityParameter { | ||
87 | this.overdraftthreshold = overdraftthreshold; | 87 | this.overdraftthreshold = overdraftthreshold; |
88 | } | 88 | } |
89 | 89 | ||
90 | - public Boolean getLoad() { | ||
91 | - return load; | 90 | + public Boolean getWaterload() { |
91 | + return waterload; | ||
92 | } | 92 | } |
93 | 93 | ||
94 | - public void setLoad(Boolean load) { | ||
95 | - this.load = load; | 94 | + public void setWaterload(Boolean waterload) { |
95 | + this.waterload = waterload; | ||
96 | } | 96 | } |
97 | 97 | ||
98 | public Long getWater() { | 98 | public Long getWater() { |
1 | +package com.sunyo.energy.location.service; | ||
2 | + | ||
3 | +import com.github.pagehelper.PageInfo; | ||
4 | +import com.sunyo.energy.location.model.PayRecords; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by XYH on 2019/12/16. | ||
8 | + */ | ||
9 | +public interface PayOrderService { | ||
10 | + PageInfo<PayRecords> getOrder(PayRecords payRecords, int currentPage, int pageSize); | ||
11 | + int addOrder(PayRecords payRecords); | ||
12 | + int ediOrder(PayRecords payRecords); | ||
13 | + int delOrder(PayRecords payRecords); | ||
14 | +} |
1 | +package com.sunyo.energy.location.service; | ||
2 | + | ||
3 | +import com.sunyo.energy.location.model.WaterElectricityParameter; | ||
4 | + | ||
5 | +public interface WaterElectricityParameterService { | ||
6 | + | ||
7 | + int insertSelective(WaterElectricityParameter record); | ||
8 | + | ||
9 | + int updateByPrimaryKeySelective(WaterElectricityParameter record); | ||
10 | + | ||
11 | + int countOne(String eeId); | ||
12 | + | ||
13 | + WaterElectricityParameter findOneElectricity(String eeId); | ||
14 | + | ||
15 | +} |
1 | +package com.sunyo.energy.location.service.imp; | ||
2 | + | ||
3 | +import com.github.pagehelper.PageInfo; | ||
4 | +import com.sunyo.energy.location.dao.PayRecordsMapper; | ||
5 | +import com.sunyo.energy.location.model.PayRecords; | ||
6 | +import com.sunyo.energy.location.service.PayOrderService; | ||
7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
8 | +import org.springframework.stereotype.Service; | ||
9 | + | ||
10 | +/** | ||
11 | + * Created by XYH on 2019/12/16. | ||
12 | + */ | ||
13 | +@Service | ||
14 | +public class PayOrderImpl implements PayOrderService { | ||
15 | + @Autowired | ||
16 | + PayRecordsMapper recordsMapper; | ||
17 | + @Override | ||
18 | + public PageInfo<PayRecords> getOrder(PayRecords payRecords, int currentPage, int pageSize) { | ||
19 | + return null; | ||
20 | + } | ||
21 | + | ||
22 | + @Override | ||
23 | + public int addOrder(PayRecords payRecords) { | ||
24 | + return recordsMapper.insert(payRecords); | ||
25 | + } | ||
26 | + | ||
27 | + @Override | ||
28 | + public int ediOrder(PayRecords payRecords) { | ||
29 | + return recordsMapper.updateByPrimaryKey(payRecords); | ||
30 | + } | ||
31 | + | ||
32 | + @Override | ||
33 | + public int delOrder(PayRecords payRecords) { | ||
34 | + return recordsMapper.deleteByPrimaryKey(payRecords.getId()); | ||
35 | + } | ||
36 | +} |
src/main/java/com/sunyo/energy/location/service/imp/WaterElectricityParameterServiceImp.java
0 → 100644
1 | +package com.sunyo.energy.location.service.imp; | ||
2 | + | ||
3 | +import com.sunyo.energy.location.controller.response.ResultJson; | ||
4 | +import com.sunyo.energy.location.dao.WaterElectricityParameterMapper; | ||
5 | +import com.sunyo.energy.location.model.WaterElectricityParameter; | ||
6 | +import com.sunyo.energy.location.service.WaterElectricityParameterService; | ||
7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
8 | +import org.springframework.stereotype.Service; | ||
9 | + | ||
10 | +import java.util.Date; | ||
11 | + | ||
12 | +@Service | ||
13 | +public class WaterElectricityParameterServiceImp implements WaterElectricityParameterService { | ||
14 | + | ||
15 | + @Autowired | ||
16 | + private WaterElectricityParameterMapper waterElectricityParameterMapper; | ||
17 | + | ||
18 | + @Override | ||
19 | + public int insertSelective(WaterElectricityParameter record) { | ||
20 | + | ||
21 | + record.setCreattime(new Date()); | ||
22 | + return waterElectricityParameterMapper.insertSelective(record); | ||
23 | + } | ||
24 | + | ||
25 | + @Override | ||
26 | + public int updateByPrimaryKeySelective(WaterElectricityParameter record) { | ||
27 | + | ||
28 | + return waterElectricityParameterMapper.updateByPrimaryKeySelective(record); | ||
29 | + } | ||
30 | + | ||
31 | + @Override | ||
32 | + public int countOne(String eeId) { | ||
33 | + return waterElectricityParameterMapper.countOne(eeId); | ||
34 | + } | ||
35 | + | ||
36 | + @Override | ||
37 | + public WaterElectricityParameter findOneElectricity(String eeId) { | ||
38 | + try { | ||
39 | + return waterElectricityParameterMapper.findOneElectricity(eeId); | ||
40 | + }catch (Exception e){ | ||
41 | + return null; | ||
42 | + } | ||
43 | + } | ||
44 | +} |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | -<mapper namespace="com.sunyo.energy.location.dao.LocationMapper" > | ||
4 | - <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.Location" > | ||
5 | - <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | - <result column="adrName" property="adrname" jdbcType="VARCHAR" /> | ||
7 | - <result column="parent" property="parent" jdbcType="INTEGER" /> | ||
8 | - <result column="type" property="type" jdbcType="INTEGER" /> | ||
9 | - <collection property="children" select="selectAll" column="id"></collection> | ||
10 | - </resultMap> | ||
11 | - <sql id="Base_Column_List" > | ||
12 | - id, adrName, parent, type | ||
13 | - </sql> | ||
14 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
15 | - select | ||
16 | - <include refid="Base_Column_List" /> | ||
17 | - from location | ||
18 | - where id = #{id,jdbcType=INTEGER} | ||
19 | - </select> | ||
20 | - <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
21 | - select | ||
22 | - * | ||
23 | - from location | ||
24 | - where parent = #{parent,jdbcType=INTEGER} | ||
25 | - </select> | ||
26 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
27 | - delete from location | ||
28 | - where id = #{id,jdbcType=INTEGER} | ||
29 | - </delete> | ||
30 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.Location" > | ||
31 | - insert into location (id, adrName, parent, | ||
32 | - type) | ||
33 | - values (#{id,jdbcType=INTEGER}, #{adrname,jdbcType=VARCHAR}, #{parent,jdbcType=INTEGER}, | ||
34 | - #{type,jdbcType=INTEGER}) | ||
35 | - </insert> | ||
36 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.Location" > | ||
37 | - insert into location | ||
38 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
39 | - <if test="id != null" > | ||
40 | - id, | ||
41 | - </if> | ||
42 | - <if test="adrname != null" > | ||
43 | - adrName, | ||
44 | - </if> | ||
45 | - <if test="parent != null" > | ||
46 | - parent, | ||
47 | - </if> | ||
48 | - <if test="type != null" > | ||
49 | - type, | ||
50 | - </if> | ||
51 | - </trim> | ||
52 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
53 | - <if test="id != null" > | ||
54 | - #{id,jdbcType=INTEGER}, | ||
55 | - </if> | ||
56 | - <if test="adrname != null" > | ||
57 | - #{adrname,jdbcType=VARCHAR}, | ||
58 | - </if> | ||
59 | - <if test="parent != null" > | ||
60 | - #{parent,jdbcType=INTEGER}, | ||
61 | - </if> | ||
62 | - <if test="type != null" > | ||
63 | - #{type,jdbcType=INTEGER}, | ||
64 | - </if> | ||
65 | - </trim> | ||
66 | - </insert> | ||
67 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.Location" > | ||
68 | - update location | ||
69 | - <set > | ||
70 | - <if test="adrname != null" > | ||
71 | - adrName = #{adrname,jdbcType=VARCHAR}, | ||
72 | - </if> | ||
73 | - <if test="parent != null" > | ||
74 | - parent = #{parent,jdbcType=INTEGER}, | ||
75 | - </if> | ||
76 | - <if test="type != null" > | ||
77 | - type = #{type,jdbcType=INTEGER}, | ||
78 | - </if> | ||
79 | - </set> | ||
80 | - where id = #{id,jdbcType=INTEGER} | ||
81 | - </update> | ||
82 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.Location" > | ||
83 | - update location | ||
84 | - set adrName = #{adrname,jdbcType=VARCHAR}, | ||
85 | - parent = #{parent,jdbcType=INTEGER}, | ||
86 | - type = #{type,jdbcType=INTEGER} | ||
87 | - where id = #{id,jdbcType=INTEGER} | ||
88 | - </update> | ||
89 | -</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.sunyo.energy.location.dao.PayRecordsMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.PayRecords" > | ||
5 | + <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="payFees" property="payfees" jdbcType="DECIMAL" /> | ||
7 | + <result column="payUserId" property="payuserid" jdbcType="INTEGER" /> | ||
8 | + <result column="payTime" property="paytime" jdbcType="TIMESTAMP" /> | ||
9 | + <result column="payLocationId" property="paylocationid" jdbcType="INTEGER" /> | ||
10 | + <result column="payStatus" property="paystatus" jdbcType="BIT" /> | ||
11 | + <result column="payType" property="paytype" jdbcType="BIT" /> | ||
12 | + <result column="payFessType" property="payfesstype" jdbcType="BIT" /> | ||
13 | + <result column="orderNumber" property="ordernumber" jdbcType="VARCHAR" /> | ||
14 | + <result column="reamke1" property="reamke1" jdbcType="VARCHAR" /> | ||
15 | + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" /> | ||
16 | + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" /> | ||
17 | + <result column="reamke4" property="reamke4" jdbcType="VARCHAR" /> | ||
18 | + <result column="payUserName" property="payusername" jdbcType="VARCHAR" /> | ||
19 | + <result column="payLocationName" property="paylocationname" jdbcType="VARCHAR" /> | ||
20 | + <result column="payTypeAddress" property="paytypeaddress" jdbcType="VARCHAR" /> | ||
21 | + </resultMap> | ||
22 | + <sql id="Base_Column_List" > | ||
23 | + id, payFees, payUserId, payTime, payLocationId, payStatus, payType, payFessType, | ||
24 | + orderNumber, reamke1, reamke2, reamke3, reamke4, payUserName, payLocationName, payTypeAddress | ||
25 | + </sql> | ||
26 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
27 | + select | ||
28 | + <include refid="Base_Column_List" /> | ||
29 | + from pay_records | ||
30 | + where id = #{id,jdbcType=INTEGER} | ||
31 | + </select> | ||
32 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
33 | + delete from pay_records | ||
34 | + where id = #{id,jdbcType=INTEGER} | ||
35 | + </delete> | ||
36 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords" > | ||
37 | + insert into pay_records (id, payFees, payUserId, | ||
38 | + payTime, payLocationId, payStatus, | ||
39 | + payType, payFessType, orderNumber, | ||
40 | + reamke1, reamke2, reamke3, | ||
41 | + reamke4, payUserName, payLocationName, | ||
42 | + payTypeAddress) | ||
43 | + values (#{id,jdbcType=INTEGER}, #{payfees,jdbcType=DECIMAL}, #{payuserid,jdbcType=INTEGER}, | ||
44 | + #{paytime,jdbcType=TIMESTAMP}, #{paylocationid,jdbcType=INTEGER}, #{paystatus,jdbcType=BIT}, | ||
45 | + #{paytype,jdbcType=BIT}, #{payfesstype,jdbcType=BIT}, #{ordernumber,jdbcType=VARCHAR}, | ||
46 | + #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR}, | ||
47 | + #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR}, | ||
48 | + #{paytypeaddress,jdbcType=VARCHAR}) | ||
49 | + </insert> | ||
50 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayRecords" > | ||
51 | + insert into pay_records | ||
52 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
53 | + <if test="id != null" > | ||
54 | + id, | ||
55 | + </if> | ||
56 | + <if test="payfees != null" > | ||
57 | + payFees, | ||
58 | + </if> | ||
59 | + <if test="payuserid != null" > | ||
60 | + payUserId, | ||
61 | + </if> | ||
62 | + <if test="paytime != null" > | ||
63 | + payTime, | ||
64 | + </if> | ||
65 | + <if test="paylocationid != null" > | ||
66 | + payLocationId, | ||
67 | + </if> | ||
68 | + <if test="paystatus != null" > | ||
69 | + payStatus, | ||
70 | + </if> | ||
71 | + <if test="paytype != null" > | ||
72 | + payType, | ||
73 | + </if> | ||
74 | + <if test="payfesstype != null" > | ||
75 | + payFessType, | ||
76 | + </if> | ||
77 | + <if test="ordernumber != null" > | ||
78 | + orderNumber, | ||
79 | + </if> | ||
80 | + <if test="reamke1 != null" > | ||
81 | + reamke1, | ||
82 | + </if> | ||
83 | + <if test="reamke2 != null" > | ||
84 | + reamke2, | ||
85 | + </if> | ||
86 | + <if test="reamke3 != null" > | ||
87 | + reamke3, | ||
88 | + </if> | ||
89 | + <if test="reamke4 != null" > | ||
90 | + reamke4, | ||
91 | + </if> | ||
92 | + <if test="payusername != null" > | ||
93 | + payUserName, | ||
94 | + </if> | ||
95 | + <if test="paylocationname != null" > | ||
96 | + payLocationName, | ||
97 | + </if> | ||
98 | + <if test="paytypeaddress != null" > | ||
99 | + payTypeAddress, | ||
100 | + </if> | ||
101 | + </trim> | ||
102 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
103 | + <if test="id != null" > | ||
104 | + #{id,jdbcType=INTEGER}, | ||
105 | + </if> | ||
106 | + <if test="payfees != null" > | ||
107 | + #{payfees,jdbcType=DECIMAL}, | ||
108 | + </if> | ||
109 | + <if test="payuserid != null" > | ||
110 | + #{payuserid,jdbcType=INTEGER}, | ||
111 | + </if> | ||
112 | + <if test="paytime != null" > | ||
113 | + #{paytime,jdbcType=TIMESTAMP}, | ||
114 | + </if> | ||
115 | + <if test="paylocationid != null" > | ||
116 | + #{paylocationid,jdbcType=INTEGER}, | ||
117 | + </if> | ||
118 | + <if test="paystatus != null" > | ||
119 | + #{paystatus,jdbcType=BIT}, | ||
120 | + </if> | ||
121 | + <if test="paytype != null" > | ||
122 | + #{paytype,jdbcType=BIT}, | ||
123 | + </if> | ||
124 | + <if test="payfesstype != null" > | ||
125 | + #{payfesstype,jdbcType=BIT}, | ||
126 | + </if> | ||
127 | + <if test="ordernumber != null" > | ||
128 | + #{ordernumber,jdbcType=VARCHAR}, | ||
129 | + </if> | ||
130 | + <if test="reamke1 != null" > | ||
131 | + #{reamke1,jdbcType=VARCHAR}, | ||
132 | + </if> | ||
133 | + <if test="reamke2 != null" > | ||
134 | + #{reamke2,jdbcType=VARCHAR}, | ||
135 | + </if> | ||
136 | + <if test="reamke3 != null" > | ||
137 | + #{reamke3,jdbcType=VARCHAR}, | ||
138 | + </if> | ||
139 | + <if test="reamke4 != null" > | ||
140 | + #{reamke4,jdbcType=VARCHAR}, | ||
141 | + </if> | ||
142 | + <if test="payusername != null" > | ||
143 | + #{payusername,jdbcType=VARCHAR}, | ||
144 | + </if> | ||
145 | + <if test="paylocationname != null" > | ||
146 | + #{paylocationname,jdbcType=VARCHAR}, | ||
147 | + </if> | ||
148 | + <if test="paytypeaddress != null" > | ||
149 | + #{paytypeaddress,jdbcType=VARCHAR}, | ||
150 | + </if> | ||
151 | + </trim> | ||
152 | + </insert> | ||
153 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayRecords" > | ||
154 | + update pay_records | ||
155 | + <set > | ||
156 | + <if test="payfees != null" > | ||
157 | + payFees = #{payfees,jdbcType=DECIMAL}, | ||
158 | + </if> | ||
159 | + <if test="payuserid != null" > | ||
160 | + payUserId = #{payuserid,jdbcType=INTEGER}, | ||
161 | + </if> | ||
162 | + <if test="paytime != null" > | ||
163 | + payTime = #{paytime,jdbcType=TIMESTAMP}, | ||
164 | + </if> | ||
165 | + <if test="paylocationid != null" > | ||
166 | + payLocationId = #{paylocationid,jdbcType=INTEGER}, | ||
167 | + </if> | ||
168 | + <if test="paystatus != null" > | ||
169 | + payStatus = #{paystatus,jdbcType=BIT}, | ||
170 | + </if> | ||
171 | + <if test="paytype != null" > | ||
172 | + payType = #{paytype,jdbcType=BIT}, | ||
173 | + </if> | ||
174 | + <if test="payfesstype != null" > | ||
175 | + payFessType = #{payfesstype,jdbcType=BIT}, | ||
176 | + </if> | ||
177 | + <if test="ordernumber != null" > | ||
178 | + orderNumber = #{ordernumber,jdbcType=VARCHAR}, | ||
179 | + </if> | ||
180 | + <if test="reamke1 != null" > | ||
181 | + reamke1 = #{reamke1,jdbcType=VARCHAR}, | ||
182 | + </if> | ||
183 | + <if test="reamke2 != null" > | ||
184 | + reamke2 = #{reamke2,jdbcType=VARCHAR}, | ||
185 | + </if> | ||
186 | + <if test="reamke3 != null" > | ||
187 | + reamke3 = #{reamke3,jdbcType=VARCHAR}, | ||
188 | + </if> | ||
189 | + <if test="reamke4 != null" > | ||
190 | + reamke4 = #{reamke4,jdbcType=VARCHAR}, | ||
191 | + </if> | ||
192 | + <if test="payusername != null" > | ||
193 | + payUserName = #{payusername,jdbcType=VARCHAR}, | ||
194 | + </if> | ||
195 | + <if test="paylocationname != null" > | ||
196 | + payLocationName = #{paylocationname,jdbcType=VARCHAR}, | ||
197 | + </if> | ||
198 | + <if test="paytypeaddress != null" > | ||
199 | + payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}, | ||
200 | + </if> | ||
201 | + </set> | ||
202 | + where id = #{id,jdbcType=INTEGER} | ||
203 | + </update> | ||
204 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords" > | ||
205 | + update pay_records | ||
206 | + set payFees = #{payfees,jdbcType=DECIMAL}, | ||
207 | + payUserId = #{payuserid,jdbcType=INTEGER}, | ||
208 | + payTime = #{paytime,jdbcType=TIMESTAMP}, | ||
209 | + payLocationId = #{paylocationid,jdbcType=INTEGER}, | ||
210 | + payStatus = #{paystatus,jdbcType=BIT}, | ||
211 | + payType = #{paytype,jdbcType=BIT}, | ||
212 | + payFessType = #{payfesstype,jdbcType=BIT}, | ||
213 | + orderNumber = #{ordernumber,jdbcType=VARCHAR}, | ||
214 | + reamke1 = #{reamke1,jdbcType=VARCHAR}, | ||
215 | + reamke2 = #{reamke2,jdbcType=VARCHAR}, | ||
216 | + reamke3 = #{reamke3,jdbcType=VARCHAR}, | ||
217 | + reamke4 = #{reamke4,jdbcType=VARCHAR}, | ||
218 | + payUserName = #{payusername,jdbcType=VARCHAR}, | ||
219 | + payLocationName = #{paylocationname,jdbcType=VARCHAR}, | ||
220 | + payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR} | ||
221 | + where id = #{id,jdbcType=INTEGER} | ||
222 | + </update> | ||
223 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.sunyo.energy.location.dao.WaterElectricityParameterMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.WaterElectricityParameter" > | ||
5 | + <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="prepaid" property="prepaid" jdbcType="BIT" /> | ||
7 | + <result column="warningTrip" property="warningtrip" jdbcType="BIT" /> | ||
8 | + <result column="warningThreshold" property="warningthreshold" jdbcType="DECIMAL" /> | ||
9 | + <result column="overdraft" property="overdraft" jdbcType="BIT" /> | ||
10 | + <result column="overdraftThreshold" property="overdraftthreshold" jdbcType="DECIMAL" /> | ||
11 | + <result column="waterLoad" property="waterload" jdbcType="BIT" /> | ||
12 | + <result column="water" property="water" jdbcType="DECIMAL" /> | ||
13 | + <result column="power" property="power" jdbcType="DECIMAL" /> | ||
14 | + <result column="powerFactor" property="powerfactor" jdbcType="VARCHAR" /> | ||
15 | + <result column="free" property="free" jdbcType="BIT" /> | ||
16 | + <result column="freeElectricityLimit" property="freeelectricitylimit" jdbcType="DECIMAL" /> | ||
17 | + <result column="freeWater" property="freewater" jdbcType="VARCHAR" /> | ||
18 | + <result column="wm_id" property="wmId" jdbcType="VARCHAR" /> | ||
19 | + <result column="creatTime" property="creattime" jdbcType="TIMESTAMP" /> | ||
20 | + <result column="ee_id" property="eeId" jdbcType="VARCHAR" /> | ||
21 | + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" /> | ||
22 | + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" /> | ||
23 | + </resultMap> | ||
24 | + <sql id="Base_Column_List" > | ||
25 | + id, prepaid, warningTrip, warningThreshold, overdraft, overdraftThreshold, waterLoad, | ||
26 | + water, power, powerFactor, free, freeElectricityLimit, freeWater, wm_id, creatTime, | ||
27 | + ee_id, reamke2, reamke3 | ||
28 | + </sql> | ||
29 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
30 | + select | ||
31 | + <include refid="Base_Column_List" /> | ||
32 | + from water_electricity_parameter | ||
33 | + where id = #{id,jdbcType=INTEGER} | ||
34 | + </select> | ||
35 | + | ||
36 | + <select id="countOne" parameterType="java.lang.String" resultType="int"> | ||
37 | + select count(*) from water_electricity_parameter where ee_id=#{value, jdbcType=VARCHAR} | ||
38 | + </select> | ||
39 | + <select id="findOneElectricity" resultMap="BaseResultMap" parameterType="java.lang.String"> | ||
40 | + select | ||
41 | + <include refid="Base_Column_List"/> | ||
42 | + from water_electricity_parameter where ee_id = #{value,jdbcType=VARCHAR} | ||
43 | + </select> | ||
44 | + | ||
45 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
46 | + delete from water_electricity_parameter | ||
47 | + where id = #{id,jdbcType=INTEGER} | ||
48 | + </delete> | ||
49 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | ||
50 | + insert into water_electricity_parameter (id, prepaid, warningTrip, | ||
51 | + warningThreshold, overdraft, overdraftThreshold, | ||
52 | + waterLoad, water, power, | ||
53 | + powerFactor, free, freeElectricityLimit, | ||
54 | + freeWater, wm_id, creatTime, | ||
55 | + ee_id, reamke2, reamke3 | ||
56 | + ) | ||
57 | + values (#{id,jdbcType=INTEGER}, #{prepaid,jdbcType=BIT}, #{warningtrip,jdbcType=BIT}, | ||
58 | + #{warningthreshold,jdbcType=DECIMAL}, #{overdraft,jdbcType=BIT}, #{overdraftthreshold,jdbcType=DECIMAL}, | ||
59 | + #{waterload,jdbcType=BIT}, #{water,jdbcType=DECIMAL}, #{power,jdbcType=DECIMAL}, | ||
60 | + #{powerfactor,jdbcType=VARCHAR}, #{free,jdbcType=BIT}, #{freeelectricitylimit,jdbcType=DECIMAL}, | ||
61 | + #{freewater,jdbcType=VARCHAR}, #{wmId,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP}, | ||
62 | + #{eeId,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR} | ||
63 | + ) | ||
64 | + </insert> | ||
65 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | ||
66 | + insert into water_electricity_parameter | ||
67 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
68 | + <if test="id != null" > | ||
69 | + id, | ||
70 | + </if> | ||
71 | + <if test="prepaid != null" > | ||
72 | + prepaid, | ||
73 | + </if> | ||
74 | + <if test="warningtrip != null" > | ||
75 | + warningTrip, | ||
76 | + </if> | ||
77 | + <if test="warningthreshold != null" > | ||
78 | + warningThreshold, | ||
79 | + </if> | ||
80 | + <if test="overdraft != null" > | ||
81 | + overdraft, | ||
82 | + </if> | ||
83 | + <if test="overdraftthreshold != null" > | ||
84 | + overdraftThreshold, | ||
85 | + </if> | ||
86 | + <if test="waterload != null" > | ||
87 | + waterLoad, | ||
88 | + </if> | ||
89 | + <if test="water != null" > | ||
90 | + water, | ||
91 | + </if> | ||
92 | + <if test="power != null" > | ||
93 | + power, | ||
94 | + </if> | ||
95 | + <if test="powerfactor != null" > | ||
96 | + powerFactor, | ||
97 | + </if> | ||
98 | + <if test="free != null" > | ||
99 | + free, | ||
100 | + </if> | ||
101 | + <if test="freeelectricitylimit != null" > | ||
102 | + freeElectricityLimit, | ||
103 | + </if> | ||
104 | + <if test="freewater != null" > | ||
105 | + freeWater, | ||
106 | + </if> | ||
107 | + <if test="wmId != null" > | ||
108 | + wm_id, | ||
109 | + </if> | ||
110 | + <if test="creattime != null" > | ||
111 | + creatTime, | ||
112 | + </if> | ||
113 | + <if test="eeId != null" > | ||
114 | + ee_id, | ||
115 | + </if> | ||
116 | + <if test="reamke2 != null" > | ||
117 | + reamke2, | ||
118 | + </if> | ||
119 | + <if test="reamke3 != null" > | ||
120 | + reamke3, | ||
121 | + </if> | ||
122 | + </trim> | ||
123 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
124 | + <if test="id != null" > | ||
125 | + #{id,jdbcType=INTEGER}, | ||
126 | + </if> | ||
127 | + <if test="prepaid != null" > | ||
128 | + #{prepaid,jdbcType=BIT}, | ||
129 | + </if> | ||
130 | + <if test="warningtrip != null" > | ||
131 | + #{warningtrip,jdbcType=BIT}, | ||
132 | + </if> | ||
133 | + <if test="warningthreshold != null" > | ||
134 | + #{warningthreshold,jdbcType=DECIMAL}, | ||
135 | + </if> | ||
136 | + <if test="overdraft != null" > | ||
137 | + #{overdraft,jdbcType=BIT}, | ||
138 | + </if> | ||
139 | + <if test="overdraftthreshold != null" > | ||
140 | + #{overdraftthreshold,jdbcType=DECIMAL}, | ||
141 | + </if> | ||
142 | + <if test="waterload != null" > | ||
143 | + #{waterload,jdbcType=BIT}, | ||
144 | + </if> | ||
145 | + <if test="water != null" > | ||
146 | + #{water,jdbcType=DECIMAL}, | ||
147 | + </if> | ||
148 | + <if test="power != null" > | ||
149 | + #{power,jdbcType=DECIMAL}, | ||
150 | + </if> | ||
151 | + <if test="powerfactor != null" > | ||
152 | + #{powerfactor,jdbcType=VARCHAR}, | ||
153 | + </if> | ||
154 | + <if test="free != null" > | ||
155 | + #{free,jdbcType=BIT}, | ||
156 | + </if> | ||
157 | + <if test="freeelectricitylimit != null" > | ||
158 | + #{freeelectricitylimit,jdbcType=DECIMAL}, | ||
159 | + </if> | ||
160 | + <if test="freewater != null" > | ||
161 | + #{freewater,jdbcType=VARCHAR}, | ||
162 | + </if> | ||
163 | + <if test="wmId != null" > | ||
164 | + #{wmId,jdbcType=VARCHAR}, | ||
165 | + </if> | ||
166 | + <if test="creattime != null" > | ||
167 | + #{creattime,jdbcType=TIMESTAMP}, | ||
168 | + </if> | ||
169 | + <if test="eeId != null" > | ||
170 | + #{eeId,jdbcType=VARCHAR}, | ||
171 | + </if> | ||
172 | + <if test="reamke2 != null" > | ||
173 | + #{reamke2,jdbcType=VARCHAR}, | ||
174 | + </if> | ||
175 | + <if test="reamke3 != null" > | ||
176 | + #{reamke3,jdbcType=VARCHAR}, | ||
177 | + </if> | ||
178 | + </trim> | ||
179 | + </insert> | ||
180 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | ||
181 | + update water_electricity_parameter | ||
182 | + <set > | ||
183 | + <if test="prepaid != null" > | ||
184 | + prepaid = #{prepaid,jdbcType=BIT}, | ||
185 | + </if> | ||
186 | + <if test="warningtrip != null" > | ||
187 | + warningTrip = #{warningtrip,jdbcType=BIT}, | ||
188 | + </if> | ||
189 | + <if test="warningthreshold != null" > | ||
190 | + warningThreshold = #{warningthreshold,jdbcType=DECIMAL}, | ||
191 | + </if> | ||
192 | + <if test="overdraft != null" > | ||
193 | + overdraft = #{overdraft,jdbcType=BIT}, | ||
194 | + </if> | ||
195 | + <if test="overdraftthreshold != null" > | ||
196 | + overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL}, | ||
197 | + </if> | ||
198 | + <if test="waterload != null" > | ||
199 | + waterLoad = #{waterload,jdbcType=BIT}, | ||
200 | + </if> | ||
201 | + <if test="water != null" > | ||
202 | + water = #{water,jdbcType=DECIMAL}, | ||
203 | + </if> | ||
204 | + <if test="power != null" > | ||
205 | + power = #{power,jdbcType=DECIMAL}, | ||
206 | + </if> | ||
207 | + <if test="powerfactor != null" > | ||
208 | + powerFactor = #{powerfactor,jdbcType=VARCHAR}, | ||
209 | + </if> | ||
210 | + <if test="free != null" > | ||
211 | + free = #{free,jdbcType=BIT}, | ||
212 | + </if> | ||
213 | + <if test="freeelectricitylimit != null" > | ||
214 | + freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL}, | ||
215 | + </if> | ||
216 | + <if test="freewater != null" > | ||
217 | + freeWater = #{freewater,jdbcType=VARCHAR}, | ||
218 | + </if> | ||
219 | + <if test="wmId != null" > | ||
220 | + wm_id = #{wmId,jdbcType=VARCHAR}, | ||
221 | + </if> | ||
222 | + <if test="creattime != null" > | ||
223 | + creatTime = #{creattime,jdbcType=TIMESTAMP}, | ||
224 | + </if> | ||
225 | + <if test="eeId != null" > | ||
226 | + ee_id = #{eeId,jdbcType=VARCHAR}, | ||
227 | + </if> | ||
228 | + <if test="reamke2 != null" > | ||
229 | + reamke2 = #{reamke2,jdbcType=VARCHAR}, | ||
230 | + </if> | ||
231 | + <if test="reamke3 != null" > | ||
232 | + reamke3 = #{reamke3,jdbcType=VARCHAR}, | ||
233 | + </if> | ||
234 | + </set> | ||
235 | + where ee_id = #{eeId,jdbcType=INTEGER} | ||
236 | + </update> | ||
237 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | ||
238 | + update water_electricity_parameter | ||
239 | + set prepaid = #{prepaid,jdbcType=BIT}, | ||
240 | + warningTrip = #{warningtrip,jdbcType=BIT}, | ||
241 | + warningThreshold = #{warningthreshold,jdbcType=DECIMAL}, | ||
242 | + overdraft = #{overdraft,jdbcType=BIT}, | ||
243 | + overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL}, | ||
244 | + waterLoad = #{waterload,jdbcType=BIT}, | ||
245 | + water = #{water,jdbcType=DECIMAL}, | ||
246 | + power = #{power,jdbcType=DECIMAL}, | ||
247 | + powerFactor = #{powerfactor,jdbcType=VARCHAR}, | ||
248 | + free = #{free,jdbcType=BIT}, | ||
249 | + freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL}, | ||
250 | + freeWater = #{freewater,jdbcType=VARCHAR}, | ||
251 | + wm_id = #{wmId,jdbcType=VARCHAR}, | ||
252 | + creatTime = #{creattime,jdbcType=TIMESTAMP}, | ||
253 | + ee_id = #{eeId,jdbcType=VARCHAR}, | ||
254 | + reamke2 = #{reamke2,jdbcType=VARCHAR}, | ||
255 | + reamke3 = #{reamke3,jdbcType=VARCHAR} | ||
256 | + where id = #{id,jdbcType=INTEGER} | ||
257 | + </update> | ||
258 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.sunyo.energy.location.dao.WaterMeterMapper" > | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.WaterMeter" > | ||
5 | + <result column="wm_id" property="wmId" jdbcType="VARCHAR" /> | ||
6 | + <result column="wm_sacc" property="wmSacc" jdbcType="VARCHAR" /> | ||
7 | + <result column="wm_lacc" property="wmLacc" jdbcType="VARCHAR" /> | ||
8 | + <result column="wm_rdtime" property="wmRdtime" jdbcType="VARCHAR" /> | ||
9 | + <result column="wm_fmstate" property="wmFmstate" jdbcType="VARCHAR" /> | ||
10 | + <result column="wm_errmessage" property="wmErrmessage" jdbcType="VARCHAR" /> | ||
11 | + <result column="wm_voltage" property="wmVoltage" jdbcType="VARCHAR" /> | ||
12 | + <result column="wm_signalpower" property="wmSignalpower" jdbcType="VARCHAR" /> | ||
13 | + <result column="creatTime" property="creattime" jdbcType="TIMESTAMP" /> | ||
14 | + <result column="updateTime" property="updatetime" jdbcType="TIMESTAMP" /> | ||
15 | + <result column="reamke1" property="reamke1" jdbcType="VARCHAR" /> | ||
16 | + <result column="reamke2" property="reamke2" jdbcType="VARCHAR" /> | ||
17 | + <result column="reamke3" property="reamke3" jdbcType="VARCHAR" /> | ||
18 | + <result column="reamke4" property="reamke4" jdbcType="VARCHAR" /> | ||
19 | + </resultMap> | ||
20 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterMeter" > | ||
21 | + insert into water_meter (wm_id, wm_sacc, wm_lacc, | ||
22 | + wm_rdtime, wm_fmstate, wm_errmessage, | ||
23 | + wm_voltage, wm_signalpower, creatTime, | ||
24 | + updateTime, reamke1, reamke2, | ||
25 | + reamke3, reamke4) | ||
26 | + values (#{wmId,jdbcType=VARCHAR}, #{wmSacc,jdbcType=VARCHAR}, #{wmLacc,jdbcType=VARCHAR}, | ||
27 | + #{wmRdtime,jdbcType=VARCHAR}, #{wmFmstate,jdbcType=VARCHAR}, #{wmErrmessage,jdbcType=VARCHAR}, | ||
28 | + #{wmVoltage,jdbcType=VARCHAR}, #{wmSignalpower,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP}, | ||
29 | + #{updatetime,jdbcType=TIMESTAMP}, #{reamke1,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, | ||
30 | + #{reamke3,jdbcType=VARCHAR}, #{reamke4,jdbcType=VARCHAR}) | ||
31 | + </insert> | ||
32 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterMeter" > | ||
33 | + insert into water_meter | ||
34 | + <trim prefix="(" suffix=")" suffixOverrides="," > | ||
35 | + <if test="wmId != null" > | ||
36 | + wm_id, | ||
37 | + </if> | ||
38 | + <if test="wmSacc != null" > | ||
39 | + wm_sacc, | ||
40 | + </if> | ||
41 | + <if test="wmLacc != null" > | ||
42 | + wm_lacc, | ||
43 | + </if> | ||
44 | + <if test="wmRdtime != null" > | ||
45 | + wm_rdtime, | ||
46 | + </if> | ||
47 | + <if test="wmFmstate != null" > | ||
48 | + wm_fmstate, | ||
49 | + </if> | ||
50 | + <if test="wmErrmessage != null" > | ||
51 | + wm_errmessage, | ||
52 | + </if> | ||
53 | + <if test="wmVoltage != null" > | ||
54 | + wm_voltage, | ||
55 | + </if> | ||
56 | + <if test="wmSignalpower != null" > | ||
57 | + wm_signalpower, | ||
58 | + </if> | ||
59 | + <if test="creattime != null" > | ||
60 | + creatTime, | ||
61 | + </if> | ||
62 | + <if test="updatetime != null" > | ||
63 | + updateTime, | ||
64 | + </if> | ||
65 | + <if test="reamke1 != null" > | ||
66 | + reamke1, | ||
67 | + </if> | ||
68 | + <if test="reamke2 != null" > | ||
69 | + reamke2, | ||
70 | + </if> | ||
71 | + <if test="reamke3 != null" > | ||
72 | + reamke3, | ||
73 | + </if> | ||
74 | + <if test="reamke4 != null" > | ||
75 | + reamke4, | ||
76 | + </if> | ||
77 | + </trim> | ||
78 | + <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
79 | + <if test="wmId != null" > | ||
80 | + #{wmId,jdbcType=VARCHAR}, | ||
81 | + </if> | ||
82 | + <if test="wmSacc != null" > | ||
83 | + #{wmSacc,jdbcType=VARCHAR}, | ||
84 | + </if> | ||
85 | + <if test="wmLacc != null" > | ||
86 | + #{wmLacc,jdbcType=VARCHAR}, | ||
87 | + </if> | ||
88 | + <if test="wmRdtime != null" > | ||
89 | + #{wmRdtime,jdbcType=VARCHAR}, | ||
90 | + </if> | ||
91 | + <if test="wmFmstate != null" > | ||
92 | + #{wmFmstate,jdbcType=VARCHAR}, | ||
93 | + </if> | ||
94 | + <if test="wmErrmessage != null" > | ||
95 | + #{wmErrmessage,jdbcType=VARCHAR}, | ||
96 | + </if> | ||
97 | + <if test="wmVoltage != null" > | ||
98 | + #{wmVoltage,jdbcType=VARCHAR}, | ||
99 | + </if> | ||
100 | + <if test="wmSignalpower != null" > | ||
101 | + #{wmSignalpower,jdbcType=VARCHAR}, | ||
102 | + </if> | ||
103 | + <if test="creattime != null" > | ||
104 | + #{creattime,jdbcType=TIMESTAMP}, | ||
105 | + </if> | ||
106 | + <if test="updatetime != null" > | ||
107 | + #{updatetime,jdbcType=TIMESTAMP}, | ||
108 | + </if> | ||
109 | + <if test="reamke1 != null" > | ||
110 | + #{reamke1,jdbcType=VARCHAR}, | ||
111 | + </if> | ||
112 | + <if test="reamke2 != null" > | ||
113 | + #{reamke2,jdbcType=VARCHAR}, | ||
114 | + </if> | ||
115 | + <if test="reamke3 != null" > | ||
116 | + #{reamke3,jdbcType=VARCHAR}, | ||
117 | + </if> | ||
118 | + <if test="reamke4 != null" > | ||
119 | + #{reamke4,jdbcType=VARCHAR}, | ||
120 | + </if> | ||
121 | + </trim> | ||
122 | + ON DUPLICATE KEY | ||
123 | + UPDATE | ||
124 | + wm_sacc = #{wmSacc,jdbcType=VARCHAR}, | ||
125 | + wm_lacc = #{wmLacc,jdbcType=VARCHAR}, | ||
126 | + wm_rdtime = #{wmRdtime,jdbcType=VARCHAR}, | ||
127 | + wm_fmstate = #{wmFmstate,jdbcType=VARCHAR}, | ||
128 | + wm_errmessage = #{wmErrmessage,jdbcType=VARCHAR}, | ||
129 | + wm_voltage = #{wmVoltage,jdbcType=VARCHAR}, | ||
130 | + wm_signalpower = #{wmSignalpower,jdbcType=VARCHAR}, | ||
131 | + creatTime = #{creattime,jdbcType=TIMESTAMP}, | ||
132 | + updateTime = #{updatetime,jdbcType=TIMESTAMP}, | ||
133 | + reamke1 = #{reamke1,jdbcType=VARCHAR}, | ||
134 | + reamke2 = #{reamke2,jdbcType=VARCHAR}, | ||
135 | + reamke3 = #{reamke3,jdbcType=VARCHAR}, | ||
136 | + reamke4 = #{reamke4,jdbcType=VARCHAR} | ||
137 | + </insert> | ||
138 | +</mapper> |
-
请 注册 或 登录 后发表评论