正在显示
45 个修改的文件
包含
814 行增加
和
816 行删除
@@ -14,14 +14,14 @@ spring: | @@ -14,14 +14,14 @@ spring: | ||
14 | mvc: | 14 | mvc: |
15 | #静态资源,设置上传文件的访问, | 15 | #静态资源,设置上传文件的访问, |
16 | static-path-pattern: /** | 16 | static-path-pattern: /** |
17 | -# view: | ||
18 | -# suffix: .html | ||
19 | -## prefix: /templates/ | 17 | + # view: |
18 | + # suffix: .html | ||
19 | + ## prefix: /templates/ | ||
20 | thymeleaf: | 20 | thymeleaf: |
21 | cache: false | 21 | cache: false |
22 | mode: LEGACYHTML5 | 22 | mode: LEGACYHTML5 |
23 | activiti: | 23 | activiti: |
24 | -# 检查bpmn文件 | 24 | + # 检查bpmn文件 |
25 | check-process-definitions: false | 25 | check-process-definitions: false |
26 | #创建任务流表,创建完成后关闭,每次应用启动不检查Activiti数据表是否存在及版本号是否匹配,提升应用启动速度 | 26 | #创建任务流表,创建完成后关闭,每次应用启动不检查Activiti数据表是否存在及版本号是否匹配,提升应用启动速度 |
27 | database-schema-update: true | 27 | database-schema-update: true |
@@ -64,17 +64,17 @@ spring: | @@ -64,17 +64,17 @@ spring: | ||
64 | datasource: | 64 | datasource: |
65 | type: com.alibaba.druid.pool.DruidDataSource | 65 | type: com.alibaba.druid.pool.DruidDataSource |
66 | #oracle | 66 | #oracle |
67 | -# driver-class-name: oracle.jdbc.OracleDriver | ||
68 | -# url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL | ||
69 | -# username: CGONMS | ||
70 | -# password: vmvnv1v2 | 67 | + # driver-class-name: oracle.jdbc.OracleDriver |
68 | + # url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL | ||
69 | + # username: CGONMS | ||
70 | + # password: vmvnv1v2 | ||
71 | #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 | 71 | #spring datasource mysql,注意编码配置,缺少数据库编码配置容易引起中文入库乱码 |
72 | #url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true | 72 | #url: jdbc:mysql://127.0.0.1:3307/statistics?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true |
73 | url: jdbc:mysql://118.31.66.166:3306/EMPT?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai | 73 | url: jdbc:mysql://118.31.66.166:3306/EMPT?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai |
74 | -# url: jdbc:mysql://192.168.1.7:10098/empt?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai | ||
75 | -# username: shl | 74 | + # url: jdbc:mysql://192.168.1.7:10098/empt?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&serverTimezone=Asia/Shanghai |
75 | + # username: shl | ||
76 | username: 110 | 76 | username: 110 |
77 | -# password: vmvnv1v2VV | 77 | + # password: vmvnv1v2VV |
78 | password: QAHqCJf2kFYCLirM | 78 | password: QAHqCJf2kFYCLirM |
79 | driver-class-name: com.mysql.cj.jdbc.Driver | 79 | driver-class-name: com.mysql.cj.jdbc.Driver |
80 | max-idle: 20 | 80 | max-idle: 20 |
@@ -96,7 +96,7 @@ spring: | @@ -96,7 +96,7 @@ spring: | ||
96 | #mysql | 96 | #mysql |
97 | validation-query: SELECT 1 FROM DUAL | 97 | validation-query: SELECT 1 FROM DUAL |
98 | #oracle | 98 | #oracle |
99 | -# validation-query: SELECT 'x' FROM DUAL | 99 | + # validation-query: SELECT 'x' FROM DUAL |
100 | test-while-idle: true | 100 | test-while-idle: true |
101 | test-on-borrow: false | 101 | test-on-borrow: false |
102 | test-on-return: false | 102 | test-on-return: false |
@@ -114,7 +114,7 @@ eureka: | @@ -114,7 +114,7 @@ eureka: | ||
114 | client: | 114 | client: |
115 | #eureka注册中心服务器地址 | 115 | #eureka注册中心服务器地址 |
116 | service-url: | 116 | service-url: |
117 | -# defaultZone: http://127.0.0.1:12345/eureka/ | 117 | + # defaultZone: http://127.0.0.1:12345/eureka/ |
118 | defaultZone: http://192.168.1.53:12345/eureka/ | 118 | defaultZone: http://192.168.1.53:12345/eureka/ |
119 | registry-fetch-interval-seconds: 30 | 119 | registry-fetch-interval-seconds: 30 |
120 | 120 | ||
@@ -174,12 +174,12 @@ eeid: | @@ -174,12 +174,12 @@ eeid: | ||
174 | #电表所需要接口 | 174 | #电表所需要接口 |
175 | eeUrl: | 175 | eeUrl: |
176 | #电表充值路径 | 176 | #电表充值路径 |
177 | - rechargeDevicesUrl: "http://10.5.10.102:8000/api/emcs/rechargeDevices" | ||
178 | -# rechargeDevicesUrl: "http://192.168.1.7:18080/api/emcs/rechargeDevices" | 177 | + # rechargeDevicesUrl: "http://10.5.10.102:8000/api/emcs/rechargeDevices" |
178 | + rechargeDevicesUrl: "http://192.168.1.7:18080/api/emcs/rechargeDevices" | ||
179 | #获取电表实时数据/余额 | 179 | #获取电表实时数据/余额 |
180 | - electricityBanlanceUrl: "http://10.5.10.102:8000/api/emcs/getEnergyInfoForRealTime" | ||
181 | -# electricityBanlanceUrl: "http://192.168.1.7:18080/api/emcs/getEnergyInfoForRealTime" | 180 | + # electricityBanlanceUrl: "http://10.5.10.102:8000/api/emcs/getEnergyInfoForRealTime" |
181 | + electricityBanlanceUrl: "http://192.168.1.7:18080/api/emcs/getEnergyInfoForRealTime" | ||
182 | #获取设备跟公寓信息 | 182 | #获取设备跟公寓信息 |
183 | - getRoomAndDeviceUrl: "http://10.5.10.102:8000/api/emcs/getRoomAndDevice" | ||
184 | -# getRoomAndDeviceUrl: "http://192.168.1.7:18080/api/emcs/getRoomAndDevice" | 183 | + # getRoomAndDeviceUrl: "http://10.5.10.102:8000/api/emcs/getRoomAndDevice" |
184 | + getRoomAndDeviceUrl: "http://192.168.1.7:18080/api/emcs/getRoomAndDevice" | ||
185 | 185 |
@@ -10,15 +10,18 @@ | @@ -10,15 +10,18 @@ | ||
10 | 10 | ||
11 | <contextName>logback</contextName> | 11 | <contextName>logback</contextName> |
12 | <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> | 12 | <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> |
13 | - <property name="log.path" value="./logs" /> | 13 | + <property name="log.path" value="./logs"/> |
14 | 14 | ||
15 | <!-- 彩色日志 --> | 15 | <!-- 彩色日志 --> |
16 | <!-- 彩色日志依赖的渲染类 --> | 16 | <!-- 彩色日志依赖的渲染类 --> |
17 | - <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> | ||
18 | - <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> | ||
19 | - <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> | 17 | + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/> |
18 | + <conversionRule conversionWord="wex" | ||
19 | + converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/> | ||
20 | + <conversionRule conversionWord="wEx" | ||
21 | + converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/> | ||
20 | <!-- 彩色日志格式 --> | 22 | <!-- 彩色日志格式 --> |
21 | - <property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> | 23 | + <property name="CONSOLE_LOG_PATTERN" |
24 | + value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> | ||
22 | 25 | ||
23 | 26 | ||
24 | <!--输出到控制台--> | 27 | <!--输出到控制台--> |
@@ -208,29 +211,29 @@ | @@ -208,29 +211,29 @@ | ||
208 | <!--开发环境:打印控制台--> | 211 | <!--开发环境:打印控制台--> |
209 | <springProfile name="dev"> | 212 | <springProfile name="dev"> |
210 | <logger name="org.springframework" level="info"/> | 213 | <logger name="org.springframework" level="info"/> |
211 | - <logger name="org.apache.tomcat" level="info" /> | ||
212 | - <logger name="com.sunyo.energy.location.dao" level="DEBUG" /> | 214 | + <logger name="org.apache.tomcat" level="info"/> |
215 | + <logger name="com.sunyo.energy.location.dao" level="DEBUG"/> | ||
213 | <root level="info"> | 216 | <root level="info"> |
214 | - <appender-ref ref="CONSOLE" /> | ||
215 | - <appender-ref ref="TRACE_FILE" /> | ||
216 | - <appender-ref ref="DEBUG_FILE" /> | ||
217 | - <appender-ref ref="INFO_FILE" /> | ||
218 | - <appender-ref ref="WARN_FILE" /> | ||
219 | - <appender-ref ref="ERROR_FILE" /> | 217 | + <appender-ref ref="CONSOLE"/> |
218 | + <appender-ref ref="TRACE_FILE"/> | ||
219 | + <appender-ref ref="DEBUG_FILE"/> | ||
220 | + <appender-ref ref="INFO_FILE"/> | ||
221 | + <appender-ref ref="WARN_FILE"/> | ||
222 | + <appender-ref ref="ERROR_FILE"/> | ||
220 | </root> | 223 | </root> |
221 | </springProfile> | 224 | </springProfile> |
222 | 225 | ||
223 | <!--生产环境:输出到文件--> | 226 | <!--生产环境:输出到文件--> |
224 | <springProfile name="pro"> | 227 | <springProfile name="pro"> |
225 | <logger name="org.springframework.boot" level="INFO"/> | 228 | <logger name="org.springframework.boot" level="INFO"/> |
226 | - <logger name="com.sunyo.energy.location.dao" level="DEBUG" /> | 229 | + <logger name="com.sunyo.energy.location.dao" level="DEBUG"/> |
227 | <root level="info"> | 230 | <root level="info"> |
228 | - <appender-ref ref="CONSOLE" /> | ||
229 | - <appender-ref ref="DEBUG_FILE" /> | ||
230 | - <appender-ref ref="INFO_FILE" /> | ||
231 | - <appender-ref ref="ERROR_FILE" /> | ||
232 | - <appender-ref ref="WARN_FILE" /> | ||
233 | - <appender-ref ref="TRACE_FILE" /> | 231 | + <appender-ref ref="CONSOLE"/> |
232 | + <appender-ref ref="DEBUG_FILE"/> | ||
233 | + <appender-ref ref="INFO_FILE"/> | ||
234 | + <appender-ref ref="ERROR_FILE"/> | ||
235 | + <appender-ref ref="WARN_FILE"/> | ||
236 | + <appender-ref ref="TRACE_FILE"/> | ||
234 | </root> | 237 | </root> |
235 | </springProfile> | 238 | </springProfile> |
236 | 239 |
@@ -252,7 +252,8 @@ | @@ -252,7 +252,8 @@ | ||
252 | <phase>package</phase> | 252 | <phase>package</phase> |
253 | <configuration> | 253 | <configuration> |
254 | <tasks> | 254 | <tasks> |
255 | - <copy todir="docker" file="target/${project.artifactId}-${project.version}.${project.packaging}" /> | 255 | + <copy todir="docker" |
256 | + file="target/${project.artifactId}-${project.version}.${project.packaging}"/> | ||
256 | </tasks> | 257 | </tasks> |
257 | </configuration> | 258 | </configuration> |
258 | <goals> | 259 | <goals> |
@@ -25,6 +25,7 @@ public class Swagger2 { | @@ -25,6 +25,7 @@ public class Swagger2 { | ||
25 | .paths(PathSelectors.any()) | 25 | .paths(PathSelectors.any()) |
26 | .build(); | 26 | .build(); |
27 | } | 27 | } |
28 | + | ||
28 | //构建 api文档的详细信息函数,注意这里的注解引用的是哪个 | 29 | //构建 api文档的详细信息函数,注意这里的注解引用的是哪个 |
29 | private ApiInfo apiInfo() { | 30 | private ApiInfo apiInfo() { |
30 | return new ApiInfoBuilder() | 31 | return new ApiInfoBuilder() |
@@ -32,7 +32,7 @@ public class EeInfoController { | @@ -32,7 +32,7 @@ public class EeInfoController { | ||
32 | @ResponseBody | 32 | @ResponseBody |
33 | public PageInfo<ElectricityInfo> list(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize, | 33 | public PageInfo<ElectricityInfo> list(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize, |
34 | @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum, | 34 | @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum, |
35 | - @RequestParam(value = "deviceId", required = false) String deviceId){ | 35 | + @RequestParam(value = "deviceId", required = false) String deviceId) { |
36 | 36 | ||
37 | PageInfo<ElectricityInfo> eeInfo = eeInfoService.getEeInfo(pageSize, pageNum, deviceId); | 37 | PageInfo<ElectricityInfo> eeInfo = eeInfoService.getEeInfo(pageSize, pageNum, deviceId); |
38 | 38 |
@@ -30,26 +30,26 @@ public class ElectricityParameterController { | @@ -30,26 +30,26 @@ public class ElectricityParameterController { | ||
30 | @ApiOperation(value = "电表参数配置") | 30 | @ApiOperation(value = "电表参数配置") |
31 | @RequestMapping("/add") | 31 | @RequestMapping("/add") |
32 | @ResponseBody | 32 | @ResponseBody |
33 | - public ResultJson eetParam(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){ | 33 | + public ResultJson eetParam(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter) { |
34 | 34 | ||
35 | try { | 35 | try { |
36 | - if (waterElectricityParameterService.countOne(waterElectricityParameter.getEeId())>0){ | 36 | + if (waterElectricityParameterService.countOne(waterElectricityParameter.getEeId()) > 0) { |
37 | resultJson.setCode("200"); | 37 | resultJson.setCode("200"); |
38 | return resultJson; | 38 | return resultJson; |
39 | - }else { | 39 | + } else { |
40 | int i = waterElectricityParameterService.insertSelective(waterElectricityParameter); | 40 | int i = waterElectricityParameterService.insertSelective(waterElectricityParameter); |
41 | 41 | ||
42 | - if (i>0){ | 42 | + if (i > 0) { |
43 | resultJson.setCode("200"); | 43 | resultJson.setCode("200"); |
44 | resultJson.setMsg("添加成功"); | 44 | resultJson.setMsg("添加成功"); |
45 | return resultJson; | 45 | return resultJson; |
46 | - }else { | 46 | + } else { |
47 | resultJson.setCode("500"); | 47 | resultJson.setCode("500"); |
48 | resultJson.setMsg("网络异常"); | 48 | resultJson.setMsg("网络异常"); |
49 | return resultJson; | 49 | return resultJson; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | - }catch (Exception e){ | 52 | + } catch (Exception e) { |
53 | e.printStackTrace(); | 53 | e.printStackTrace(); |
54 | resultJson.setCode("500"); | 54 | resultJson.setCode("500"); |
55 | resultJson.setMsg("网络异常"); | 55 | resultJson.setMsg("网络异常"); |
@@ -61,7 +61,7 @@ public class ElectricityParameterController { | @@ -61,7 +61,7 @@ public class ElectricityParameterController { | ||
61 | @ApiOperation(value = "电表参数查询") | 61 | @ApiOperation(value = "电表参数查询") |
62 | @RequestMapping("/getEEModel") | 62 | @RequestMapping("/getEEModel") |
63 | @ResponseBody | 63 | @ResponseBody |
64 | - public WaterElectricityParameter getEEModel(@RequestParam(value = "eeId", required = false) String eeId){ | 64 | + public WaterElectricityParameter getEEModel(@RequestParam(value = "eeId", required = false) String eeId) { |
65 | WaterElectricityParameter oneElectricity = waterElectricityParameterService.findOneElectricity(eeId); | 65 | WaterElectricityParameter oneElectricity = waterElectricityParameterService.findOneElectricity(eeId); |
66 | System.out.println("111"); | 66 | System.out.println("111"); |
67 | return oneElectricity; | 67 | return oneElectricity; |
@@ -71,18 +71,18 @@ public class ElectricityParameterController { | @@ -71,18 +71,18 @@ public class ElectricityParameterController { | ||
71 | @ApiOperation(value = "电表参数编辑") | 71 | @ApiOperation(value = "电表参数编辑") |
72 | @RequestMapping("/edit") | 72 | @RequestMapping("/edit") |
73 | @ResponseBody | 73 | @ResponseBody |
74 | - public ResultJson edit(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter){ | 74 | + public ResultJson edit(ResultJson resultJson, WaterElectricityParameter waterElectricityParameter) { |
75 | 75 | ||
76 | try { | 76 | try { |
77 | - if (waterElectricityParameterService.updateByPrimaryKeySelective(waterElectricityParameter)>0){ | 77 | + if (waterElectricityParameterService.updateByPrimaryKeySelective(waterElectricityParameter) > 0) { |
78 | resultJson.setCode("200"); | 78 | resultJson.setCode("200"); |
79 | return resultJson; | 79 | return resultJson; |
80 | - }else { | 80 | + } else { |
81 | resultJson.setCode("500"); | 81 | resultJson.setCode("500"); |
82 | resultJson.setMsg("网络异常"); | 82 | resultJson.setMsg("网络异常"); |
83 | return resultJson; | 83 | return resultJson; |
84 | } | 84 | } |
85 | - }catch (Exception e){ | 85 | + } catch (Exception e) { |
86 | e.printStackTrace(); | 86 | e.printStackTrace(); |
87 | resultJson.setCode("500"); | 87 | resultJson.setCode("500"); |
88 | resultJson.setMsg("网络异常"); | 88 | resultJson.setMsg("网络异常"); |
@@ -92,18 +92,19 @@ public class ElectricityParameterController { | @@ -92,18 +92,19 @@ public class ElectricityParameterController { | ||
92 | 92 | ||
93 | /** | 93 | /** |
94 | * 获取电表实施数据 | 94 | * 获取电表实施数据 |
95 | + * | ||
95 | * @param eeId | 96 | * @param eeId |
96 | * @return | 97 | * @return |
97 | */ | 98 | */ |
98 | @ApiOperation(value = "电表实时信息查询") | 99 | @ApiOperation(value = "电表实时信息查询") |
99 | @RequestMapping(value = "/getEnergyInfoForRealTime") | 100 | @RequestMapping(value = "/getEnergyInfoForRealTime") |
100 | @ResponseBody | 101 | @ResponseBody |
101 | - public ElectricityMeter getEnergyInfoForRealTime(@RequestParam(value = "eeId", required = false) String eeId){ | 102 | + public ElectricityMeter getEnergyInfoForRealTime(@RequestParam(value = "eeId", required = false) String eeId) { |
102 | 103 | ||
103 | try { | 104 | try { |
104 | ElectricityMeter energyInfoForRealTime = electricityMeterService.getEnergyInfoForRealTime(eeId); | 105 | ElectricityMeter energyInfoForRealTime = electricityMeterService.getEnergyInfoForRealTime(eeId); |
105 | return energyInfoForRealTime; | 106 | return energyInfoForRealTime; |
106 | - }catch (Exception e){ | 107 | + } catch (Exception e) { |
107 | e.printStackTrace(); | 108 | e.printStackTrace(); |
108 | return null; | 109 | return null; |
109 | } | 110 | } |
@@ -25,47 +25,47 @@ public class LocationController { | @@ -25,47 +25,47 @@ public class LocationController { | ||
25 | private LocationMapper locationMapper; | 25 | private LocationMapper locationMapper; |
26 | 26 | ||
27 | @ApiOperation(value = "查询楼层") | 27 | @ApiOperation(value = "查询楼层") |
28 | - @RequestMapping(value="/list",method= RequestMethod.GET) | ||
29 | - public ResultJson startActivityDemo(@RequestParam(value = "pageNum",required = false,defaultValue = "1") | 28 | + @RequestMapping(value = "/list", method = RequestMethod.GET) |
29 | + public ResultJson startActivityDemo(@RequestParam(value = "pageNum", required = false, defaultValue = "1") | ||
30 | int pageNum, | 30 | int pageNum, |
31 | - @RequestParam(value = "pageSize",required = false,defaultValue = "5") | 31 | + @RequestParam(value = "pageSize", required = false, defaultValue = "5") |
32 | int pageSize, | 32 | int pageSize, |
33 | @RequestParam(value = "processName", required = false) | 33 | @RequestParam(value = "processName", required = false) |
34 | String adrname, | 34 | String adrname, |
35 | @RequestParam(value = "parent", required = false) | 35 | @RequestParam(value = "parent", required = false) |
36 | - int parent){ | ||
37 | - Page<Location> page = PageHelper.startPage(pageNum,pageSize); | 36 | + int parent) { |
37 | + Page<Location> page = PageHelper.startPage(pageNum, pageSize); | ||
38 | List<Location> list = null; | 38 | List<Location> list = null; |
39 | if (StringUtils.isEmpty(adrname)) { | 39 | if (StringUtils.isEmpty(adrname)) { |
40 | list = locationMapper.selectAll(parent); | 40 | list = locationMapper.selectAll(parent); |
41 | - if (parent == 0){ | 41 | + if (parent == 0) { |
42 | Location location = list.get(0); | 42 | Location location = list.get(0); |
43 | List<Location> locationsList = locationMapper.selectAll(location.getId()); | 43 | List<Location> locationsList = locationMapper.selectAll(location.getId()); |
44 | - for (Location loc: list){ | 44 | + for (Location loc : list) { |
45 | loc.setChildren(locationsList); | 45 | loc.setChildren(locationsList); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | - }else { | ||
50 | - list= locationMapper.selectAllAdrName(adrname); | 49 | + } else { |
50 | + list = locationMapper.selectAllAdrName(adrname); | ||
51 | } | 51 | } |
52 | 52 | ||
53 | PageInfo<Location> result = new PageInfo<Location>(list); | 53 | PageInfo<Location> result = new PageInfo<Location>(list); |
54 | - return new ResultJson("200","success",result); | 54 | + return new ResultJson("200", "success", result); |
55 | } | 55 | } |
56 | 56 | ||
57 | @ApiOperation(value = "新增楼层") | 57 | @ApiOperation(value = "新增楼层") |
58 | @PostMapping(value = "/add") | 58 | @PostMapping(value = "/add") |
59 | public ResultJson addLocation(@RequestParam("adrName") String adrName, | 59 | public ResultJson addLocation(@RequestParam("adrName") String adrName, |
60 | @RequestParam("parent") Integer parent, | 60 | @RequestParam("parent") Integer parent, |
61 | - @RequestParam("type") Integer type){ | 61 | + @RequestParam("type") Integer type) { |
62 | 62 | ||
63 | ResultJson resultJson = new ResultJson(); | 63 | ResultJson resultJson = new ResultJson(); |
64 | Location location = new Location(); | 64 | Location location = new Location(); |
65 | Map map = new HashMap(); | 65 | Map map = new HashMap(); |
66 | map.put("adrName", adrName); | 66 | map.put("adrName", adrName); |
67 | map.put("parent", parent); | 67 | map.put("parent", parent); |
68 | - if (locationMapper.countAdrName(map) > 0){ | 68 | + if (locationMapper.countAdrName(map) > 0) { |
69 | resultJson.setCode("201"); | 69 | resultJson.setCode("201"); |
70 | } else { | 70 | } else { |
71 | 71 | ||
@@ -73,9 +73,9 @@ public class LocationController { | @@ -73,9 +73,9 @@ public class LocationController { | ||
73 | location.setType(type); | 73 | location.setType(type); |
74 | location.setAdrname(adrName); | 74 | location.setAdrname(adrName); |
75 | 75 | ||
76 | - if (locationMapper.insertSelective(location)>0){ | 76 | + if (locationMapper.insertSelective(location) > 0) { |
77 | resultJson.setCode("200"); | 77 | resultJson.setCode("200"); |
78 | - }else { | 78 | + } else { |
79 | resultJson.setCode("202"); | 79 | resultJson.setCode("202"); |
80 | } | 80 | } |
81 | } | 81 | } |
@@ -85,19 +85,19 @@ public class LocationController { | @@ -85,19 +85,19 @@ public class LocationController { | ||
85 | 85 | ||
86 | @ApiOperation(value = "删除楼层") | 86 | @ApiOperation(value = "删除楼层") |
87 | @DeleteMapping(value = "/del") | 87 | @DeleteMapping(value = "/del") |
88 | - public ResultJson delLocation(@RequestBody Location location){ | 88 | + public ResultJson delLocation(@RequestBody Location location) { |
89 | 89 | ||
90 | ResultJson resultJson = new ResultJson(); | 90 | ResultJson resultJson = new ResultJson(); |
91 | 91 | ||
92 | if (locationMapper.countParent(location.getId()) > 0) { | 92 | if (locationMapper.countParent(location.getId()) > 0) { |
93 | resultJson.setCode("201"); | 93 | resultJson.setCode("201"); |
94 | return resultJson; | 94 | return resultJson; |
95 | - }else { | 95 | + } else { |
96 | 96 | ||
97 | - if (locationMapper.deleteByPrimaryKey(location.getId())>0){ | 97 | + if (locationMapper.deleteByPrimaryKey(location.getId()) > 0) { |
98 | resultJson.setCode("200"); | 98 | resultJson.setCode("200"); |
99 | return resultJson; | 99 | return resultJson; |
100 | - }else { | 100 | + } else { |
101 | resultJson.setCode("201"); | 101 | resultJson.setCode("201"); |
102 | return resultJson; | 102 | return resultJson; |
103 | } | 103 | } |
@@ -106,13 +106,13 @@ public class LocationController { | @@ -106,13 +106,13 @@ public class LocationController { | ||
106 | 106 | ||
107 | @ApiOperation(value = "修改楼层") | 107 | @ApiOperation(value = "修改楼层") |
108 | @PutMapping(value = "/edit") | 108 | @PutMapping(value = "/edit") |
109 | - public ResultJson editLocation(@RequestBody Location location){ | 109 | + public ResultJson editLocation(@RequestBody Location location) { |
110 | 110 | ||
111 | ResultJson resultJson = new ResultJson(); | 111 | ResultJson resultJson = new ResultJson(); |
112 | 112 | ||
113 | - if (locationMapper.updateByPrimaryKeySelective(location)>0){ | 113 | + if (locationMapper.updateByPrimaryKeySelective(location) > 0) { |
114 | resultJson.setCode("200"); | 114 | resultJson.setCode("200"); |
115 | - }else { | 115 | + } else { |
116 | resultJson.setCode("201"); | 116 | resultJson.setCode("201"); |
117 | } | 117 | } |
118 | 118 |
@@ -26,46 +26,47 @@ public class PayOrderController { | @@ -26,46 +26,47 @@ public class PayOrderController { | ||
26 | @RequestMapping("/list") | 26 | @RequestMapping("/list") |
27 | public PageInfo<PayRecords> getOrder(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize, | 27 | public PageInfo<PayRecords> getOrder(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize, |
28 | @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum, | 28 | @RequestParam(value = "pageNum", required = false, defaultValue = "5") int pageNum, |
29 | - @RequestParam(value = "orderNumber",required = false) String orderNumber, | ||
30 | - @RequestParam(value = "payTime", required = false) String payTime ){ | ||
31 | - PageInfo<PayRecords> order = payOrderService.getOrder(pageSize, pageNum, orderNumber, payTime); | 29 | + @RequestParam(value = "orderNumber", required = false) String orderNumber, |
30 | + @RequestParam(value = "payTime", required = false) String payTime, | ||
31 | + @RequestParam(value = "username", required = false) String username) { | ||
32 | + PageInfo<PayRecords> order = payOrderService.getOrder(pageSize, pageNum, orderNumber, payTime, username); | ||
32 | return order; | 33 | return order; |
33 | } | 34 | } |
34 | 35 | ||
35 | 36 | ||
36 | @ApiOperation(value = "新增缴费订单") | 37 | @ApiOperation(value = "新增缴费订单") |
37 | @PostMapping("/add") | 38 | @PostMapping("/add") |
38 | - public ResultJson addOrder(@RequestBody PayRecords records){ | ||
39 | - int mgs=0; | ||
40 | - int result=payOrderService.addOrder(records); | ||
41 | - if(result>0){ | ||
42 | - mgs=1; | 39 | + public ResultJson addOrder(@RequestBody PayRecords records) { |
40 | + int mgs = 0; | ||
41 | + int result = payOrderService.addOrder(records); | ||
42 | + if (result > 0) { | ||
43 | + mgs = 1; | ||
43 | } | 44 | } |
44 | - return mgs==1?new ResultJson("200","新增订单成功"):new ResultJson("500","新增订单失败"); | 45 | + return mgs == 1 ? new ResultJson("200", "新增订单成功") : new ResultJson("500", "新增订单失败"); |
45 | } | 46 | } |
46 | 47 | ||
47 | 48 | ||
48 | @ApiOperation(value = "更新缴费订单") | 49 | @ApiOperation(value = "更新缴费订单") |
49 | @PutMapping("/edi") | 50 | @PutMapping("/edi") |
50 | - public ResultJson ediOrder(@RequestBody PayRecords records){ | ||
51 | - int mgs=0; | ||
52 | - int result=payOrderService.ediOrder(records); | ||
53 | - if(result>0){ | ||
54 | - mgs=1; | 51 | + public ResultJson ediOrder(@RequestBody PayRecords records) { |
52 | + int mgs = 0; | ||
53 | + int result = payOrderService.ediOrder(records); | ||
54 | + if (result > 0) { | ||
55 | + mgs = 1; | ||
55 | } | 56 | } |
56 | - return mgs==1? new ResultJson("200","订单信息更新成功"):new ResultJson("500","订单信息更新失败"); | 57 | + return mgs == 1 ? new ResultJson("200", "订单信息更新成功") : new ResultJson("500", "订单信息更新失败"); |
57 | } | 58 | } |
58 | 59 | ||
59 | 60 | ||
60 | @ApiOperation(value = "删除缴费订单") | 61 | @ApiOperation(value = "删除缴费订单") |
61 | @DeleteMapping("/del") | 62 | @DeleteMapping("/del") |
62 | - public ResultJson delOrder(@RequestBody PayRecords payRecords){ | ||
63 | - int mgs=0; | ||
64 | - int result=payOrderService.delOrder(payRecords); | ||
65 | - if(result>0){ | ||
66 | - mgs=1; | 63 | + public ResultJson delOrder(@RequestBody PayRecords payRecords) { |
64 | + int mgs = 0; | ||
65 | + int result = payOrderService.delOrder(payRecords); | ||
66 | + if (result > 0) { | ||
67 | + mgs = 1; | ||
67 | } | 68 | } |
68 | - return mgs==1? new ResultJson("200","订单信息移出成功"):new ResultJson("500","订单信息删除失败"); | 69 | + return mgs == 1 ? new ResultJson("200", "订单信息移出成功") : new ResultJson("500", "订单信息删除失败"); |
69 | } | 70 | } |
70 | 71 | ||
71 | } | 72 | } |
@@ -21,7 +21,7 @@ import java.math.BigDecimal; | @@ -21,7 +21,7 @@ import java.math.BigDecimal; | ||
21 | import java.util.Date; | 21 | import java.util.Date; |
22 | import java.util.UUID; | 22 | import java.util.UUID; |
23 | 23 | ||
24 | -@Controller | 24 | + |
25 | @RequestMapping("/payCode") | 25 | @RequestMapping("/payCode") |
26 | public class PayRseponeController { | 26 | public class PayRseponeController { |
27 | 27 | ||
@@ -40,6 +40,7 @@ public class PayRseponeController { | @@ -40,6 +40,7 @@ public class PayRseponeController { | ||
40 | 40 | ||
41 | /** | 41 | /** |
42 | * 接受字段 | 42 | * 接受字段 |
43 | + * | ||
43 | * @param POSID 商户柜台代码 | 44 | * @param POSID 商户柜台代码 |
44 | * @param BRANCHID 分行代码 | 45 | * @param BRANCHID 分行代码 |
45 | * @param ORDERID 定单号 | 46 | * @param ORDERID 定单号 |
@@ -98,53 +99,53 @@ public class PayRseponeController { | @@ -98,53 +99,53 @@ public class PayRseponeController { | ||
98 | payResponse.setUsrinfo(USRINFO); | 99 | payResponse.setUsrinfo(USRINFO); |
99 | payResponse.setPaytype(PAYTYPE); | 100 | payResponse.setPaytype(PAYTYPE); |
100 | payResponse.setSign(SIGN); | 101 | payResponse.setSign(SIGN); |
101 | - int msg =0; | 102 | + int msg = 0; |
102 | int i = payResponseMapperl.insertSelective(payResponse); | 103 | int i = payResponseMapperl.insertSelective(payResponse); |
103 | - if (i>0){ | ||
104 | - msg =1; | 104 | + if (i > 0) { |
105 | + msg = 1; | ||
105 | PayRecords payRecords = new PayRecords(); | 106 | PayRecords payRecords = new PayRecords(); |
106 | // 支付类型 | 107 | // 支付类型 |
107 | - if (!"".equals(ACC_TYPE)){ | ||
108 | - if ("WX".equals(ACC_TYPE)){ | 108 | + if (!"".equals(ACC_TYPE)) { |
109 | + if ("WX".equals(ACC_TYPE)) { | ||
109 | payRecords.setPayfesstype(false); | 110 | payRecords.setPayfesstype(false); |
110 | - }else { | 111 | + } else { |
111 | payRecords.setPayfesstype(true); | 112 | payRecords.setPayfesstype(true); |
112 | } | 113 | } |
113 | 114 | ||
114 | } | 115 | } |
115 | - if ("Y".equals(SUCCESS)){ | 116 | + if ("Y".equals(SUCCESS)) { |
116 | payRecords.setOrdernumber(ORDERID); | 117 | payRecords.setOrdernumber(ORDERID); |
117 | payRecords.setReamke3("1"); | 118 | payRecords.setReamke3("1"); |
118 | - }else { | 119 | + } else { |
119 | payRecords.setOrdernumber(ORDERID); | 120 | payRecords.setOrdernumber(ORDERID); |
120 | payRecords.setReamke3("0"); | 121 | payRecords.setReamke3("0"); |
121 | } | 122 | } |
122 | 123 | ||
123 | // 查询是水还是电 | 124 | // 查询是水还是电 |
124 | boolean selectType = payRecordsMapper.selectType(ORDERID); | 125 | boolean selectType = payRecordsMapper.selectType(ORDERID); |
125 | - if (selectType){ | 126 | + if (selectType) { |
126 | // 查询该订单设备编号 | 127 | // 查询该订单设备编号 |
127 | String eeId = payRecordsMapper.findOrderNumber(ORDERID); | 128 | String eeId = payRecordsMapper.findOrderNumber(ORDERID); |
128 | - if (!"".equals(eeId)){ | 129 | + if (!"".equals(eeId)) { |
129 | // 通知充值电费 | 130 | // 通知充值电费 |
130 | int eeResult = electricityMeterService.rechargeDevices(eeId, PAYMENT, "0", ORDERID); | 131 | int eeResult = electricityMeterService.rechargeDevices(eeId, PAYMENT, "0", ORDERID); |
131 | - if (eeResult > 0){ | 132 | + if (eeResult > 0) { |
132 | // 修改订单状态 | 133 | // 修改订单状态 |
133 | int i1 = payRecordsMapper.updateByPrimaryKey(payRecords); | 134 | int i1 = payRecordsMapper.updateByPrimaryKey(payRecords); |
134 | - if (i1>0){ | 135 | + if (i1 > 0) { |
135 | WebSocketServer webSocketServer = new WebSocketServer(); | 136 | WebSocketServer webSocketServer = new WebSocketServer(); |
136 | JSONObject jsonObject = new JSONObject(); | 137 | JSONObject jsonObject = new JSONObject(); |
137 | jsonObject.put("orderNumber", ORDERID); | 138 | jsonObject.put("orderNumber", ORDERID); |
138 | jsonObject.put("success", "Y"); | 139 | jsonObject.put("success", "Y"); |
139 | webSocketServer.broadcast(jsonObject.toJSONString()); | 140 | webSocketServer.broadcast(jsonObject.toJSONString()); |
140 | - }else { | 141 | + } else { |
141 | WebSocketServer webSocketServer = new WebSocketServer(); | 142 | WebSocketServer webSocketServer = new WebSocketServer(); |
142 | JSONObject jsonObject = new JSONObject(); | 143 | JSONObject jsonObject = new JSONObject(); |
143 | jsonObject.put("orderNumber", ORDERID); | 144 | jsonObject.put("orderNumber", ORDERID); |
144 | jsonObject.put("success", "N"); | 145 | jsonObject.put("success", "N"); |
145 | webSocketServer.broadcast(jsonObject.toJSONString()); | 146 | webSocketServer.broadcast(jsonObject.toJSONString()); |
146 | } | 147 | } |
147 | - }else { | 148 | + } else { |
148 | WebSocketServer webSocketServer = new WebSocketServer(); | 149 | WebSocketServer webSocketServer = new WebSocketServer(); |
149 | JSONObject jsonObject = new JSONObject(); | 150 | JSONObject jsonObject = new JSONObject(); |
150 | jsonObject.put("orderNumber", ORDERID); | 151 | jsonObject.put("orderNumber", ORDERID); |
@@ -152,29 +153,29 @@ public class PayRseponeController { | @@ -152,29 +153,29 @@ public class PayRseponeController { | ||
152 | webSocketServer.broadcast(jsonObject.toJSONString()); | 153 | webSocketServer.broadcast(jsonObject.toJSONString()); |
153 | } | 154 | } |
154 | } | 155 | } |
155 | - }else { | 156 | + } else { |
156 | // 查询该订单设备编号 | 157 | // 查询该订单设备编号 |
157 | String wmId = payRecordsMapper.findOrderNumber(ORDERID); | 158 | String wmId = payRecordsMapper.findOrderNumber(ORDERID); |
158 | // 通知充值水费 | 159 | // 通知充值水费 |
159 | - if (!"".equals(wmId)){ | 160 | + if (!"".equals(wmId)) { |
160 | ResultJson resultJson = waterMeterService.payWater(PAYMENT, wmId); | 161 | ResultJson resultJson = waterMeterService.payWater(PAYMENT, wmId); |
161 | - if ("200".equals(resultJson.getCode())){ | 162 | + if ("200".equals(resultJson.getCode())) { |
162 | // 修改订单状态 | 163 | // 修改订单状态 |
163 | int i1 = payRecordsMapper.updateByPrimaryKey(payRecords); | 164 | int i1 = payRecordsMapper.updateByPrimaryKey(payRecords); |
164 | - if (i1>0){ | 165 | + if (i1 > 0) { |
165 | WebSocketServer webSocketServer = new WebSocketServer(); | 166 | WebSocketServer webSocketServer = new WebSocketServer(); |
166 | JSONObject jsonObject = new JSONObject(); | 167 | JSONObject jsonObject = new JSONObject(); |
167 | jsonObject.put("orderNumber", ORDERID); | 168 | jsonObject.put("orderNumber", ORDERID); |
168 | jsonObject.put("success", "Y"); | 169 | jsonObject.put("success", "Y"); |
169 | webSocketServer.broadcast(jsonObject.toJSONString()); | 170 | webSocketServer.broadcast(jsonObject.toJSONString()); |
170 | - }else { | 171 | + } else { |
171 | WebSocketServer webSocketServer = new WebSocketServer(); | 172 | WebSocketServer webSocketServer = new WebSocketServer(); |
172 | JSONObject jsonObject = new JSONObject(); | 173 | JSONObject jsonObject = new JSONObject(); |
173 | jsonObject.put("orderNumber", ORDERID); | 174 | jsonObject.put("orderNumber", ORDERID); |
174 | jsonObject.put("success", "N"); | 175 | jsonObject.put("success", "N"); |
175 | webSocketServer.broadcast(jsonObject.toJSONString()); | 176 | webSocketServer.broadcast(jsonObject.toJSONString()); |
176 | } | 177 | } |
177 | - }else { | 178 | + } else { |
178 | WebSocketServer webSocketServer = new WebSocketServer(); | 179 | WebSocketServer webSocketServer = new WebSocketServer(); |
179 | JSONObject jsonObject = new JSONObject(); | 180 | JSONObject jsonObject = new JSONObject(); |
180 | jsonObject.put("orderNumber", ORDERID); | 181 | jsonObject.put("orderNumber", ORDERID); |
@@ -185,7 +186,7 @@ public class PayRseponeController { | @@ -185,7 +186,7 @@ public class PayRseponeController { | ||
185 | } | 186 | } |
186 | 187 | ||
187 | } | 188 | } |
188 | - return i==1? new ResultJson("200","支付回执信息接受成功"):new ResultJson("500","支付回执信息接受失败"); | 189 | + return i == 1 ? new ResultJson("200", "支付回执信息接受成功") : new ResultJson("500", "支付回执信息接受失败"); |
189 | } | 190 | } |
190 | 191 | ||
191 | } | 192 | } |
@@ -33,7 +33,7 @@ public class UserPayController { | @@ -33,7 +33,7 @@ public class UserPayController { | ||
33 | 33 | ||
34 | @ApiOperation(value = "查看缴费房间") | 34 | @ApiOperation(value = "查看缴费房间") |
35 | @RequestMapping("/list") | 35 | @RequestMapping("/list") |
36 | - public List userPayList(@RequestParam(value = "roomNumber", required = false) String roomNumber ){ | 36 | + public List userPayList(@RequestParam(value = "roomNumber", required = false) String roomNumber) { |
37 | 37 | ||
38 | return locationService.userPayList(roomNumber); | 38 | return locationService.userPayList(roomNumber); |
39 | } | 39 | } |
@@ -41,7 +41,7 @@ public class UserPayController { | @@ -41,7 +41,7 @@ public class UserPayController { | ||
41 | @ApiOperation(value = "充值水费") | 41 | @ApiOperation(value = "充值水费") |
42 | @PostMapping("/add") | 42 | @PostMapping("/add") |
43 | public ResultJson payWater(@RequestParam(value = "payFees", required = false) String payFees, | 43 | public ResultJson payWater(@RequestParam(value = "payFees", required = false) String payFees, |
44 | - @RequestParam(value = "wmId", required = false) String wmId){ | 44 | + @RequestParam(value = "wmId", required = false) String wmId) { |
45 | 45 | ||
46 | return waterMeterService.payWater(payFees, wmId); | 46 | return waterMeterService.payWater(payFees, wmId); |
47 | } | 47 | } |
@@ -60,7 +60,7 @@ public class UserPayController { | @@ -60,7 +60,7 @@ public class UserPayController { | ||
60 | 60 | ||
61 | @ApiOperation(value = "钉钉小程序请求水电返回数据") | 61 | @ApiOperation(value = "钉钉小程序请求水电返回数据") |
62 | @PostMapping("/mincData") | 62 | @PostMapping("/mincData") |
63 | - public Map<String, Object> mincData(@RequestParam(value = "loginName", required = false) String loginName){ | 63 | + public Map<String, Object> mincData(@RequestParam(value = "loginName", required = false) String loginName) { |
64 | 64 | ||
65 | Map<String, Object> map = new HashMap<>(); | 65 | Map<String, Object> map = new HashMap<>(); |
66 | /** | 66 | /** |
@@ -21,7 +21,7 @@ public class WaterMeterController { | @@ -21,7 +21,7 @@ public class WaterMeterController { | ||
21 | @ApiOperation(value = "水表单个实施信息查询") | 21 | @ApiOperation(value = "水表单个实施信息查询") |
22 | @RequestMapping("/findRealTime") | 22 | @RequestMapping("/findRealTime") |
23 | @ResponseBody | 23 | @ResponseBody |
24 | - public WaterMeter findRealTime(@RequestParam(value = "wmId", required = false) String wmId){ | 24 | + public WaterMeter findRealTime(@RequestParam(value = "wmId", required = false) String wmId) { |
25 | 25 | ||
26 | return waterMeterService.findRealTime(wmId); | 26 | return waterMeterService.findRealTime(wmId); |
27 | } | 27 | } |
@@ -29,7 +29,7 @@ public class WaterMeterController { | @@ -29,7 +29,7 @@ public class WaterMeterController { | ||
29 | @ApiOperation(value = "查询所有水表编号") | 29 | @ApiOperation(value = "查询所有水表编号") |
30 | @RequestMapping("/waterMeterAll") | 30 | @RequestMapping("/waterMeterAll") |
31 | @ResponseBody | 31 | @ResponseBody |
32 | - public ResultJson waterMeterAll(@RequestParam(value = "wmId", required = false) String wmId){ | 32 | + public ResultJson waterMeterAll(@RequestParam(value = "wmId", required = false) String wmId) { |
33 | 33 | ||
34 | return waterMeterService.waterMeterAll(wmId); | 34 | return waterMeterService.waterMeterAll(wmId); |
35 | } | 35 | } |
@@ -37,7 +37,7 @@ public class WaterMeterController { | @@ -37,7 +37,7 @@ public class WaterMeterController { | ||
37 | 37 | ||
38 | @RequestMapping("/realTime") | 38 | @RequestMapping("/realTime") |
39 | @ResponseBody | 39 | @ResponseBody |
40 | - public int realTime(){ | 40 | + public int realTime() { |
41 | 41 | ||
42 | return waterMeterService.realTime(); | 42 | return waterMeterService.realTime(); |
43 | } | 43 | } |
@@ -17,17 +17,18 @@ public class RestControllerResponseAdvice implements ResponseBodyAdvice<Object> | @@ -17,17 +17,18 @@ public class RestControllerResponseAdvice implements ResponseBodyAdvice<Object> | ||
17 | /** | 17 | /** |
18 | * //判断支持的类型,因为我们定义的BaseResponseVo 里面的data可能是任何类型,这里就不判断统一放过 | 18 | * //判断支持的类型,因为我们定义的BaseResponseVo 里面的data可能是任何类型,这里就不判断统一放过 |
19 | * 如果你想对执行的返回体进行操作,可将上方的Object换成你自己的类型 | 19 | * 如果你想对执行的返回体进行操作,可将上方的Object换成你自己的类型 |
20 | + * | ||
20 | * @param returnType | 21 | * @param returnType |
21 | * @param converterType | 22 | * @param converterType |
22 | * @return | 23 | * @return |
23 | */ | 24 | */ |
24 | @Override | 25 | @Override |
25 | - public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType){ | 26 | + public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) { |
26 | return true; | 27 | return true; |
27 | } | 28 | } |
28 | 29 | ||
29 | @Override | 30 | @Override |
30 | - public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response){ | 31 | + public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { |
31 | // 对body进行封装处理 | 32 | // 对body进行封装处理 |
32 | if (body instanceof String) { | 33 | if (body instanceof String) { |
33 | String msg = (String) body; | 34 | String msg = (String) body; |
@@ -5,7 +5,7 @@ import lombok.Data; | @@ -5,7 +5,7 @@ import lombok.Data; | ||
5 | import java.io.Serializable; | 5 | import java.io.Serializable; |
6 | 6 | ||
7 | @Data | 7 | @Data |
8 | -public class ResultJson<T> implements Serializable{ | 8 | +public class ResultJson<T> implements Serializable { |
9 | private static final long serialVersionUID = 1L; | 9 | private static final long serialVersionUID = 1L; |
10 | 10 | ||
11 | // 状态码 正确为200 | 11 | // 状态码 正确为200 |
@@ -20,7 +20,8 @@ public interface PayRecordsMapper { | @@ -20,7 +20,8 @@ public interface PayRecordsMapper { | ||
20 | 20 | ||
21 | List<PayRecords> findAll(@Param(value = "orderNumber") String orderNumber, | 21 | List<PayRecords> findAll(@Param(value = "orderNumber") String orderNumber, |
22 | @Param(value = "startTime") String startTime, | 22 | @Param(value = "startTime") String startTime, |
23 | - @Param(value = "endTime") String endTime); | 23 | + @Param(value = "endTime") String endTime, |
24 | + @Param(value = "username") String username); | ||
24 | 25 | ||
25 | String findOrderNumber(String orderId); | 26 | String findOrderNumber(String orderId); |
26 | 27 |
@@ -18,8 +18,8 @@ import org.apache.commons.logging.LogFactory; | @@ -18,8 +18,8 @@ import org.apache.commons.logging.LogFactory; | ||
18 | public class HttpClientUtil { | 18 | public class HttpClientUtil { |
19 | 19 | ||
20 | 20 | ||
21 | - public static String httpReader(String url, String code){ | ||
22 | - System.out.println("GetPage:"+url); | 21 | + public static String httpReader(String url, String code) { |
22 | + System.out.println("GetPage:" + url); | ||
23 | 23 | ||
24 | HttpClient client = new HttpClient(); | 24 | HttpClient client = new HttpClient(); |
25 | GetMethod method = new GetMethod(url); | 25 | GetMethod method = new GetMethod(url); |
@@ -40,25 +40,25 @@ public class HttpClientUtil { | @@ -40,25 +40,25 @@ public class HttpClientUtil { | ||
40 | // ���������쳣 | 40 | // ���������쳣 |
41 | System.out.println("���������쳣��"); | 41 | System.out.println("���������쳣��"); |
42 | e.printStackTrace(); | 42 | e.printStackTrace(); |
43 | - } finally{ | 43 | + } finally { |
44 | // �ͷ����� | 44 | // �ͷ����� |
45 | - if(method!=null)method.releaseConnection(); | 45 | + if (method != null) method.releaseConnection(); |
46 | method = null; | 46 | method = null; |
47 | client = null; | 47 | client = null; |
48 | } | 48 | } |
49 | return result; | 49 | return result; |
50 | } | 50 | } |
51 | 51 | ||
52 | - public static String httpGet(String url,String code) { | ||
53 | - System.out.println("GetPage:"+url); | 52 | + public static String httpGet(String url, String code) { |
53 | + System.out.println("GetPage:" + url); | ||
54 | String content = null; | 54 | String content = null; |
55 | HttpClient httpClient = new HttpClient(); | 55 | HttpClient httpClient = new HttpClient(); |
56 | //����header | 56 | //����header |
57 | - httpClient.getParams().setParameter(HttpMethodParams.USER_AGENT,"Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2"); | 57 | + httpClient.getParams().setParameter(HttpMethodParams.USER_AGENT, "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2"); |
58 | GetMethod method = new GetMethod(url); | 58 | GetMethod method = new GetMethod(url); |
59 | try { | 59 | try { |
60 | int statusCode = httpClient.executeMethod(method); | 60 | int statusCode = httpClient.executeMethod(method); |
61 | - System.out.println("httpClientUtils::statusCode="+statusCode); | 61 | + System.out.println("httpClientUtils::statusCode=" + statusCode); |
62 | System.out.println(method.getStatusLine()); | 62 | System.out.println(method.getStatusLine()); |
63 | content = new String(method.getResponseBody(), code); | 63 | content = new String(method.getResponseBody(), code); |
64 | 64 | ||
@@ -66,7 +66,7 @@ public class HttpClientUtil { | @@ -66,7 +66,7 @@ public class HttpClientUtil { | ||
66 | System.out.println("time out"); | 66 | System.out.println("time out"); |
67 | e.printStackTrace(); | 67 | e.printStackTrace(); |
68 | } finally { | 68 | } finally { |
69 | - if(method!=null)method.releaseConnection(); | 69 | + if (method != null) method.releaseConnection(); |
70 | method = null; | 70 | method = null; |
71 | httpClient = null; | 71 | httpClient = null; |
72 | } | 72 | } |
@@ -74,14 +74,14 @@ public class HttpClientUtil { | @@ -74,14 +74,14 @@ public class HttpClientUtil { | ||
74 | } | 74 | } |
75 | 75 | ||
76 | public static String httpPost(String url, Map paramMap, String code) { | 76 | public static String httpPost(String url, Map paramMap, String code) { |
77 | - System.out.println("GetPage:"+url); | 77 | + System.out.println("GetPage:" + url); |
78 | String content = null; | 78 | String content = null; |
79 | if (url == null || url.trim().length() == 0 || paramMap == null | 79 | if (url == null || url.trim().length() == 0 || paramMap == null |
80 | || paramMap.isEmpty()) | 80 | || paramMap.isEmpty()) |
81 | return null; | 81 | return null; |
82 | HttpClient httpClient = new HttpClient(); | 82 | HttpClient httpClient = new HttpClient(); |
83 | //����header | 83 | //����header |
84 | - httpClient.getParams().setParameter(HttpMethodParams.USER_AGENT,"Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2");// | 84 | + httpClient.getParams().setParameter(HttpMethodParams.USER_AGENT, "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.2) Gecko/20090803 Fedora/3.5.2-2.fc11 Firefox/3.5.2");// |
85 | 85 | ||
86 | //�������� | 86 | //�������� |
87 | //httpClient.getHostConfiguration().setProxy("128.128.176.74", 808); | 87 | //httpClient.getHostConfiguration().setProxy("128.128.176.74", 808); |
@@ -108,7 +108,7 @@ public class HttpClientUtil { | @@ -108,7 +108,7 @@ public class HttpClientUtil { | ||
108 | 108 | ||
109 | int statusCode = httpClient.executeMethod(method); | 109 | int statusCode = httpClient.executeMethod(method); |
110 | 110 | ||
111 | - System.out.println("httpClientUtils::statusCode="+statusCode); | 111 | + System.out.println("httpClientUtils::statusCode=" + statusCode); |
112 | 112 | ||
113 | System.out.println(method.getStatusLine()); | 113 | System.out.println(method.getStatusLine()); |
114 | content = new String(method.getResponseBody(), code); | 114 | content = new String(method.getResponseBody(), code); |
@@ -117,7 +117,7 @@ public class HttpClientUtil { | @@ -117,7 +117,7 @@ public class HttpClientUtil { | ||
117 | System.out.println("time out"); | 117 | System.out.println("time out"); |
118 | e.printStackTrace(); | 118 | e.printStackTrace(); |
119 | } finally { | 119 | } finally { |
120 | - if(method!=null)method.releaseConnection(); | 120 | + if (method != null) method.releaseConnection(); |
121 | method = null; | 121 | method = null; |
122 | httpClient = null; | 122 | httpClient = null; |
123 | } | 123 | } |
@@ -3,55 +3,44 @@ package com.sunyo.energy.location.demopay; | @@ -3,55 +3,44 @@ package com.sunyo.energy.location.demopay; | ||
3 | import java.io.*; | 3 | import java.io.*; |
4 | import java.security.*; | 4 | import java.security.*; |
5 | 5 | ||
6 | -public class MD5 | 6 | +public class MD5 { |
7 | 7 | ||
8 | -{ | ||
9 | - | ||
10 | - public static String md5Str(String str) | ||
11 | - { | ||
12 | - if (str == null)return ""; | 8 | + public static String md5Str(String str) { |
9 | + if (str == null) return ""; | ||
13 | return md5Str(str, 0); | 10 | return md5Str(str, 0); |
14 | } | 11 | } |
15 | 12 | ||
16 | 13 | ||
17 | /** | 14 | /** |
18 | * ������ϢժҪ�� | 15 | * ������ϢժҪ�� |
16 | + * | ||
19 | * @param data ����ժҪ�����ݡ� | 17 | * @param data ����ժҪ�����ݡ� |
20 | * @param offset ����ƫ�Ƶ�ַ�� | 18 | * @param offset ����ƫ�Ƶ�ַ�� |
21 | * @param length ���ݳ��ȡ� | 19 | * @param length ���ݳ��ȡ� |
22 | * @return ժҪ�����(16�ֽ�) | 20 | * @return ժҪ�����(16�ֽ�) |
23 | */ | 21 | */ |
24 | - public static String md5Str(String str, int offset) | ||
25 | - { | ||
26 | - try | ||
27 | - { | 22 | + public static String md5Str(String str, int offset) { |
23 | + try { | ||
28 | MessageDigest md5 = MessageDigest.getInstance("MD5"); | 24 | MessageDigest md5 = MessageDigest.getInstance("MD5"); |
29 | byte[] b = str.getBytes("UTF8"); | 25 | byte[] b = str.getBytes("UTF8"); |
30 | md5.update(b, offset, b.length); | 26 | md5.update(b, offset, b.length); |
31 | return byteArrayToHexString(md5.digest()); | 27 | return byteArrayToHexString(md5.digest()); |
32 | - } | ||
33 | - catch (NoSuchAlgorithmException ex) | ||
34 | - { | 28 | + } catch (NoSuchAlgorithmException ex) { |
35 | ex.printStackTrace(); | 29 | ex.printStackTrace(); |
36 | return null; | 30 | return null; |
37 | - } | ||
38 | - catch (UnsupportedEncodingException ex) | ||
39 | - { | 31 | + } catch (UnsupportedEncodingException ex) { |
40 | ex.printStackTrace(); | 32 | ex.printStackTrace(); |
41 | return null; | 33 | return null; |
42 | } | 34 | } |
43 | } | 35 | } |
44 | 36 | ||
45 | /** | 37 | /** |
46 | - * | ||
47 | * @param b byte[] | 38 | * @param b byte[] |
48 | * @return String | 39 | * @return String |
49 | */ | 40 | */ |
50 | - public static String byteArrayToHexString(byte[] b) | ||
51 | - { | 41 | + public static String byteArrayToHexString(byte[] b) { |
52 | String result = ""; | 42 | String result = ""; |
53 | - for (int i = 0; i < b.length; i++) | ||
54 | - { | 43 | + for (int i = 0; i < b.length; i++) { |
55 | result += byteToHexString(b[i]); | 44 | result += byteToHexString(b[i]); |
56 | } | 45 | } |
57 | return result; | 46 | return result; |
@@ -64,14 +53,13 @@ public class MD5 | @@ -64,14 +53,13 @@ public class MD5 | ||
64 | 53 | ||
65 | /** | 54 | /** |
66 | * ���ֽ�ת��Ϊ��Ӧ��16�������� | 55 | * ���ֽ�ת��Ϊ��Ӧ��16�������� |
56 | + * | ||
67 | * @param b byte | 57 | * @param b byte |
68 | * @return String | 58 | * @return String |
69 | */ | 59 | */ |
70 | - public static String byteToHexString(byte b) | ||
71 | - { | 60 | + public static String byteToHexString(byte b) { |
72 | int n = b; | 61 | int n = b; |
73 | - if (n < 0) | ||
74 | - { | 62 | + if (n < 0) { |
75 | n = 256 + n; | 63 | n = 256 + n; |
76 | } | 64 | } |
77 | int d1 = n / 16; | 65 | int d1 = n / 16; |
@@ -79,9 +67,8 @@ public class MD5 | @@ -79,9 +67,8 @@ public class MD5 | ||
79 | return hexDigits[d1] + hexDigits[d2]; | 67 | return hexDigits[d1] + hexDigits[d2]; |
80 | } | 68 | } |
81 | 69 | ||
82 | - public static void main(String[] args) | ||
83 | - { | ||
84 | - System.out.println(byteToHexString((byte)-99)); | 70 | + public static void main(String[] args) { |
71 | + System.out.println(byteToHexString((byte) -99)); | ||
85 | String str = | 72 | String str = |
86 | "eeeeeeeeeeeeeewrw213123122222222222222222222222213123213213213erwer"; | 73 | "eeeeeeeeeeeeeewrw213123122222222222222222222222213123213213213erwer"; |
87 | String ened = MD5.md5Str(str); | 74 | String ened = MD5.md5Str(str); |
@@ -17,7 +17,7 @@ public class QrDemo { | @@ -17,7 +17,7 @@ public class QrDemo { | ||
17 | 17 | ||
18 | 18 | ||
19 | public static String orUrl(String orderId, String payMent) throws UnsupportedEncodingException { | 19 | public static String orUrl(String orderId, String payMent) throws UnsupportedEncodingException { |
20 | - String bankURL="https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain"; | 20 | + String bankURL = "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain"; |
21 | /** | 21 | /** |
22 | * 商户代码 | 22 | * 商户代码 |
23 | */ | 23 | */ |
@@ -36,7 +36,7 @@ public class QrDemo { | @@ -36,7 +36,7 @@ public class QrDemo { | ||
36 | /** | 36 | /** |
37 | * 货币种类 01 人民币 只支持人民币 | 37 | * 货币种类 01 人民币 只支持人民币 |
38 | */ | 38 | */ |
39 | - String CURCODE="01"; | 39 | + String CURCODE = "01"; |
40 | /** | 40 | /** |
41 | * 交易码 | 41 | * 交易码 |
42 | */ | 42 | */ |
@@ -46,12 +46,12 @@ public class QrDemo { | @@ -46,12 +46,12 @@ public class QrDemo { | ||
46 | /** | 46 | /** |
47 | * 返回类型 | 47 | * 返回类型 |
48 | */ | 48 | */ |
49 | - String RETURNTYPE="3"; | 49 | + String RETURNTYPE = "3"; |
50 | String TIMEOUT = ""; | 50 | String TIMEOUT = ""; |
51 | /** | 51 | /** |
52 | * 应柜台的公钥后30位 | 52 | * 应柜台的公钥后30位 |
53 | */ | 53 | */ |
54 | - String PUB32TR2= "57b3055539f4925efaf9dacb020111"; | 54 | + String PUB32TR2 = "57b3055539f4925efaf9dacb020111"; |
55 | // String PUB32TR2= "8578d1cd9340dba556126a71020111"; | 55 | // String PUB32TR2= "8578d1cd9340dba556126a71020111"; |
56 | 56 | ||
57 | StringBuffer tmp = new StringBuffer(); //ÑéÇ©×Ö¶Î | 57 | StringBuffer tmp = new StringBuffer(); //ÑéÇ©×Ö¶Î |
@@ -81,19 +81,19 @@ public class QrDemo { | @@ -81,19 +81,19 @@ public class QrDemo { | ||
81 | tmp.append(PUB32TR2); | 81 | tmp.append(PUB32TR2); |
82 | 82 | ||
83 | Map map = new HashMap(); | 83 | Map map = new HashMap(); |
84 | - map.put("CCB_IBSVersion","V6"); //±ØÊäÏî | ||
85 | - map.put("MERCHANTID",MERCHANTID); | ||
86 | - map.put("BRANCHID",BRANCHID); | ||
87 | - map.put("POSID",POSID); | ||
88 | - map.put("ORDERID",orderId); | ||
89 | - map.put("PAYMENT",payMent); | ||
90 | - map.put("CURCODE",CURCODE); | ||
91 | - map.put("TXCODE",TXCODE); | ||
92 | - map.put("REMARK1",REMARK1); | ||
93 | - map.put("REMARK2",REMARK2); | ||
94 | - map.put("RETURNTYPE",RETURNTYPE); | ||
95 | - map.put("TIMEOUT",TIMEOUT); | ||
96 | - map.put("MAC",MD5.md5Str(tmp.toString())); | 84 | + map.put("CCB_IBSVersion", "V6"); //±ØÊäÏî |
85 | + map.put("MERCHANTID", MERCHANTID); | ||
86 | + map.put("BRANCHID", BRANCHID); | ||
87 | + map.put("POSID", POSID); | ||
88 | + map.put("ORDERID", orderId); | ||
89 | + map.put("PAYMENT", payMent); | ||
90 | + map.put("CURCODE", CURCODE); | ||
91 | + map.put("TXCODE", TXCODE); | ||
92 | + map.put("REMARK1", REMARK1); | ||
93 | + map.put("REMARK2", REMARK2); | ||
94 | + map.put("RETURNTYPE", RETURNTYPE); | ||
95 | + map.put("TIMEOUT", TIMEOUT); | ||
96 | + map.put("MAC", MD5.md5Str(tmp.toString())); | ||
97 | 97 | ||
98 | String ret = HttpClientUtil.httpPost(bankURL, map); | 98 | String ret = HttpClientUtil.httpPost(bankURL, map); |
99 | 99 |
@@ -8,6 +8,7 @@ public class QrORURLDemo { | @@ -8,6 +8,7 @@ public class QrORURLDemo { | ||
8 | public String getSUCCESS() { | 8 | public String getSUCCESS() { |
9 | return SUCCESS; | 9 | return SUCCESS; |
10 | } | 10 | } |
11 | + | ||
11 | public void setSUCCESS(String success) { | 12 | public void setSUCCESS(String success) { |
12 | SUCCESS = success; | 13 | SUCCESS = success; |
13 | } | 14 | } |
@@ -16,6 +16,7 @@ public class QrURLDemo { | @@ -16,6 +16,7 @@ public class QrURLDemo { | ||
16 | public String getPAYURL() { | 16 | public String getPAYURL() { |
17 | return PAYURL; | 17 | return PAYURL; |
18 | } | 18 | } |
19 | + | ||
19 | public void setPAYURL(String payurl) { | 20 | public void setPAYURL(String payurl) { |
20 | PAYURL = payurl; | 21 | PAYURL = payurl; |
21 | } | 22 | } |
@@ -12,7 +12,7 @@ public class PayRecords { | @@ -12,7 +12,7 @@ public class PayRecords { | ||
12 | 12 | ||
13 | private Integer payuserid; | 13 | private Integer payuserid; |
14 | 14 | ||
15 | - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 15 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
16 | private Date paytime; | 16 | private Date paytime; |
17 | 17 | ||
18 | private Integer paylocationid; | 18 | private Integer paylocationid; |
@@ -63,7 +63,7 @@ public class PayRecords { | @@ -63,7 +63,7 @@ public class PayRecords { | ||
63 | this.payuserid = payuserid; | 63 | this.payuserid = payuserid; |
64 | } | 64 | } |
65 | 65 | ||
66 | - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 66 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
67 | public Date getPaytime() { | 67 | public Date getPaytime() { |
68 | return paytime; | 68 | return paytime; |
69 | } | 69 | } |
1 | package com.sunyo.energy.location.service; | 1 | package com.sunyo.energy.location.service; |
2 | 2 | ||
3 | - import com.github.pagehelper.PageInfo; | ||
4 | - import com.sunyo.energy.location.model.PayRecords; | 3 | +import com.github.pagehelper.PageInfo; |
4 | +import com.sunyo.energy.location.model.PayRecords; | ||
5 | 5 | ||
6 | /** | 6 | /** |
7 | * Created by XYH on 2019/12/16. | 7 | * Created by XYH on 2019/12/16. |
8 | */ | 8 | */ |
9 | public interface PayOrderService { | 9 | public interface PayOrderService { |
10 | - PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime); | 10 | + PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime, String username); |
11 | 11 | ||
12 | int addOrder(PayRecords payRecords); | 12 | int addOrder(PayRecords payRecords); |
13 | 13 |
@@ -47,7 +47,7 @@ public class EeInfoServiceImpl implements EeInfoService { | @@ -47,7 +47,7 @@ public class EeInfoServiceImpl implements EeInfoService { | ||
47 | @Override | 47 | @Override |
48 | public PageInfo<ElectricityInfo> getEeInfo(int pageSize, int pageNum, String deviceId) { | 48 | public PageInfo<ElectricityInfo> getEeInfo(int pageSize, int pageNum, String deviceId) { |
49 | 49 | ||
50 | - PageHelper.startPage(pageNum,pageSize); | 50 | + PageHelper.startPage(pageNum, pageSize); |
51 | List<ElectricityInfo> list = electricityInfoMapper.selectAll(deviceId); | 51 | List<ElectricityInfo> list = electricityInfoMapper.selectAll(deviceId); |
52 | PageInfo<ElectricityInfo> result = new PageInfo<>(list); | 52 | PageInfo<ElectricityInfo> result = new PageInfo<>(list); |
53 | 53 |
@@ -35,7 +35,6 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -35,7 +35,6 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
35 | USERSMapper usersMapper; | 35 | USERSMapper usersMapper; |
36 | 36 | ||
37 | 37 | ||
38 | - | ||
39 | /** | 38 | /** |
40 | * 获取电表实时数据/余额 | 39 | * 获取电表实时数据/余额 |
41 | */ | 40 | */ |
@@ -62,21 +61,21 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -62,21 +61,21 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
62 | * 实施获取电表数据 | 61 | * 实施获取电表数据 |
63 | */ | 62 | */ |
64 | @Override | 63 | @Override |
65 | - public ElectricityMeter getEnergyInfoForRealTime(String deviceId){ | 64 | + public ElectricityMeter getEnergyInfoForRealTime(String deviceId) { |
66 | try { | 65 | try { |
67 | - if(!"".equals(deviceId)){ | 66 | + if (!"".equals(deviceId)) { |
68 | Map<String, Object> stringObjectMap = eeInfo(deviceId); | 67 | Map<String, Object> stringObjectMap = eeInfo(deviceId); |
69 | String infoForRealTime = HttpsUtils.sendPost(electricityBanlanceUrl, stringObjectMap); | 68 | String infoForRealTime = HttpsUtils.sendPost(electricityBanlanceUrl, stringObjectMap); |
70 | ElectricityBalanceOne electricityBalanceOne = JSON.parseObject(infoForRealTime, ElectricityBalanceOne.class); | 69 | ElectricityBalanceOne electricityBalanceOne = JSON.parseObject(infoForRealTime, ElectricityBalanceOne.class); |
71 | List<ElectricityMeter> infoForRealTimeList = electricityBalanceOne.getData().getDatas(); | 70 | List<ElectricityMeter> infoForRealTimeList = electricityBalanceOne.getData().getDatas(); |
72 | - for (ElectricityMeter electricityBalanceThree: infoForRealTimeList){ | ||
73 | - if (electricityBalanceThree != null){ | 71 | + for (ElectricityMeter electricityBalanceThree : infoForRealTimeList) { |
72 | + if (electricityBalanceThree != null) { | ||
74 | return electricityBalanceThree; | 73 | return electricityBalanceThree; |
75 | } | 74 | } |
76 | } | 75 | } |
77 | } | 76 | } |
78 | return null; | 77 | return null; |
79 | - }catch (Exception e){ | 78 | + } catch (Exception e) { |
80 | e.printStackTrace(); | 79 | e.printStackTrace(); |
81 | return null; | 80 | return null; |
82 | } | 81 | } |
@@ -84,6 +83,7 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -84,6 +83,7 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
84 | 83 | ||
85 | /** | 84 | /** |
86 | * 电表充值 | 85 | * 电表充值 |
86 | + * | ||
87 | * @param deviceId 设备编号 | 87 | * @param deviceId 设备编号 |
88 | * @param money 充值金额 | 88 | * @param money 充值金额 |
89 | * @param actionType 充值类型 0 充值 1 扣费 | 89 | * @param actionType 充值类型 0 充值 1 扣费 |
@@ -99,20 +99,20 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -99,20 +99,20 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
99 | String moneyString = String.valueOf(bigDecimal); | 99 | String moneyString = String.valueOf(bigDecimal); |
100 | String secret = Md5Utils.getMD5(deviceId + moneyString + "tiansu", true, 32); | 100 | String secret = Md5Utils.getMD5(deviceId + moneyString + "tiansu", true, 32); |
101 | stringObjectMap.put("secret", secret); | 101 | stringObjectMap.put("secret", secret); |
102 | - log.info("电表充值信息{}",stringObjectMap.toString()); | 102 | + log.info("电表充值信息{}", stringObjectMap.toString()); |
103 | try { | 103 | try { |
104 | String result = HttpsUtils.sendPost(rechargeDevicesUrl, stringObjectMap); | 104 | String result = HttpsUtils.sendPost(rechargeDevicesUrl, stringObjectMap); |
105 | - log.info("电表充值反馈结果:{}",result); | 105 | + log.info("电表充值反馈结果:{}", result); |
106 | RechargeDevicesResult rechargeDevicesResult = JSON.parseObject(result, RechargeDevicesResult.class); | 106 | RechargeDevicesResult rechargeDevicesResult = JSON.parseObject(result, RechargeDevicesResult.class); |
107 | List<RechargeDevicesResultData> data = rechargeDevicesResult.getData().getDatas(); | 107 | List<RechargeDevicesResultData> data = rechargeDevicesResult.getData().getDatas(); |
108 | Boolean message = null; | 108 | Boolean message = null; |
109 | - for (RechargeDevicesResultData rechargeDevicesResultData : data){ | 109 | + for (RechargeDevicesResultData rechargeDevicesResultData : data) { |
110 | message = rechargeDevicesResultData.getSuccess(); | 110 | message = rechargeDevicesResultData.getSuccess(); |
111 | } | 111 | } |
112 | - if ("0".equals(rechargeDevicesResult.getErrcode()) && message == true){ | ||
113 | - log.info("电表充值成功,充值额度:{}",money); | 112 | + if ("0".equals(rechargeDevicesResult.getErrcode()) && message == true) { |
113 | + log.info("电表充值成功,充值额度:{}", money); | ||
114 | return 1; | 114 | return 1; |
115 | - }else { | 115 | + } else { |
116 | log.info("电表充值失败,充值额度:{}", money); | 116 | log.info("电表充值失败,充值额度:{}", money); |
117 | /** | 117 | /** |
118 | * 插入临时表 电表接口充值因为硬件问题可能失败 | 118 | * 插入临时表 电表接口充值因为硬件问题可能失败 |
@@ -129,14 +129,14 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -129,14 +129,14 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | - }catch (Exception e){ | 132 | + } catch (Exception e) { |
133 | e.printStackTrace(); | 133 | e.printStackTrace(); |
134 | - log.error("电表充值失败,充值额度:{}",money); | 134 | + log.error("电表充值失败,充值额度:{}", money); |
135 | return 0; | 135 | return 0; |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | - public Map<String, Object> eeInfo(String deviceId){ | 139 | + public Map<String, Object> eeInfo(String deviceId) { |
140 | Map<String, Object> datas = new HashMap<>(); | 140 | Map<String, Object> datas = new HashMap<>(); |
141 | datas.put("deviceId", deviceId); | 141 | datas.put("deviceId", deviceId); |
142 | return datas; | 142 | return datas; |
@@ -145,11 +145,11 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -145,11 +145,11 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
145 | /** | 145 | /** |
146 | * 定时读取电表临时表 发起充值 | 146 | * 定时读取电表临时表 发起充值 |
147 | */ | 147 | */ |
148 | - @Scheduled(fixedDelay = 30000) | ||
149 | - public void electricityInfo(){ | 148 | +// @Scheduled(fixedDelay = 30000) |
149 | + public void electricityInfo() { | ||
150 | List<ElectricityInfo> electricityInfos = electricityInfoMapper.selectAll(""); | 150 | List<ElectricityInfo> electricityInfos = electricityInfoMapper.selectAll(""); |
151 | - if (electricityInfos.size() > 0){ | ||
152 | - for (ElectricityInfo electricityInfo: electricityInfos){ | 151 | + if (electricityInfos.size() > 0) { |
152 | + for (ElectricityInfo electricityInfo : electricityInfos) { | ||
153 | Map<String, Object> stringObjectMap = mapCommon(electricityInfo.getActionType(), | 153 | Map<String, Object> stringObjectMap = mapCommon(electricityInfo.getActionType(), |
154 | electricityInfo.getDeviceId(), | 154 | electricityInfo.getDeviceId(), |
155 | String.valueOf(electricityInfo.getMoney()), | 155 | String.valueOf(electricityInfo.getMoney()), |
@@ -159,13 +159,13 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -159,13 +159,13 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
159 | log.info("电表临时表充值请求信息:{}", electricityInfo.toString()); | 159 | log.info("电表临时表充值请求信息:{}", electricityInfo.toString()); |
160 | log.info("电表临时表充值返回信息:{}", result); | 160 | log.info("电表临时表充值返回信息:{}", result); |
161 | RechargeDevicesResult rechargeDevicesResult = JSON.parseObject(result, RechargeDevicesResult.class); | 161 | RechargeDevicesResult rechargeDevicesResult = JSON.parseObject(result, RechargeDevicesResult.class); |
162 | - if(rechargeDevicesResult.getData()!= null){ | 162 | + if (rechargeDevicesResult.getData() != null) { |
163 | List<RechargeDevicesResultData> data = rechargeDevicesResult.getData().getDatas(); | 163 | List<RechargeDevicesResultData> data = rechargeDevicesResult.getData().getDatas(); |
164 | Boolean message = null; | 164 | Boolean message = null; |
165 | - for (RechargeDevicesResultData rechargeDevicesResultData : data){ | 165 | + for (RechargeDevicesResultData rechargeDevicesResultData : data) { |
166 | message = rechargeDevicesResultData.getSuccess(); | 166 | message = rechargeDevicesResultData.getSuccess(); |
167 | } | 167 | } |
168 | - if ("0".equals(rechargeDevicesResult.getErrcode()) && message == true){ | 168 | + if ("0".equals(rechargeDevicesResult.getErrcode()) && message == true) { |
169 | payRecordsMapper.updateStatus(electricityInfo.getOrderNumber()); | 169 | payRecordsMapper.updateStatus(electricityInfo.getOrderNumber()); |
170 | electricityInfo.setStatus("0"); | 170 | electricityInfo.setStatus("0"); |
171 | electricityInfoMapper.updateByPrimaryKeySelective(electricityInfo); | 171 | electricityInfoMapper.updateByPrimaryKeySelective(electricityInfo); |
@@ -173,9 +173,11 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -173,9 +173,11 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
173 | } | 173 | } |
174 | } | 174 | } |
175 | } | 175 | } |
176 | + log.info("定时任务处理完成"); | ||
177 | + | ||
176 | } | 178 | } |
177 | 179 | ||
178 | - public Map<String, Object> mapCommon( String actionType, String deviceId, String money, String ip_address){ | 180 | + public Map<String, Object> mapCommon(String actionType, String deviceId, String money, String ip_address) { |
179 | Map<String, Object> map = new HashMap<>(); | 181 | Map<String, Object> map = new HashMap<>(); |
180 | map.put("actionType", actionType); | 182 | map.put("actionType", actionType); |
181 | map.put("deviceId", deviceId); | 183 | map.put("deviceId", deviceId); |
@@ -184,22 +186,4 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | @@ -184,22 +186,4 @@ public class ElectricityMeterServiceImp implements ElectricityMeterService { | ||
184 | return map; | 186 | return map; |
185 | } | 187 | } |
186 | 188 | ||
187 | - | ||
188 | - /** | ||
189 | - * 批量添加用户 | ||
190 | - */ | ||
191 | -// @Scheduled(fixedDelay = 10000) | ||
192 | - public void loginName() throws Exception { | ||
193 | - Map<String, Object> stringObjectMap = new HashMap<>(); | ||
194 | - String s = HttpsUtils.sendPostHttpRequest("http://192.168.1.7:18080/api/emcs/getRoomAndDevice", ""); | ||
195 | - List<ElectricityRoomDeviceThree> datas = JSON.parseObject(s, ElectricityRoomDeviceOne.class).getData().getDatas(); | ||
196 | - for (ElectricityRoomDeviceThree electricityRoomDeviceThree: datas){ | ||
197 | - USERS users = new USERS(); | ||
198 | - users.setUserId(electricityRoomDeviceThree.getRoomId()); | ||
199 | - users.setUsername(electricityRoomDeviceThree.getRoomName()); | ||
200 | - users.setPassword(Md5Utils.getMD5("ZZAIRPORT20200631@EMPT", true, 32)); | ||
201 | - usersMapper.insertSelective(users); | ||
202 | - } | ||
203 | - | ||
204 | - } | ||
205 | } | 189 | } |
@@ -30,7 +30,7 @@ public class LocationServiceImp implements LocationService { | @@ -30,7 +30,7 @@ public class LocationServiceImp implements LocationService { | ||
30 | 30 | ||
31 | try { | 31 | try { |
32 | // 房间号如果为null 跳过 | 32 | // 房间号如果为null 跳过 |
33 | - if (!StringUtils.isEmpty(roomNumber)){ | 33 | + if (!StringUtils.isEmpty(roomNumber)) { |
34 | List<Map<String, Object>> list = new ArrayList<>(); | 34 | List<Map<String, Object>> list = new ArrayList<>(); |
35 | /** | 35 | /** |
36 | * 水费查询 | 36 | * 水费查询 |
@@ -39,26 +39,26 @@ public class LocationServiceImp implements LocationService { | @@ -39,26 +39,26 @@ public class LocationServiceImp implements LocationService { | ||
39 | Map<String, Object> thisLocalityWaterMap = locationMapper.userPayList(roomNumber); | 39 | Map<String, Object> thisLocalityWaterMap = locationMapper.userPayList(roomNumber); |
40 | Map<String, Object> distanceWaterMap = new HashMap<>(); | 40 | Map<String, Object> distanceWaterMap = new HashMap<>(); |
41 | // 是否为null 为null则去线上查询 | 41 | // 是否为null 为null则去线上查询 |
42 | - if (thisLocalityWaterMap != null){ | ||
43 | - if (!StringUtils.isEmpty(thisLocalityWaterMap.get("wmSacc").toString()) && !StringUtils.isEmpty( thisLocalityWaterMap.get("wmLacc").toString())){ | 42 | + if (thisLocalityWaterMap != null) { |
43 | + if (!StringUtils.isEmpty(thisLocalityWaterMap.get("wmSacc").toString()) && !StringUtils.isEmpty(thisLocalityWaterMap.get("wmLacc").toString())) { | ||
44 | // 计算剩余量 充值量 减去 消费量 参数1 减去 参数2 | 44 | // 计算剩余量 充值量 减去 消费量 参数1 减去 参数2 |
45 | String subtraction = AllUtils.nubmerSubtraction(thisLocalityWaterMap.get("wmSacc").toString(), thisLocalityWaterMap.get("wmLacc").toString()); | 45 | String subtraction = AllUtils.nubmerSubtraction(thisLocalityWaterMap.get("wmSacc").toString(), thisLocalityWaterMap.get("wmLacc").toString()); |
46 | // 余量 | 46 | // 余量 |
47 | thisLocalityWaterMap.put("subtraction", subtraction); | 47 | thisLocalityWaterMap.put("subtraction", subtraction); |
48 | } | 48 | } |
49 | list.add(thisLocalityWaterMap); | 49 | list.add(thisLocalityWaterMap); |
50 | - }else { | 50 | + } else { |
51 | // 查询该房间号的水表编号 | 51 | // 查询该房间号的水表编号 |
52 | String wmId = locationMapper.findWmId(roomNumber); | 52 | String wmId = locationMapper.findWmId(roomNumber); |
53 | - if (!"".equals(wmId) && "" != wmId){ | ||
54 | - Map<String,Object> waterMaps = new HashMap<>(); | 53 | + if (!"".equals(wmId) && "" != wmId) { |
54 | + Map<String, Object> waterMaps = new HashMap<>(); | ||
55 | WaterMeterServiceImp waterMeterServiceImp = new WaterMeterServiceImp(); | 55 | WaterMeterServiceImp waterMeterServiceImp = new WaterMeterServiceImp(); |
56 | WaterMeter realTime = waterMeterServiceImp.findRealTime(wmId); | 56 | WaterMeter realTime = waterMeterServiceImp.findRealTime(wmId); |
57 | String subtraction = AllUtils.nubmerSubtraction(realTime.getWmSacc(), realTime.getWmLacc()); | 57 | String subtraction = AllUtils.nubmerSubtraction(realTime.getWmSacc(), realTime.getWmLacc()); |
58 | distanceWaterMap.put("subtraction", subtraction); | 58 | distanceWaterMap.put("subtraction", subtraction); |
59 | - distanceWaterMap.put("wmSacc",realTime.getWmSacc()); | ||
60 | - distanceWaterMap.put("wmFmstate",realTime.getWmFmstate()); | ||
61 | - distanceWaterMap.put("wmLacc",realTime.getWmLacc()); | 59 | + distanceWaterMap.put("wmSacc", realTime.getWmSacc()); |
60 | + distanceWaterMap.put("wmFmstate", realTime.getWmFmstate()); | ||
61 | + distanceWaterMap.put("wmLacc", realTime.getWmLacc()); | ||
62 | distanceWaterMap.put("wmId", wmId); | 62 | distanceWaterMap.put("wmId", wmId); |
63 | list.add(distanceWaterMap); | 63 | list.add(distanceWaterMap); |
64 | } | 64 | } |
@@ -67,10 +67,10 @@ public class LocationServiceImp implements LocationService { | @@ -67,10 +67,10 @@ public class LocationServiceImp implements LocationService { | ||
67 | * 电费查询 通过房间号查询设备id | 67 | * 电费查询 通过房间号查询设备id |
68 | */ | 68 | */ |
69 | String eeId = locationMapper.eeId(roomNumber); | 69 | String eeId = locationMapper.eeId(roomNumber); |
70 | - if (!"".equals(eeId)){ | 70 | + if (!"".equals(eeId)) { |
71 | ElectricityMeter energyInfoForRealTime = electricityMeterService.getEnergyInfoForRealTime(eeId); | 71 | ElectricityMeter energyInfoForRealTime = electricityMeterService.getEnergyInfoForRealTime(eeId); |
72 | Map<String, Object> eeMap = new HashMap<>(); | 72 | Map<String, Object> eeMap = new HashMap<>(); |
73 | - if (energyInfoForRealTime != null){ | 73 | + if (energyInfoForRealTime != null) { |
74 | eeMap.put("deviceId", energyInfoForRealTime.getDeviceId()); | 74 | eeMap.put("deviceId", energyInfoForRealTime.getDeviceId()); |
75 | eeMap.put("balance", energyInfoForRealTime.getBalance()); | 75 | eeMap.put("balance", energyInfoForRealTime.getBalance()); |
76 | eeMap.put("wmId", ""); | 76 | eeMap.put("wmId", ""); |
@@ -80,13 +80,11 @@ public class LocationServiceImp implements LocationService { | @@ -80,13 +80,11 @@ public class LocationServiceImp implements LocationService { | ||
80 | return list; | 80 | return list; |
81 | } | 81 | } |
82 | return null; | 82 | return null; |
83 | - }catch (Exception e){ | 83 | + } catch (Exception e) { |
84 | e.printStackTrace(); | 84 | e.printStackTrace(); |
85 | return null; | 85 | return null; |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | 89 | ||
90 | - | ||
91 | - | ||
92 | } | 90 | } |
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
10 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
11 | import org.springframework.util.StringUtils; | 11 | import org.springframework.util.StringUtils; |
12 | 12 | ||
13 | +import java.util.ArrayList; | ||
13 | import java.util.List; | 14 | import java.util.List; |
14 | 15 | ||
15 | /** | 16 | /** |
@@ -22,22 +23,28 @@ public class PayOrderImpl implements PayOrderService { | @@ -22,22 +23,28 @@ public class PayOrderImpl implements PayOrderService { | ||
22 | 23 | ||
23 | 24 | ||
24 | @Override | 25 | @Override |
25 | - public PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime) { | 26 | + public PageInfo<PayRecords> getOrder(int pageSize, int pageNum, String orderNumber, String payTime, String username) { |
26 | 27 | ||
27 | // 开始时间 | 28 | // 开始时间 |
28 | String startTime = ""; | 29 | String startTime = ""; |
29 | // 结束时间 | 30 | // 结束时间 |
30 | String endTime = ""; | 31 | String endTime = ""; |
31 | 32 | ||
32 | - Page<PayRecords> page = PageHelper.startPage(pageNum,pageSize); | 33 | + Page<PayRecords> page = PageHelper.startPage(pageNum, pageSize); |
33 | 34 | ||
34 | - if (!StringUtils.isEmpty(payTime) && !payTime.contains("undefined")){ | 35 | + if (!StringUtils.isEmpty(payTime) && !payTime.contains("undefined")) { |
35 | String[] split = payTime.split(","); | 36 | String[] split = payTime.split(","); |
36 | startTime = split[0].toString(); | 37 | startTime = split[0].toString(); |
37 | endTime = split[1].toString(); | 38 | endTime = split[1].toString(); |
38 | } | 39 | } |
40 | + List<PayRecords> list = new ArrayList<>(); | ||
41 | + if ("admin".equals(username)) { | ||
42 | + username = ""; | ||
43 | + list = recordsMapper.findAll(orderNumber, startTime, endTime, username); | ||
44 | + } else { | ||
45 | + list = recordsMapper.findAll(orderNumber, startTime, endTime, username); | ||
46 | + } | ||
39 | 47 | ||
40 | - List<PayRecords> list = recordsMapper.findAll(orderNumber, startTime, endTime); | ||
41 | 48 | ||
42 | PageInfo<PayRecords> result = new PageInfo<>(list); | 49 | PageInfo<PayRecords> result = new PageInfo<>(list); |
43 | return result; | 50 | return result; |
@@ -40,7 +40,7 @@ public class WaterElectricityParameterServiceImp implements WaterElectricityPara | @@ -40,7 +40,7 @@ public class WaterElectricityParameterServiceImp implements WaterElectricityPara | ||
40 | public WaterElectricityParameter findOneElectricity(String eeId) { | 40 | public WaterElectricityParameter findOneElectricity(String eeId) { |
41 | try { | 41 | try { |
42 | return waterElectricityParameterMapper.findOneElectricity(eeId); | 42 | return waterElectricityParameterMapper.findOneElectricity(eeId); |
43 | - }catch (Exception e){ | 43 | + } catch (Exception e) { |
44 | return null; | 44 | return null; |
45 | } | 45 | } |
46 | } | 46 | } |
@@ -15,6 +15,7 @@ import com.sunyo.energy.location.utils.HttpsUtils; | @@ -15,6 +15,7 @@ import com.sunyo.energy.location.utils.HttpsUtils; | ||
15 | import org.springframework.beans.factory.annotation.Autowired; | 15 | import org.springframework.beans.factory.annotation.Autowired; |
16 | import org.springframework.scheduling.annotation.Scheduled; | 16 | import org.springframework.scheduling.annotation.Scheduled; |
17 | import org.springframework.stereotype.Service; | 17 | import org.springframework.stereotype.Service; |
18 | + | ||
18 | import java.io.UnsupportedEncodingException; | 19 | import java.io.UnsupportedEncodingException; |
19 | import java.math.BigDecimal; | 20 | import java.math.BigDecimal; |
20 | import java.util.Date; | 21 | import java.util.Date; |
@@ -45,7 +46,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -45,7 +46,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
45 | 46 | ||
46 | 47 | ||
47 | @Override | 48 | @Override |
48 | - @Scheduled(cron = "0 0 03 * * ?" ) | 49 | + @Scheduled(cron = "0 0 03 * * ?") |
49 | public int realTime() { | 50 | public int realTime() { |
50 | 51 | ||
51 | try { | 52 | try { |
@@ -55,10 +56,10 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -55,10 +56,10 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
55 | // 远程调用 | 56 | // 远程调用 |
56 | String s = HttpsUtils.httpRequest(addUrl, datas); | 57 | String s = HttpsUtils.httpRequest(addUrl, datas); |
57 | JSONArray jsonArray = JSON.parseArray(s); | 58 | JSONArray jsonArray = JSON.parseArray(s); |
58 | - for (Object jsonObject:jsonArray){ | ||
59 | - WaterMeter waterMeter= new WaterMeter(); | ||
60 | - Map<String,Object> map = (Map)jsonObject; | ||
61 | - if (!map.containsKey("state")){ | 59 | + for (Object jsonObject : jsonArray) { |
60 | + WaterMeter waterMeter = new WaterMeter(); | ||
61 | + Map<String, Object> map = (Map) jsonObject; | ||
62 | + if (!map.containsKey("state")) { | ||
62 | waterMeter.setWmId(map.get("wm_id").toString()); | 63 | waterMeter.setWmId(map.get("wm_id").toString()); |
63 | waterMeter.setWmErrmessage(map.get("wm_errmessage").toString()); | 64 | waterMeter.setWmErrmessage(map.get("wm_errmessage").toString()); |
64 | waterMeter.setWmFmstate(map.get("wm_fmstate").toString()); | 65 | waterMeter.setWmFmstate(map.get("wm_fmstate").toString()); |
@@ -70,15 +71,15 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -70,15 +71,15 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
70 | waterMeter.setCreattime(new Date()); | 71 | waterMeter.setCreattime(new Date()); |
71 | waterMeter.setReamke1(map.get("wm_sacc").toString()); | 72 | waterMeter.setReamke1(map.get("wm_sacc").toString()); |
72 | waterMeterMapper.insertSelective(waterMeter); | 73 | waterMeterMapper.insertSelective(waterMeter); |
73 | - }else { | ||
74 | - if ("0".equals(map.get("state").toString())){ | 74 | + } else { |
75 | + if ("0".equals(map.get("state").toString())) { | ||
75 | return 1; | 76 | return 1; |
76 | } | 77 | } |
77 | return 0; | 78 | return 0; |
78 | } | 79 | } |
79 | } | 80 | } |
80 | return 1; | 81 | return 1; |
81 | - }catch (Exception e){ | 82 | + } catch (Exception e) { |
82 | e.printStackTrace(); | 83 | e.printStackTrace(); |
83 | return 0; | 84 | return 0; |
84 | } | 85 | } |
@@ -92,11 +93,11 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -92,11 +93,11 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
92 | 93 | ||
93 | String s = HttpsUtils.httpRequest(selectUrl, datas); | 94 | String s = HttpsUtils.httpRequest(selectUrl, datas); |
94 | JSONArray jsonArray = JSON.parseArray(s); | 95 | JSONArray jsonArray = JSON.parseArray(s); |
95 | - WaterMeter waterMeter= new WaterMeter(); | ||
96 | - for (Object jsonObject:jsonArray){ | 96 | + WaterMeter waterMeter = new WaterMeter(); |
97 | + for (Object jsonObject : jsonArray) { | ||
97 | 98 | ||
98 | - Map<String,Object> map = (Map)jsonObject; | ||
99 | - if (!map.containsKey("state")){ | 99 | + Map<String, Object> map = (Map) jsonObject; |
100 | + if (!map.containsKey("state")) { | ||
100 | waterMeter.setWmId(map.get("wm_id").toString()); | 101 | waterMeter.setWmId(map.get("wm_id").toString()); |
101 | waterMeter.setWmErrmessage(map.get("wm_errmessage").toString()); | 102 | waterMeter.setWmErrmessage(map.get("wm_errmessage").toString()); |
102 | waterMeter.setWmFmstate(map.get("wm_fmstate").toString()); | 103 | waterMeter.setWmFmstate(map.get("wm_fmstate").toString()); |
@@ -108,7 +109,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -108,7 +109,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
108 | } | 109 | } |
109 | } | 110 | } |
110 | return waterMeter; | 111 | return waterMeter; |
111 | - }catch (Exception e){ | 112 | + } catch (Exception e) { |
112 | e.printStackTrace(); | 113 | e.printStackTrace(); |
113 | return new WaterMeter(); | 114 | return new WaterMeter(); |
114 | } | 115 | } |
@@ -116,6 +117,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -116,6 +117,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
116 | 117 | ||
117 | /** | 118 | /** |
118 | * 水费充值 换算总水量 生成订单 | 119 | * 水费充值 换算总水量 生成订单 |
120 | + * | ||
119 | * @param payFees | 121 | * @param payFees |
120 | * @param wmId | 122 | * @param wmId |
121 | * @return | 123 | * @return |
@@ -128,14 +130,14 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -128,14 +130,14 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
128 | // 得到请求接口 返回值 和总水量 | 130 | // 得到请求接口 返回值 和总水量 |
129 | Map<String, Object> map = allWater(payFees, wmId); | 131 | Map<String, Object> map = allWater(payFees, wmId); |
130 | Map hashMap = JSON.parseObject(map.get("status").toString(), HashMap.class); | 132 | Map hashMap = JSON.parseObject(map.get("status").toString(), HashMap.class); |
131 | - if ("0".equals(hashMap.get("state").toString())){ | 133 | + if ("0".equals(hashMap.get("state").toString())) { |
132 | int update = waterMeterMapper.update(wmId, map.get("allSacc").toString()); | 134 | int update = waterMeterMapper.update(wmId, map.get("allSacc").toString()); |
133 | resultJson.setCode("200"); | 135 | resultJson.setCode("200"); |
134 | - }else { | 136 | + } else { |
135 | resultJson.setCode("203"); | 137 | resultJson.setCode("203"); |
136 | } | 138 | } |
137 | return resultJson; | 139 | return resultJson; |
138 | - }catch (Exception e){ | 140 | + } catch (Exception e) { |
139 | e.printStackTrace(); | 141 | e.printStackTrace(); |
140 | resultJson.setCode("203"); | 142 | resultJson.setCode("203"); |
141 | return resultJson; | 143 | return resultJson; |
@@ -149,8 +151,8 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -149,8 +151,8 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
149 | 151 | ||
150 | List<WaterMeter> waterMeterList = waterMeterMapper.waterMeterAll(wmId); | 152 | List<WaterMeter> waterMeterList = waterMeterMapper.waterMeterAll(wmId); |
151 | 153 | ||
152 | - return new ResultJson("200","success", waterMeterList); | ||
153 | - }catch (Exception e){ | 154 | + return new ResultJson("200", "success", waterMeterList); |
155 | + } catch (Exception e) { | ||
154 | e.printStackTrace(); | 156 | e.printStackTrace(); |
155 | resultJson.setCode("203"); | 157 | resultJson.setCode("203"); |
156 | return resultJson; | 158 | return resultJson; |
@@ -162,39 +164,39 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -162,39 +164,39 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
162 | public ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId) throws UnsupportedEncodingException { | 164 | public ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId) throws UnsupportedEncodingException { |
163 | ResultJson<Object> resultJson = new ResultJson<>(); | 165 | ResultJson<Object> resultJson = new ResultJson<>(); |
164 | // 成功生成水费订单 | 166 | // 成功生成水费订单 |
165 | - if (!"".equals(wmId)){ | 167 | + if (!"".equals(wmId)) { |
166 | PayRecords payRecords = payRecords(payFees, wmId, userId, realName, ""); | 168 | PayRecords payRecords = payRecords(payFees, wmId, userId, realName, ""); |
167 | // 请求返回二维码lujing | 169 | // 请求返回二维码lujing |
168 | String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees); | 170 | String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees); |
169 | 171 | ||
170 | - if(!"".equals(url)){ | 172 | + if (!"".equals(url)) { |
171 | payRecords.setReamke2(url); | 173 | payRecords.setReamke2(url); |
172 | // 返回map 包含订单号 二维码url | 174 | // 返回map 包含订单号 二维码url |
173 | Map<String, Object> map = new HashMap<>(); | 175 | Map<String, Object> map = new HashMap<>(); |
174 | - map.put("url",url); | 176 | + map.put("url", url); |
175 | map.put("orderNumber", payRecords.getOrdernumber()); | 177 | map.put("orderNumber", payRecords.getOrdernumber()); |
176 | resultJson.setData(map); | 178 | resultJson.setData(map); |
177 | } | 179 | } |
178 | int i = payRecordsMapper.insertSelective(payRecords); | 180 | int i = payRecordsMapper.insertSelective(payRecords); |
179 | - if(i>0){ | 181 | + if (i > 0) { |
180 | resultJson.setCode("200"); | 182 | resultJson.setCode("200"); |
181 | } | 183 | } |
182 | - }else { | 184 | + } else { |
183 | 185 | ||
184 | PayRecords payRecords = payRecords(payFees, "", userId, realName, eeId); | 186 | PayRecords payRecords = payRecords(payFees, "", userId, realName, eeId); |
185 | // 请求返回二维码lujing | 187 | // 请求返回二维码lujing |
186 | String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees); | 188 | String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees); |
187 | 189 | ||
188 | - if(!"".equals(url)){ | 190 | + if (!"".equals(url)) { |
189 | payRecords.setReamke2(url); | 191 | payRecords.setReamke2(url); |
190 | // 返回map 包含订单号 二维码url | 192 | // 返回map 包含订单号 二维码url |
191 | Map<String, Object> map = new HashMap<>(); | 193 | Map<String, Object> map = new HashMap<>(); |
192 | - map.put("url",url); | 194 | + map.put("url", url); |
193 | map.put("orderNumber", payRecords.getOrdernumber()); | 195 | map.put("orderNumber", payRecords.getOrdernumber()); |
194 | resultJson.setData(map); | 196 | resultJson.setData(map); |
195 | } | 197 | } |
196 | int i = payRecordsMapper.insertSelective(payRecords); | 198 | int i = payRecordsMapper.insertSelective(payRecords); |
197 | - if(i>0){ | 199 | + if (i > 0) { |
198 | resultJson.setCode("200"); | 200 | resultJson.setCode("200"); |
199 | } | 201 | } |
200 | } | 202 | } |
@@ -204,6 +206,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -204,6 +206,7 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
204 | 206 | ||
205 | /** | 207 | /** |
206 | * 总水量 换算 | 208 | * 总水量 换算 |
209 | + * | ||
207 | * @param payFees | 210 | * @param payFees |
208 | * @param wmId | 211 | * @param wmId |
209 | * @return | 212 | * @return |
@@ -223,32 +226,33 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -223,32 +226,33 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
223 | datas.put("Add_addmode", "2"); | 226 | datas.put("Add_addmode", "2"); |
224 | String status = HttpsUtils.httpRequest(payUrl, datas); | 227 | String status = HttpsUtils.httpRequest(payUrl, datas); |
225 | 228 | ||
226 | - datas.put("allSacc",allSacc); | ||
227 | - datas.put("status",status); | 229 | + datas.put("allSacc", allSacc); |
230 | + datas.put("status", status); | ||
228 | 231 | ||
229 | return datas; | 232 | return datas; |
230 | } | 233 | } |
231 | 234 | ||
232 | /** | 235 | /** |
233 | * 订单生成 | 236 | * 订单生成 |
237 | + * | ||
234 | * @param payFees | 238 | * @param payFees |
235 | * @param wmId | 239 | * @param wmId |
236 | * @param userId | 240 | * @param userId |
237 | * @param realName | 241 | * @param realName |
238 | * @return | 242 | * @return |
239 | */ | 243 | */ |
240 | - public PayRecords payRecords(String payFees, String wmId, String userId, String realName, String eeId){ | 244 | + public PayRecords payRecords(String payFees, String wmId, String userId, String realName, String eeId) { |
241 | 245 | ||
242 | PayRecords payRecords = new PayRecords(); | 246 | PayRecords payRecords = new PayRecords(); |
243 | payRecords.setOrdernumber(AllUtils.getOrderIdByTime()); | 247 | payRecords.setOrdernumber(AllUtils.getOrderIdByTime()); |
244 | payRecords.setPayfees(new BigDecimal(payFees)); | 248 | payRecords.setPayfees(new BigDecimal(payFees)); |
245 | payRecords.setPaystatus(false); | 249 | payRecords.setPaystatus(false); |
246 | - if (!"".equals(wmId)){ | 250 | + if (!"".equals(wmId)) { |
247 | payRecords.setPaytype(false); | 251 | payRecords.setPaytype(false); |
248 | payRecords.setPaytypeaddress(wmId); | 252 | payRecords.setPaytypeaddress(wmId); |
249 | String roomNumber = locationMapper.selectRoomNumber(wmId); | 253 | String roomNumber = locationMapper.selectRoomNumber(wmId); |
250 | payRecords.setPaylocationname(roomNumber); | 254 | payRecords.setPaylocationname(roomNumber); |
251 | - }else { | 255 | + } else { |
252 | payRecords.setPaytype(true); | 256 | payRecords.setPaytype(true); |
253 | payRecords.setPaytypeaddress(eeId); | 257 | payRecords.setPaytypeaddress(eeId); |
254 | String roomNumber = locationMapper.selectRoomNumberElectricity(eeId); | 258 | String roomNumber = locationMapper.selectRoomNumberElectricity(eeId); |
@@ -9,7 +9,7 @@ import java.util.Random; | @@ -9,7 +9,7 @@ import java.util.Random; | ||
9 | public class AllUtils { | 9 | public class AllUtils { |
10 | 10 | ||
11 | // 数字相减 参数1 减去 参数2 | 11 | // 数字相减 参数1 减去 参数2 |
12 | - public static String nubmerSubtraction(String sacc, String lacc){ | 12 | + public static String nubmerSubtraction(String sacc, String lacc) { |
13 | 13 | ||
14 | BigDecimal saccBigDecimal = new BigDecimal(sacc); | 14 | BigDecimal saccBigDecimal = new BigDecimal(sacc); |
15 | BigDecimal laccBigDecimal = new BigDecimal(lacc); | 15 | BigDecimal laccBigDecimal = new BigDecimal(lacc); |
@@ -21,7 +21,7 @@ public class AllUtils { | @@ -21,7 +21,7 @@ public class AllUtils { | ||
21 | } | 21 | } |
22 | 22 | ||
23 | // 数字相除 参数1 除以参数2 | 23 | // 数字相除 参数1 除以参数2 |
24 | - public static String nubmerDivision(String payFees){ | 24 | + public static String nubmerDivision(String payFees) { |
25 | 25 | ||
26 | // 单价 | 26 | // 单价 |
27 | String unitprice = PropertiesLoader.getUnitPrice("unitprice"); | 27 | String unitprice = PropertiesLoader.getUnitPrice("unitprice"); |
@@ -35,7 +35,7 @@ public class AllUtils { | @@ -35,7 +35,7 @@ public class AllUtils { | ||
35 | 35 | ||
36 | 36 | ||
37 | //数字相加 参数1加参数2 | 37 | //数字相加 参数1加参数2 |
38 | - public static String nubmerAdd(String oneWmSacc, String s){ | 38 | + public static String nubmerAdd(String oneWmSacc, String s) { |
39 | 39 | ||
40 | BigDecimal bigDecimal = new BigDecimal(oneWmSacc); | 40 | BigDecimal bigDecimal = new BigDecimal(oneWmSacc); |
41 | BigDecimal bigDecimal1 = new BigDecimal(s); | 41 | BigDecimal bigDecimal1 = new BigDecimal(s); |
@@ -47,13 +47,13 @@ public class AllUtils { | @@ -47,13 +47,13 @@ public class AllUtils { | ||
47 | // 订单号生成 时间加随机数 | 47 | // 订单号生成 时间加随机数 |
48 | public static String getOrderIdByTime() { | 48 | public static String getOrderIdByTime() { |
49 | // 商户码 | 49 | // 商户码 |
50 | - String merchantId ="105001453995827"; | ||
51 | - String result=""; | ||
52 | - Random random=new Random(); | ||
53 | - for(int i=0;i<3;i++){ | ||
54 | - result+=random.nextInt(10); | 50 | + String merchantId = "105001453995827"; |
51 | + String result = ""; | ||
52 | + Random random = new Random(); | ||
53 | + for (int i = 0; i < 3; i++) { | ||
54 | + result += random.nextInt(10); | ||
55 | } | 55 | } |
56 | - return merchantId+result; | 56 | + return merchantId + result; |
57 | } | 57 | } |
58 | 58 | ||
59 | 59 |
@@ -151,10 +151,8 @@ public class HttpsUtils { | @@ -151,10 +151,8 @@ public class HttpsUtils { | ||
151 | /** | 151 | /** |
152 | * 发送POST请求 | 152 | * 发送POST请求 |
153 | * | 153 | * |
154 | - * @param url | ||
155 | - * 目的地址 | ||
156 | - * @param parameters | ||
157 | - * 请求参数,Map类型。 | 154 | + * @param url 目的地址 |
155 | + * @param parameters 请求参数,Map类型。 | ||
158 | * @return 远程响应结果 | 156 | * @return 远程响应结果 |
159 | */ | 157 | */ |
160 | public static String sendPost(String url, Map<String, Object> parameters) { | 158 | public static String sendPost(String url, Map<String, Object> parameters) { |
@@ -13,6 +13,7 @@ public class Md5Utils { | @@ -13,6 +13,7 @@ public class Md5Utils { | ||
13 | 13 | ||
14 | /** | 14 | /** |
15 | * 通用加密方法 | 15 | * 通用加密方法 |
16 | + * | ||
16 | * @param str 需要加密的字符串 | 17 | * @param str 需要加密的字符串 |
17 | * @param isUpper 字母大小写(false为小写,true为大写) | 18 | * @param isUpper 字母大小写(false为小写,true为大写) |
18 | * @param bit 加密的位数(16,32,64) | 19 | * @param bit 加密的位数(16,32,64) |
@@ -9,11 +9,10 @@ import java.util.Properties; | @@ -9,11 +9,10 @@ import java.util.Properties; | ||
9 | 9 | ||
10 | 10 | ||
11 | /** | 11 | /** |
12 | - * @description roperties属性文件加载 | ||
13 | * @author gerry.zhang | 12 | * @author gerry.zhang |
14 | - * @date 2014-5-29 | ||
15 | * @version 1.0 | 13 | * @version 1.0 |
16 | - * | 14 | + * @description roperties属性文件加载 |
15 | + * @date 2014-5-29 | ||
17 | */ | 16 | */ |
18 | public class PropertiesLoader { | 17 | public class PropertiesLoader { |
19 | 18 | ||
@@ -24,15 +23,16 @@ public class PropertiesLoader { | @@ -24,15 +23,16 @@ public class PropertiesLoader { | ||
24 | 23 | ||
25 | /** | 24 | /** |
26 | * load properties文件 | 25 | * load properties文件 |
26 | + * | ||
27 | * @param propertyFile | 27 | * @param propertyFile |
28 | * @return | 28 | * @return |
29 | */ | 29 | */ |
30 | - public static Properties loadProperty(String propertyFile){ | ||
31 | - InputStream in=PropertiesLoader.class.getResourceAsStream(propertyFile); | 30 | + public static Properties loadProperty(String propertyFile) { |
31 | + InputStream in = PropertiesLoader.class.getResourceAsStream(propertyFile); | ||
32 | Properties properties = new Properties(); | 32 | Properties properties = new Properties(); |
33 | - try{ | 33 | + try { |
34 | properties.load(in); | 34 | properties.load(in); |
35 | - }catch(Exception e){ | 35 | + } catch (Exception e) { |
36 | logger.error("解析文件失败:文件名={}", propertyFile, e); | 36 | logger.error("解析文件失败:文件名={}", propertyFile, e); |
37 | } | 37 | } |
38 | return properties; | 38 | return properties; |
@@ -45,13 +45,10 @@ public class PropertiesLoader { | @@ -45,13 +45,10 @@ public class PropertiesLoader { | ||
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | - public static String get(String key,String propertyFile){ | 48 | + public static String get(String key, String propertyFile) { |
49 | Properties properties = loadProperty(propertyFile); | 49 | Properties properties = loadProperty(propertyFile); |
50 | return (String) properties.get(key); | 50 | return (String) properties.get(key); |
51 | } | 51 | } |
52 | 52 | ||
53 | 53 | ||
54 | - | ||
55 | - | ||
56 | - | ||
57 | } | 54 | } |
@@ -46,6 +46,6 @@ public class FastjsonConverter { | @@ -46,6 +46,6 @@ public class FastjsonConverter { | ||
46 | stringConverter.setSupportedMediaTypes(fastMediaTypes); | 46 | stringConverter.setSupportedMediaTypes(fastMediaTypes); |
47 | 47 | ||
48 | // 将转换器添加到converters中 | 48 | // 将转换器添加到converters中 |
49 | - return new HttpMessageConverters(stringConverter,fastConverter); | 49 | + return new HttpMessageConverters(stringConverter, fastConverter); |
50 | } | 50 | } |
51 | } | 51 | } |
@@ -17,45 +17,55 @@ import java.util.concurrent.ConcurrentHashMap; | @@ -17,45 +17,55 @@ import java.util.concurrent.ConcurrentHashMap; | ||
17 | 17 | ||
18 | /** | 18 | /** |
19 | * WebSocketServer | 19 | * WebSocketServer |
20 | + * | ||
20 | * @author zhengkai.blog.csdn.net | 21 | * @author zhengkai.blog.csdn.net |
21 | */ | 22 | */ |
22 | @ServerEndpoint("/imserver") | 23 | @ServerEndpoint("/imserver") |
23 | @Component | 24 | @Component |
24 | public class WebSocketServer { | 25 | public class WebSocketServer { |
25 | 26 | ||
26 | - static Log log= LogFactory.get(WebSocketServer.class); | ||
27 | - /**静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。*/ | 27 | + static Log log = LogFactory.get(WebSocketServer.class); |
28 | + /** | ||
29 | + * 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 | ||
30 | + */ | ||
28 | private static int onlineCount = 0; | 31 | private static int onlineCount = 0; |
29 | - /**concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。*/ | ||
30 | - private static ConcurrentHashMap<String,WebSocketServer> webSocketMap = new ConcurrentHashMap<>(); | ||
31 | - /**与某个客户端的连接会话,需要通过它来给客户端发送数据*/ | 32 | + /** |
33 | + * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 | ||
34 | + */ | ||
35 | + private static ConcurrentHashMap<String, WebSocketServer> webSocketMap = new ConcurrentHashMap<>(); | ||
36 | + /** | ||
37 | + * 与某个客户端的连接会话,需要通过它来给客户端发送数据 | ||
38 | + */ | ||
32 | private Session session; | 39 | private Session session; |
33 | - /**接收userId*/ | ||
34 | - private String orderNum=""; | 40 | + /** |
41 | + * 接收userId | ||
42 | + */ | ||
43 | + private String orderNum = ""; | ||
35 | 44 | ||
36 | /** | 45 | /** |
37 | - * 连接建立成功调用的方法*/ | 46 | + * 连接建立成功调用的方法 |
47 | + */ | ||
38 | @OnOpen | 48 | @OnOpen |
39 | public void onOpen(Session session) { | 49 | public void onOpen(Session session) { |
40 | this.session = session; | 50 | this.session = session; |
41 | - this.orderNum=orderNum; | ||
42 | - if(webSocketMap.containsKey(orderNum)){ | 51 | + this.orderNum = orderNum; |
52 | + if (webSocketMap.containsKey(orderNum)) { | ||
43 | webSocketMap.remove(orderNum); | 53 | webSocketMap.remove(orderNum); |
44 | - webSocketMap.put(orderNum,this); | 54 | + webSocketMap.put(orderNum, this); |
45 | //加入set中 | 55 | //加入set中 |
46 | - }else{ | ||
47 | - webSocketMap.put(orderNum,this); | 56 | + } else { |
57 | + webSocketMap.put(orderNum, this); | ||
48 | //加入set中 | 58 | //加入set中 |
49 | addOnlineCount(); | 59 | addOnlineCount(); |
50 | //在线数加1 | 60 | //在线数加1 |
51 | } | 61 | } |
52 | 62 | ||
53 | - log.info("用户连接:"+orderNum+",当前在线人数为:" + getOnlineCount()); | 63 | + log.info("用户连接:" + orderNum + ",当前在线人数为:" + getOnlineCount()); |
54 | 64 | ||
55 | try { | 65 | try { |
56 | sendMessage("连接成功"); | 66 | sendMessage("连接成功"); |
57 | } catch (IOException e) { | 67 | } catch (IOException e) { |
58 | - log.error("用户:"+orderNum+",网络异常!!!!!!"); | 68 | + log.error("用户:" + orderNum + ",网络异常!!!!!!"); |
59 | } | 69 | } |
60 | } | 70 | } |
61 | 71 | ||
@@ -64,12 +74,12 @@ public class WebSocketServer { | @@ -64,12 +74,12 @@ public class WebSocketServer { | ||
64 | */ | 74 | */ |
65 | @OnClose | 75 | @OnClose |
66 | public void onClose() { | 76 | public void onClose() { |
67 | - if(webSocketMap.containsKey(orderNum)){ | 77 | + if (webSocketMap.containsKey(orderNum)) { |
68 | webSocketMap.remove(orderNum); | 78 | webSocketMap.remove(orderNum); |
69 | //从set中删除 | 79 | //从set中删除 |
70 | subOnlineCount(); | 80 | subOnlineCount(); |
71 | } | 81 | } |
72 | - log.info("用户退出:"+orderNum+",当前在线人数为:" + getOnlineCount()); | 82 | + log.info("用户退出:" + orderNum + ",当前在线人数为:" + getOnlineCount()); |
73 | } | 83 | } |
74 | 84 | ||
75 | /** | 85 | /** |
@@ -103,14 +113,15 @@ public class WebSocketServer { | @@ -103,14 +113,15 @@ public class WebSocketServer { | ||
103 | 113 | ||
104 | /** | 114 | /** |
105 | * 群发消息 | 115 | * 群发消息 |
116 | + * | ||
106 | * @param content 要广播的内容 | 117 | * @param content 要广播的内容 |
107 | */ | 118 | */ |
108 | - public void broadcast(String content){ | ||
109 | - for (ConcurrentHashMap.Entry<String,WebSocketServer> entry : webSocketMap.entrySet()) { | ||
110 | - WebSocketServer webSocketServerE= entry.getValue(); | 119 | + public void broadcast(String content) { |
120 | + for (ConcurrentHashMap.Entry<String, WebSocketServer> entry : webSocketMap.entrySet()) { | ||
121 | + WebSocketServer webSocketServerE = entry.getValue(); | ||
111 | try { | 122 | try { |
112 | webSocketServerE.sendMessage(content); | 123 | webSocketServerE.sendMessage(content); |
113 | - }catch (IOException e){ | 124 | + } catch (IOException e) { |
114 | e.printStackTrace(); | 125 | e.printStackTrace(); |
115 | } | 126 | } |
116 | 127 | ||
@@ -119,15 +130,15 @@ public class WebSocketServer { | @@ -119,15 +130,15 @@ public class WebSocketServer { | ||
119 | } | 130 | } |
120 | 131 | ||
121 | /** | 132 | /** |
122 | - * | ||
123 | * @param session | 133 | * @param session |
124 | * @param error | 134 | * @param error |
125 | */ | 135 | */ |
126 | @OnError | 136 | @OnError |
127 | public void onError(Session session, Throwable error) { | 137 | public void onError(Session session, Throwable error) { |
128 | - log.error("用户错误:"+this.orderNum+",原因:"+error.getMessage()); | 138 | + log.error("用户错误:" + this.orderNum + ",原因:" + error.getMessage()); |
129 | error.printStackTrace(); | 139 | error.printStackTrace(); |
130 | } | 140 | } |
141 | + | ||
131 | /** | 142 | /** |
132 | * 实现服务器主动推送 | 143 | * 实现服务器主动推送 |
133 | */ | 144 | */ |
@@ -138,13 +149,13 @@ public class WebSocketServer { | @@ -138,13 +149,13 @@ public class WebSocketServer { | ||
138 | 149 | ||
139 | /** | 150 | /** |
140 | * 发送自定义消息 | 151 | * 发送自定义消息 |
141 | - * */ | ||
142 | - public static void sendInfo(String message,@PathParam("orderNum") String orderNum) throws IOException { | ||
143 | - log.info("发送消息到:"+orderNum+",报文:"+message); | ||
144 | - if(StringUtils.isNotBlank(orderNum)&&webSocketMap.containsKey(orderNum)){ | 152 | + */ |
153 | + public static void sendInfo(String message, @PathParam("orderNum") String orderNum) throws IOException { | ||
154 | + log.info("发送消息到:" + orderNum + ",报文:" + message); | ||
155 | + if (StringUtils.isNotBlank(orderNum) && webSocketMap.containsKey(orderNum)) { | ||
145 | webSocketMap.get(orderNum).sendMessage(message); | 156 | webSocketMap.get(orderNum).sendMessage(message); |
146 | - }else{ | ||
147 | - log.error("用户"+orderNum+",不在线!"); | 157 | + } else { |
158 | + log.error("用户" + orderNum + ",不在线!"); | ||
148 | } | 159 | } |
149 | } | 160 | } |
150 | 161 |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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.ElectricityInfoMapper" > | ||
4 | - <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.ElectricityInfo" > | ||
5 | - <id column="order_number" property="orderNumber" jdbcType="VARCHAR" /> | ||
6 | - <result column="action_type" property="actionType" jdbcType="VARCHAR" /> | ||
7 | - <result column="device_id" property="deviceId" jdbcType="VARCHAR" /> | ||
8 | - <result column="money" property="money" jdbcType="DECIMAL" /> | ||
9 | - <result column="ip_address" property="ipAddress" jdbcType="VARCHAR" /> | ||
10 | - <result column="secret" property="secret" jdbcType="VARCHAR" /> | ||
11 | - <result column="status" property="status" jdbcType="VARCHAR" /> | ||
12 | - <result column="opert_time" property="opertTime" jdbcType="TIMESTAMP" /> | ||
13 | - <result column="edit_time" property="editTime" jdbcType="TIMESTAMP" /> | ||
14 | - <result column="info_status" property="infoStatus" jdbcType="VARCHAR" /> | 3 | +<mapper namespace="com.sunyo.energy.location.dao.ElectricityInfoMapper"> |
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.ElectricityInfo"> | ||
5 | + <id column="order_number" property="orderNumber" jdbcType="VARCHAR"/> | ||
6 | + <result column="action_type" property="actionType" jdbcType="VARCHAR"/> | ||
7 | + <result column="device_id" property="deviceId" jdbcType="VARCHAR"/> | ||
8 | + <result column="money" property="money" jdbcType="DECIMAL"/> | ||
9 | + <result column="ip_address" property="ipAddress" jdbcType="VARCHAR"/> | ||
10 | + <result column="secret" property="secret" jdbcType="VARCHAR"/> | ||
11 | + <result column="status" property="status" jdbcType="VARCHAR"/> | ||
12 | + <result column="opert_time" property="opertTime" jdbcType="TIMESTAMP"/> | ||
13 | + <result column="edit_time" property="editTime" jdbcType="TIMESTAMP"/> | ||
14 | + <result column="info_status" property="infoStatus" jdbcType="VARCHAR"/> | ||
15 | </resultMap> | 15 | </resultMap> |
16 | - <sql id="Base_Column_List" > | 16 | + <sql id="Base_Column_List"> |
17 | order_number, action_type, device_id, money, ip_address, secret, status, opert_time, | 17 | order_number, action_type, device_id, money, ip_address, secret, status, opert_time, |
18 | edit_time, info_status | 18 | edit_time, info_status |
19 | </sql> | 19 | </sql> |
20 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | 20 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> |
21 | select | 21 | select |
22 | - <include refid="Base_Column_List" /> | 22 | + <include refid="Base_Column_List"/> |
23 | from electricity_info | 23 | from electricity_info |
24 | where order_number = #{orderNumber,jdbcType=VARCHAR} | 24 | where order_number = #{orderNumber,jdbcType=VARCHAR} |
25 | </select> | 25 | </select> |
26 | 26 | ||
27 | <select id="selectAll" resultMap="BaseResultMap" parameterType="string"> | 27 | <select id="selectAll" resultMap="BaseResultMap" parameterType="string"> |
28 | select | 28 | select |
29 | - <include refid="Base_Column_List" /> | 29 | + <include refid="Base_Column_List"/> |
30 | from electricity_info | 30 | from electricity_info |
31 | where status = '1' | 31 | where status = '1' |
32 | - <if test="deviceId != null and deviceId != ''" > | 32 | + <if test="deviceId != null and deviceId != ''"> |
33 | and device_id = #{deviceId, jdbcType=VARCHAR} | 33 | and device_id = #{deviceId, jdbcType=VARCHAR} |
34 | </if> | 34 | </if> |
35 | order by opert_time desc | 35 | order by opert_time desc |
36 | </select> | 36 | </select> |
37 | 37 | ||
38 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | 38 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
39 | delete from electricity_info | 39 | delete from electricity_info |
40 | where order_number = #{orderNumber,jdbcType=VARCHAR} | 40 | where order_number = #{orderNumber,jdbcType=VARCHAR} |
41 | </delete> | 41 | </delete> |
42 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.ElectricityInfo" > | 42 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.ElectricityInfo"> |
43 | insert into electricity_info (order_number, action_type, device_id, | 43 | insert into electricity_info (order_number, action_type, device_id, |
44 | money, ip_address, secret, | 44 | money, ip_address, secret, |
45 | status, opert_time, edit_time, | 45 | status, opert_time, edit_time, |
@@ -49,107 +49,107 @@ | @@ -49,107 +49,107 @@ | ||
49 | #{status,jdbcType=VARCHAR}, #{opertTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, | 49 | #{status,jdbcType=VARCHAR}, #{opertTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, |
50 | #{infoStatus,jdbcType=VARCHAR}) | 50 | #{infoStatus,jdbcType=VARCHAR}) |
51 | </insert> | 51 | </insert> |
52 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.ElectricityInfo" > | 52 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.ElectricityInfo"> |
53 | insert into electricity_info | 53 | insert into electricity_info |
54 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
55 | - <if test="orderNumber != null" > | 54 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
55 | + <if test="orderNumber != null"> | ||
56 | order_number, | 56 | order_number, |
57 | </if> | 57 | </if> |
58 | - <if test="actionType != null" > | 58 | + <if test="actionType != null"> |
59 | action_type, | 59 | action_type, |
60 | </if> | 60 | </if> |
61 | - <if test="deviceId != null" > | 61 | + <if test="deviceId != null"> |
62 | device_id, | 62 | device_id, |
63 | </if> | 63 | </if> |
64 | - <if test="money != null" > | 64 | + <if test="money != null"> |
65 | money, | 65 | money, |
66 | </if> | 66 | </if> |
67 | - <if test="ipAddress != null" > | 67 | + <if test="ipAddress != null"> |
68 | ip_address, | 68 | ip_address, |
69 | </if> | 69 | </if> |
70 | - <if test="secret != null" > | 70 | + <if test="secret != null"> |
71 | secret, | 71 | secret, |
72 | </if> | 72 | </if> |
73 | - <if test="status != null" > | 73 | + <if test="status != null"> |
74 | status, | 74 | status, |
75 | </if> | 75 | </if> |
76 | - <if test="opertTime != null" > | 76 | + <if test="opertTime != null"> |
77 | opert_time, | 77 | opert_time, |
78 | </if> | 78 | </if> |
79 | - <if test="editTime != null" > | 79 | + <if test="editTime != null"> |
80 | edit_time, | 80 | edit_time, |
81 | </if> | 81 | </if> |
82 | - <if test="infoStatus != null" > | 82 | + <if test="infoStatus != null"> |
83 | info_status, | 83 | info_status, |
84 | </if> | 84 | </if> |
85 | </trim> | 85 | </trim> |
86 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
87 | - <if test="orderNumber != null" > | 86 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
87 | + <if test="orderNumber != null"> | ||
88 | #{orderNumber,jdbcType=VARCHAR}, | 88 | #{orderNumber,jdbcType=VARCHAR}, |
89 | </if> | 89 | </if> |
90 | - <if test="actionType != null" > | 90 | + <if test="actionType != null"> |
91 | #{actionType,jdbcType=VARCHAR}, | 91 | #{actionType,jdbcType=VARCHAR}, |
92 | </if> | 92 | </if> |
93 | - <if test="deviceId != null" > | 93 | + <if test="deviceId != null"> |
94 | #{deviceId,jdbcType=VARCHAR}, | 94 | #{deviceId,jdbcType=VARCHAR}, |
95 | </if> | 95 | </if> |
96 | - <if test="money != null" > | 96 | + <if test="money != null"> |
97 | #{money,jdbcType=DECIMAL}, | 97 | #{money,jdbcType=DECIMAL}, |
98 | </if> | 98 | </if> |
99 | - <if test="ipAddress != null" > | 99 | + <if test="ipAddress != null"> |
100 | #{ipAddress,jdbcType=VARCHAR}, | 100 | #{ipAddress,jdbcType=VARCHAR}, |
101 | </if> | 101 | </if> |
102 | - <if test="secret != null" > | 102 | + <if test="secret != null"> |
103 | #{secret,jdbcType=VARCHAR}, | 103 | #{secret,jdbcType=VARCHAR}, |
104 | </if> | 104 | </if> |
105 | - <if test="status != null" > | 105 | + <if test="status != null"> |
106 | #{status,jdbcType=VARCHAR}, | 106 | #{status,jdbcType=VARCHAR}, |
107 | </if> | 107 | </if> |
108 | - <if test="opertTime != null" > | 108 | + <if test="opertTime != null"> |
109 | #{opertTime,jdbcType=TIMESTAMP}, | 109 | #{opertTime,jdbcType=TIMESTAMP}, |
110 | </if> | 110 | </if> |
111 | - <if test="editTime != null" > | 111 | + <if test="editTime != null"> |
112 | #{editTime,jdbcType=TIMESTAMP}, | 112 | #{editTime,jdbcType=TIMESTAMP}, |
113 | </if> | 113 | </if> |
114 | - <if test="infoStatus != null" > | 114 | + <if test="infoStatus != null"> |
115 | #{infoStatus,jdbcType=VARCHAR}, | 115 | #{infoStatus,jdbcType=VARCHAR}, |
116 | </if> | 116 | </if> |
117 | </trim> | 117 | </trim> |
118 | </insert> | 118 | </insert> |
119 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.ElectricityInfo" > | 119 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.ElectricityInfo"> |
120 | update electricity_info | 120 | update electricity_info |
121 | - <set > | ||
122 | - <if test="actionType != null" > | 121 | + <set> |
122 | + <if test="actionType != null"> | ||
123 | action_type = #{actionType,jdbcType=VARCHAR}, | 123 | action_type = #{actionType,jdbcType=VARCHAR}, |
124 | </if> | 124 | </if> |
125 | - <if test="deviceId != null" > | 125 | + <if test="deviceId != null"> |
126 | device_id = #{deviceId,jdbcType=VARCHAR}, | 126 | device_id = #{deviceId,jdbcType=VARCHAR}, |
127 | </if> | 127 | </if> |
128 | - <if test="money != null" > | 128 | + <if test="money != null"> |
129 | money = #{money,jdbcType=DECIMAL}, | 129 | money = #{money,jdbcType=DECIMAL}, |
130 | </if> | 130 | </if> |
131 | - <if test="ipAddress != null" > | 131 | + <if test="ipAddress != null"> |
132 | ip_address = #{ipAddress,jdbcType=VARCHAR}, | 132 | ip_address = #{ipAddress,jdbcType=VARCHAR}, |
133 | </if> | 133 | </if> |
134 | - <if test="secret != null" > | 134 | + <if test="secret != null"> |
135 | secret = #{secret,jdbcType=VARCHAR}, | 135 | secret = #{secret,jdbcType=VARCHAR}, |
136 | </if> | 136 | </if> |
137 | - <if test="status != null" > | 137 | + <if test="status != null"> |
138 | status = #{status,jdbcType=VARCHAR}, | 138 | status = #{status,jdbcType=VARCHAR}, |
139 | </if> | 139 | </if> |
140 | - <if test="opertTime != null" > | 140 | + <if test="opertTime != null"> |
141 | opert_time = #{opertTime,jdbcType=TIMESTAMP}, | 141 | opert_time = #{opertTime,jdbcType=TIMESTAMP}, |
142 | </if> | 142 | </if> |
143 | - <if test="editTime != null" > | 143 | + <if test="editTime != null"> |
144 | edit_time = #{editTime,jdbcType=TIMESTAMP}, | 144 | edit_time = #{editTime,jdbcType=TIMESTAMP}, |
145 | </if> | 145 | </if> |
146 | - <if test="infoStatus != null" > | 146 | + <if test="infoStatus != null"> |
147 | info_status = #{infoStatus,jdbcType=VARCHAR}, | 147 | info_status = #{infoStatus,jdbcType=VARCHAR}, |
148 | </if> | 148 | </if> |
149 | </set> | 149 | </set> |
150 | where order_number = #{orderNumber,jdbcType=VARCHAR} | 150 | where order_number = #{orderNumber,jdbcType=VARCHAR} |
151 | </update> | 151 | </update> |
152 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.ElectricityInfo" > | 152 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.ElectricityInfo"> |
153 | update electricity_info | 153 | update electricity_info |
154 | set action_type = #{actionType,jdbcType=VARCHAR}, | 154 | set action_type = #{actionType,jdbcType=VARCHAR}, |
155 | device_id = #{deviceId,jdbcType=VARCHAR}, | 155 | device_id = #{deviceId,jdbcType=VARCHAR}, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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 | - <id column="wm_id" property="wmid" jdbcType="VARCHAR" /> | ||
7 | - <id column="ee_id" property="eeid" jdbcType="VARCHAR" /> | ||
8 | - <result column="adrName" property="adrname" jdbcType="VARCHAR" /> | ||
9 | - <result column="parent" property="parent" jdbcType="INTEGER" /> | ||
10 | - <result column="type" property="type" jdbcType="INTEGER" /> | ||
11 | -<!-- <collection property="children" select="selectAll" column="id"></collection>--> | 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 | + <id column="wm_id" property="wmid" jdbcType="VARCHAR"/> | ||
7 | + <id column="ee_id" property="eeid" jdbcType="VARCHAR"/> | ||
8 | + <result column="adrName" property="adrname" jdbcType="VARCHAR"/> | ||
9 | + <result column="parent" property="parent" jdbcType="INTEGER"/> | ||
10 | + <result column="type" property="type" jdbcType="INTEGER"/> | ||
11 | + <!-- <collection property="children" select="selectAll" column="id"></collection>--> | ||
12 | </resultMap> | 12 | </resultMap> |
13 | - <sql id="Base_Column_List" > | 13 | + <sql id="Base_Column_List"> |
14 | id, adrName, parent, type, wm_id, ee_id | 14 | id, adrName, parent, type, wm_id, ee_id |
15 | </sql> | 15 | </sql> |
16 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | 16 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> |
17 | select | 17 | select |
18 | - <include refid="Base_Column_List" /> | 18 | + <include refid="Base_Column_List"/> |
19 | from location | 19 | from location |
20 | where id = #{id,jdbcType=INTEGER} | 20 | where id = #{id,jdbcType=INTEGER} |
21 | </select> | 21 | </select> |
22 | - <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | 22 | + <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.Integer"> |
23 | select | 23 | select |
24 | * | 24 | * |
25 | from location | 25 | from location |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <!--</if>--> | 30 | <!--</if>--> |
31 | </select> | 31 | </select> |
32 | 32 | ||
33 | - <select id="selectAllAdrName" resultMap="BaseResultMap" parameterType="java.lang.String" > | 33 | + <select id="selectAllAdrName" resultMap="BaseResultMap" parameterType="java.lang.String"> |
34 | select | 34 | select |
35 | * | 35 | * |
36 | from location | 36 | from location |
@@ -84,69 +84,69 @@ | @@ -84,69 +84,69 @@ | ||
84 | select ee_id from location where adrname = #{value} | 84 | select ee_id from location where adrname = #{value} |
85 | </select> | 85 | </select> |
86 | 86 | ||
87 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | 87 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
88 | delete from location | 88 | delete from location |
89 | where id = #{id,jdbcType=INTEGER} | 89 | where id = #{id,jdbcType=INTEGER} |
90 | </delete> | 90 | </delete> |
91 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.Location" > | 91 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.Location"> |
92 | insert into location (id, adrName, parent, | 92 | insert into location (id, adrName, parent, |
93 | type) | 93 | type) |
94 | values (#{id,jdbcType=INTEGER}, #{adrname,jdbcType=VARCHAR}, #{parent,jdbcType=INTEGER}, | 94 | values (#{id,jdbcType=INTEGER}, #{adrname,jdbcType=VARCHAR}, #{parent,jdbcType=INTEGER}, |
95 | #{type,jdbcType=INTEGER}) | 95 | #{type,jdbcType=INTEGER}) |
96 | </insert> | 96 | </insert> |
97 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.Location" > | 97 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.Location"> |
98 | insert into location | 98 | insert into location |
99 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
100 | - <if test="id != null" > | 99 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
100 | + <if test="id != null"> | ||
101 | id, | 101 | id, |
102 | </if> | 102 | </if> |
103 | - <if test="adrname != null" > | 103 | + <if test="adrname != null"> |
104 | adrName, | 104 | adrName, |
105 | </if> | 105 | </if> |
106 | - <if test="parent != null" > | 106 | + <if test="parent != null"> |
107 | parent, | 107 | parent, |
108 | </if> | 108 | </if> |
109 | - <if test="type != null" > | 109 | + <if test="type != null"> |
110 | type, | 110 | type, |
111 | </if> | 111 | </if> |
112 | </trim> | 112 | </trim> |
113 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
114 | - <if test="id != null" > | 113 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
114 | + <if test="id != null"> | ||
115 | #{id,jdbcType=INTEGER}, | 115 | #{id,jdbcType=INTEGER}, |
116 | </if> | 116 | </if> |
117 | - <if test="adrname != null" > | 117 | + <if test="adrname != null"> |
118 | #{adrname,jdbcType=VARCHAR}, | 118 | #{adrname,jdbcType=VARCHAR}, |
119 | </if> | 119 | </if> |
120 | - <if test="parent != null" > | 120 | + <if test="parent != null"> |
121 | #{parent,jdbcType=INTEGER}, | 121 | #{parent,jdbcType=INTEGER}, |
122 | </if> | 122 | </if> |
123 | - <if test="type != null" > | 123 | + <if test="type != null"> |
124 | #{type,jdbcType=INTEGER}, | 124 | #{type,jdbcType=INTEGER}, |
125 | </if> | 125 | </if> |
126 | </trim> | 126 | </trim> |
127 | </insert> | 127 | </insert> |
128 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.Location" > | 128 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.Location"> |
129 | update location | 129 | update location |
130 | - <set > | ||
131 | - <if test="adrname != null" > | 130 | + <set> |
131 | + <if test="adrname != null"> | ||
132 | adrName = #{adrname,jdbcType=VARCHAR}, | 132 | adrName = #{adrname,jdbcType=VARCHAR}, |
133 | </if> | 133 | </if> |
134 | - <if test="parent != null" > | 134 | + <if test="parent != null"> |
135 | parent = #{parent,jdbcType=INTEGER}, | 135 | parent = #{parent,jdbcType=INTEGER}, |
136 | </if> | 136 | </if> |
137 | - <if test="type != null" > | 137 | + <if test="type != null"> |
138 | type = #{type,jdbcType=INTEGER}, | 138 | type = #{type,jdbcType=INTEGER}, |
139 | </if> | 139 | </if> |
140 | - <if test="wmid != null" > | 140 | + <if test="wmid != null"> |
141 | wm_id = #{wmid,jdbcType=VARCHAR}, | 141 | wm_id = #{wmid,jdbcType=VARCHAR}, |
142 | </if> | 142 | </if> |
143 | - <if test="eeid != null" > | 143 | + <if test="eeid != null"> |
144 | ee_id = #{eeid,jdbcType=VARCHAR} | 144 | ee_id = #{eeid,jdbcType=VARCHAR} |
145 | </if> | 145 | </if> |
146 | </set> | 146 | </set> |
147 | where id = #{id,jdbcType=INTEGER} | 147 | where id = #{id,jdbcType=INTEGER} |
148 | </update> | 148 | </update> |
149 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.Location" > | 149 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.Location"> |
150 | update location | 150 | update location |
151 | set adrName = #{adrname,jdbcType=VARCHAR}, | 151 | set adrName = #{adrname,jdbcType=VARCHAR}, |
152 | parent = #{parent,jdbcType=INTEGER}, | 152 | parent = #{parent,jdbcType=INTEGER}, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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" /> | 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> | 21 | </resultMap> |
22 | - <sql id="Base_Column_List" > | 22 | + <sql id="Base_Column_List"> |
23 | id, payFees, payUserId, payTime, payLocationId, payStatus, payType, payFessType, | 23 | id, payFees, payUserId, payTime, payLocationId, payStatus, payType, payFessType, |
24 | orderNumber, reamke1, reamke2, reamke3, reamke4, payUserName, payLocationName, payTypeAddress | 24 | orderNumber, reamke1, reamke2, reamke3, reamke4, payUserName, payLocationName, payTypeAddress |
25 | </sql> | 25 | </sql> |
26 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | 26 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> |
27 | select | 27 | select |
28 | - <include refid="Base_Column_List" /> | 28 | + <include refid="Base_Column_List"/> |
29 | from pay_records | 29 | from pay_records |
30 | where id = #{id,jdbcType=INTEGER} | 30 | where id = #{id,jdbcType=INTEGER} |
31 | </select> | 31 | </select> |
32 | 32 | ||
33 | <select id="findAll" resultMap="BaseResultMap"> | 33 | <select id="findAll" resultMap="BaseResultMap"> |
34 | select | 34 | select |
35 | - <include refid="Base_Column_List" /> | 35 | + <include refid="Base_Column_List"/> |
36 | from pay_records | 36 | from pay_records |
37 | where reamke1 = '0' | 37 | where reamke1 = '0' |
38 | <if test="orderNumber != '' and orderNumber != null"> | 38 | <if test="orderNumber != '' and orderNumber != null"> |
@@ -44,6 +44,9 @@ | @@ -44,6 +44,9 @@ | ||
44 | <if test="endTime != '' and endTime != null"> | 44 | <if test="endTime != '' and endTime != null"> |
45 | and payTime < #{endTime,jdbcType=VARCHAR} | 45 | and payTime < #{endTime,jdbcType=VARCHAR} |
46 | </if> | 46 | </if> |
47 | + <if test="username != '' and username != null"> | ||
48 | + and payUserName = #{username,jdbcType=VARCHAR} | ||
49 | + </if> | ||
47 | order by payTime desc | 50 | order by payTime desc |
48 | </select> | 51 | </select> |
49 | 52 | ||
@@ -55,7 +58,7 @@ | @@ -55,7 +58,7 @@ | ||
55 | select distinct payType from pay_records where orderNumber = #{value, jdbcType=VARCHAR} | 58 | select distinct payType from pay_records where orderNumber = #{value, jdbcType=VARCHAR} |
56 | </select> | 59 | </select> |
57 | 60 | ||
58 | - <update id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | 61 | + <update id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
59 | UPDATE pay_records | 62 | UPDATE pay_records |
60 | SET reamke1 = '1' | 63 | SET reamke1 = '1' |
61 | where id = #{id,jdbcType=INTEGER} | 64 | where id = #{id,jdbcType=INTEGER} |
@@ -67,7 +70,7 @@ | @@ -67,7 +70,7 @@ | ||
67 | where orderNumber = #{value, jdbcType=VARCHAR} | 70 | where orderNumber = #{value, jdbcType=VARCHAR} |
68 | </update> | 71 | </update> |
69 | 72 | ||
70 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords" > | 73 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.PayRecords"> |
71 | insert into pay_records (id, payFees, payUserId, | 74 | insert into pay_records (id, payFees, payUserId, |
72 | payTime, payLocationId, payStatus, | 75 | payTime, payLocationId, payStatus, |
73 | payType, payFessType, orderNumber, | 76 | payType, payFessType, orderNumber, |
@@ -81,180 +84,180 @@ | @@ -81,180 +84,180 @@ | ||
81 | #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR}, | 84 | #{reamke4,jdbcType=VARCHAR}, #{payusername,jdbcType=VARCHAR}, #{paylocationname,jdbcType=VARCHAR}, |
82 | #{paytypeaddress,jdbcType=VARCHAR}) | 85 | #{paytypeaddress,jdbcType=VARCHAR}) |
83 | </insert> | 86 | </insert> |
84 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayRecords" > | 87 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayRecords"> |
85 | insert into pay_records | 88 | insert into pay_records |
86 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
87 | - <if test="id != null" > | 89 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
90 | + <if test="id != null"> | ||
88 | id, | 91 | id, |
89 | </if> | 92 | </if> |
90 | - <if test="payfees != null" > | 93 | + <if test="payfees != null"> |
91 | payFees, | 94 | payFees, |
92 | </if> | 95 | </if> |
93 | - <if test="payuserid != null" > | 96 | + <if test="payuserid != null"> |
94 | payUserId, | 97 | payUserId, |
95 | </if> | 98 | </if> |
96 | - <if test="paytime != null" > | 99 | + <if test="paytime != null"> |
97 | payTime, | 100 | payTime, |
98 | </if> | 101 | </if> |
99 | - <if test="paylocationid != null" > | 102 | + <if test="paylocationid != null"> |
100 | payLocationId, | 103 | payLocationId, |
101 | </if> | 104 | </if> |
102 | - <if test="paystatus != null" > | 105 | + <if test="paystatus != null"> |
103 | payStatus, | 106 | payStatus, |
104 | </if> | 107 | </if> |
105 | - <if test="paytype != null" > | 108 | + <if test="paytype != null"> |
106 | payType, | 109 | payType, |
107 | </if> | 110 | </if> |
108 | - <if test="payfesstype != null" > | 111 | + <if test="payfesstype != null"> |
109 | payFessType, | 112 | payFessType, |
110 | </if> | 113 | </if> |
111 | - <if test="ordernumber != null" > | 114 | + <if test="ordernumber != null"> |
112 | orderNumber, | 115 | orderNumber, |
113 | </if> | 116 | </if> |
114 | - <if test="reamke1 != null" > | 117 | + <if test="reamke1 != null"> |
115 | reamke1, | 118 | reamke1, |
116 | </if> | 119 | </if> |
117 | - <if test="reamke2 != null" > | 120 | + <if test="reamke2 != null"> |
118 | reamke2, | 121 | reamke2, |
119 | </if> | 122 | </if> |
120 | - <if test="reamke3 != null" > | 123 | + <if test="reamke3 != null"> |
121 | reamke3, | 124 | reamke3, |
122 | </if> | 125 | </if> |
123 | - <if test="reamke4 != null" > | 126 | + <if test="reamke4 != null"> |
124 | reamke4, | 127 | reamke4, |
125 | </if> | 128 | </if> |
126 | - <if test="payusername != null" > | 129 | + <if test="payusername != null"> |
127 | payUserName, | 130 | payUserName, |
128 | </if> | 131 | </if> |
129 | - <if test="paylocationname != null" > | 132 | + <if test="paylocationname != null"> |
130 | payLocationName, | 133 | payLocationName, |
131 | </if> | 134 | </if> |
132 | - <if test="paytypeaddress != null" > | 135 | + <if test="paytypeaddress != null"> |
133 | payTypeAddress, | 136 | payTypeAddress, |
134 | </if> | 137 | </if> |
135 | </trim> | 138 | </trim> |
136 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
137 | - <if test="id != null" > | 139 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
140 | + <if test="id != null"> | ||
138 | #{id,jdbcType=INTEGER}, | 141 | #{id,jdbcType=INTEGER}, |
139 | </if> | 142 | </if> |
140 | - <if test="payfees != null" > | 143 | + <if test="payfees != null"> |
141 | #{payfees,jdbcType=DECIMAL}, | 144 | #{payfees,jdbcType=DECIMAL}, |
142 | </if> | 145 | </if> |
143 | - <if test="payuserid != null" > | 146 | + <if test="payuserid != null"> |
144 | #{payuserid,jdbcType=INTEGER}, | 147 | #{payuserid,jdbcType=INTEGER}, |
145 | </if> | 148 | </if> |
146 | - <if test="paytime != null" > | 149 | + <if test="paytime != null"> |
147 | #{paytime,jdbcType=TIMESTAMP}, | 150 | #{paytime,jdbcType=TIMESTAMP}, |
148 | </if> | 151 | </if> |
149 | - <if test="paylocationid != null" > | 152 | + <if test="paylocationid != null"> |
150 | #{paylocationid,jdbcType=INTEGER}, | 153 | #{paylocationid,jdbcType=INTEGER}, |
151 | </if> | 154 | </if> |
152 | - <if test="paystatus != null" > | 155 | + <if test="paystatus != null"> |
153 | #{paystatus,jdbcType=BIT}, | 156 | #{paystatus,jdbcType=BIT}, |
154 | </if> | 157 | </if> |
155 | - <if test="paytype != null" > | 158 | + <if test="paytype != null"> |
156 | #{paytype,jdbcType=BIT}, | 159 | #{paytype,jdbcType=BIT}, |
157 | </if> | 160 | </if> |
158 | - <if test="payfesstype != null" > | 161 | + <if test="payfesstype != null"> |
159 | #{payfesstype,jdbcType=BIT}, | 162 | #{payfesstype,jdbcType=BIT}, |
160 | </if> | 163 | </if> |
161 | - <if test="ordernumber != null" > | 164 | + <if test="ordernumber != null"> |
162 | #{ordernumber,jdbcType=VARCHAR}, | 165 | #{ordernumber,jdbcType=VARCHAR}, |
163 | </if> | 166 | </if> |
164 | - <if test="reamke1 != null" > | 167 | + <if test="reamke1 != null"> |
165 | #{reamke1,jdbcType=VARCHAR}, | 168 | #{reamke1,jdbcType=VARCHAR}, |
166 | </if> | 169 | </if> |
167 | - <if test="reamke2 != null" > | 170 | + <if test="reamke2 != null"> |
168 | #{reamke2,jdbcType=VARCHAR}, | 171 | #{reamke2,jdbcType=VARCHAR}, |
169 | </if> | 172 | </if> |
170 | - <if test="reamke3 != null" > | 173 | + <if test="reamke3 != null"> |
171 | #{reamke3,jdbcType=VARCHAR}, | 174 | #{reamke3,jdbcType=VARCHAR}, |
172 | </if> | 175 | </if> |
173 | - <if test="reamke4 != null" > | 176 | + <if test="reamke4 != null"> |
174 | #{reamke4,jdbcType=VARCHAR}, | 177 | #{reamke4,jdbcType=VARCHAR}, |
175 | </if> | 178 | </if> |
176 | - <if test="payusername != null" > | 179 | + <if test="payusername != null"> |
177 | #{payusername,jdbcType=VARCHAR}, | 180 | #{payusername,jdbcType=VARCHAR}, |
178 | </if> | 181 | </if> |
179 | - <if test="paylocationname != null" > | 182 | + <if test="paylocationname != null"> |
180 | #{paylocationname,jdbcType=VARCHAR}, | 183 | #{paylocationname,jdbcType=VARCHAR}, |
181 | </if> | 184 | </if> |
182 | - <if test="paytypeaddress != null" > | 185 | + <if test="paytypeaddress != null"> |
183 | #{paytypeaddress,jdbcType=VARCHAR}, | 186 | #{paytypeaddress,jdbcType=VARCHAR}, |
184 | </if> | 187 | </if> |
185 | </trim> | 188 | </trim> |
186 | </insert> | 189 | </insert> |
187 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayRecords" > | 190 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayRecords"> |
188 | update pay_records | 191 | update pay_records |
189 | - <set > | ||
190 | - <if test="payfees != null" > | 192 | + <set> |
193 | + <if test="payfees != null"> | ||
191 | payFees = #{payfees,jdbcType=DECIMAL}, | 194 | payFees = #{payfees,jdbcType=DECIMAL}, |
192 | </if> | 195 | </if> |
193 | - <if test="payuserid != null" > | 196 | + <if test="payuserid != null"> |
194 | payUserId = #{payuserid,jdbcType=INTEGER}, | 197 | payUserId = #{payuserid,jdbcType=INTEGER}, |
195 | </if> | 198 | </if> |
196 | - <if test="paytime != null" > | 199 | + <if test="paytime != null"> |
197 | payTime = #{paytime,jdbcType=TIMESTAMP}, | 200 | payTime = #{paytime,jdbcType=TIMESTAMP}, |
198 | </if> | 201 | </if> |
199 | - <if test="paylocationid != null" > | 202 | + <if test="paylocationid != null"> |
200 | payLocationId = #{paylocationid,jdbcType=INTEGER}, | 203 | payLocationId = #{paylocationid,jdbcType=INTEGER}, |
201 | </if> | 204 | </if> |
202 | - <if test="paystatus != null" > | 205 | + <if test="paystatus != null"> |
203 | payStatus = #{paystatus,jdbcType=BIT}, | 206 | payStatus = #{paystatus,jdbcType=BIT}, |
204 | </if> | 207 | </if> |
205 | - <if test="paytype != null" > | 208 | + <if test="paytype != null"> |
206 | payType = #{paytype,jdbcType=BIT}, | 209 | payType = #{paytype,jdbcType=BIT}, |
207 | </if> | 210 | </if> |
208 | - <if test="payfesstype != null" > | 211 | + <if test="payfesstype != null"> |
209 | payFessType = #{payfesstype,jdbcType=BIT}, | 212 | payFessType = #{payfesstype,jdbcType=BIT}, |
210 | </if> | 213 | </if> |
211 | - <if test="ordernumber != null" > | 214 | + <if test="ordernumber != null"> |
212 | orderNumber = #{ordernumber,jdbcType=VARCHAR}, | 215 | orderNumber = #{ordernumber,jdbcType=VARCHAR}, |
213 | </if> | 216 | </if> |
214 | - <if test="reamke1 != null" > | 217 | + <if test="reamke1 != null"> |
215 | reamke1 = #{reamke1,jdbcType=VARCHAR}, | 218 | reamke1 = #{reamke1,jdbcType=VARCHAR}, |
216 | </if> | 219 | </if> |
217 | - <if test="reamke2 != null" > | 220 | + <if test="reamke2 != null"> |
218 | reamke2 = #{reamke2,jdbcType=VARCHAR}, | 221 | reamke2 = #{reamke2,jdbcType=VARCHAR}, |
219 | </if> | 222 | </if> |
220 | - <if test="reamke3 != null" > | 223 | + <if test="reamke3 != null"> |
221 | reamke3 = #{reamke3,jdbcType=VARCHAR}, | 224 | reamke3 = #{reamke3,jdbcType=VARCHAR}, |
222 | </if> | 225 | </if> |
223 | - <if test="reamke4 != null" > | 226 | + <if test="reamke4 != null"> |
224 | reamke4 = #{reamke4,jdbcType=VARCHAR}, | 227 | reamke4 = #{reamke4,jdbcType=VARCHAR}, |
225 | </if> | 228 | </if> |
226 | - <if test="payusername != null" > | 229 | + <if test="payusername != null"> |
227 | payUserName = #{payusername,jdbcType=VARCHAR}, | 230 | payUserName = #{payusername,jdbcType=VARCHAR}, |
228 | </if> | 231 | </if> |
229 | - <if test="paylocationname != null" > | 232 | + <if test="paylocationname != null"> |
230 | payLocationName = #{paylocationname,jdbcType=VARCHAR}, | 233 | payLocationName = #{paylocationname,jdbcType=VARCHAR}, |
231 | </if> | 234 | </if> |
232 | - <if test="paytypeaddress != null" > | 235 | + <if test="paytypeaddress != null"> |
233 | payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}, | 236 | payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}, |
234 | </if> | 237 | </if> |
235 | </set> | 238 | </set> |
236 | where id = #{id,jdbcType=INTEGER} | 239 | where id = #{id,jdbcType=INTEGER} |
237 | </update> | 240 | </update> |
238 | -<!-- <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords" >--> | ||
239 | -<!-- update pay_records--> | ||
240 | -<!-- set payFees = #{payfees,jdbcType=DECIMAL},--> | ||
241 | -<!-- payUserId = #{payuserid,jdbcType=INTEGER},--> | ||
242 | -<!-- payTime = #{paytime,jdbcType=TIMESTAMP},--> | ||
243 | -<!-- payLocationId = #{paylocationid,jdbcType=INTEGER},--> | ||
244 | -<!-- payStatus = #{paystatus,jdbcType=BIT},--> | ||
245 | -<!-- payType = #{paytype,jdbcType=BIT},--> | ||
246 | -<!-- payFessType = #{payfesstype,jdbcType=BIT},--> | ||
247 | -<!-- orderNumber = #{ordernumber,jdbcType=VARCHAR},--> | ||
248 | -<!-- reamke1 = #{reamke1,jdbcType=VARCHAR},--> | ||
249 | -<!-- reamke2 = #{reamke2,jdbcType=VARCHAR},--> | ||
250 | -<!-- reamke3 = #{reamke3,jdbcType=VARCHAR},--> | ||
251 | -<!-- reamke4 = #{reamke4,jdbcType=VARCHAR},--> | ||
252 | -<!-- payUserName = #{payusername,jdbcType=VARCHAR},--> | ||
253 | -<!-- payLocationName = #{paylocationname,jdbcType=VARCHAR},--> | ||
254 | -<!-- payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}--> | ||
255 | -<!-- where id = #{id,jdbcType=INTEGER}--> | ||
256 | -<!-- </update>--> | ||
257 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords" > | 241 | + <!-- <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords" >--> |
242 | + <!-- update pay_records--> | ||
243 | + <!-- set payFees = #{payfees,jdbcType=DECIMAL},--> | ||
244 | + <!-- payUserId = #{payuserid,jdbcType=INTEGER},--> | ||
245 | + <!-- payTime = #{paytime,jdbcType=TIMESTAMP},--> | ||
246 | + <!-- payLocationId = #{paylocationid,jdbcType=INTEGER},--> | ||
247 | + <!-- payStatus = #{paystatus,jdbcType=BIT},--> | ||
248 | + <!-- payType = #{paytype,jdbcType=BIT},--> | ||
249 | + <!-- payFessType = #{payfesstype,jdbcType=BIT},--> | ||
250 | + <!-- orderNumber = #{ordernumber,jdbcType=VARCHAR},--> | ||
251 | + <!-- reamke1 = #{reamke1,jdbcType=VARCHAR},--> | ||
252 | + <!-- reamke2 = #{reamke2,jdbcType=VARCHAR},--> | ||
253 | + <!-- reamke3 = #{reamke3,jdbcType=VARCHAR},--> | ||
254 | + <!-- reamke4 = #{reamke4,jdbcType=VARCHAR},--> | ||
255 | + <!-- payUserName = #{payusername,jdbcType=VARCHAR},--> | ||
256 | + <!-- payLocationName = #{paylocationname,jdbcType=VARCHAR},--> | ||
257 | + <!-- payTypeAddress = #{paytypeaddress,jdbcType=VARCHAR}--> | ||
258 | + <!-- where id = #{id,jdbcType=INTEGER}--> | ||
259 | + <!-- </update>--> | ||
260 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayRecords"> | ||
258 | update pay_records | 261 | update pay_records |
259 | set | 262 | set |
260 | payStatus = 1, | 263 | payStatus = 1, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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.PayResponseMapper" > | ||
4 | - <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.PayResponse" > | ||
5 | - <id column="ID" property="id" jdbcType="VARCHAR" /> | ||
6 | - <result column="POSID" property="posid" jdbcType="VARCHAR" /> | ||
7 | - <result column="BRANCHID" property="branchid" jdbcType="VARCHAR" /> | ||
8 | - <result column="ORDERID" property="orderid" jdbcType="VARCHAR" /> | ||
9 | - <result column="PAYMENT" property="payment" jdbcType="DECIMAL" /> | ||
10 | - <result column="CURCODE" property="curcode" jdbcType="VARCHAR" /> | ||
11 | - <result column="REMARK1" property="remark1" jdbcType="VARCHAR" /> | ||
12 | - <result column="REMARK2" property="remark2" jdbcType="VARCHAR" /> | ||
13 | - <result column="ACC_TYPE" property="accType" jdbcType="VARCHAR" /> | ||
14 | - <result column="SUCCESS" property="success" jdbcType="VARCHAR" /> | ||
15 | - <result column="TYPE" property="type" jdbcType="VARCHAR" /> | ||
16 | - <result column="REFERER" property="referer" jdbcType="VARCHAR" /> | ||
17 | - <result column="CLIENTIP" property="clientip" jdbcType="VARCHAR" /> | ||
18 | - <result column="ACCDATE" property="accdate" jdbcType="TIMESTAMP" /> | ||
19 | - <result column="USRMSG" property="usrmsg" jdbcType="VARCHAR" /> | ||
20 | - <result column="USRINFO" property="usrinfo" jdbcType="VARCHAR" /> | ||
21 | - <result column="PAYTYPE" property="paytype" jdbcType="VARCHAR" /> | ||
22 | - <result column="SIGN" property="sign" jdbcType="VARCHAR" /> | 3 | +<mapper namespace="com.sunyo.energy.location.dao.PayResponseMapper"> |
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.PayResponse"> | ||
5 | + <id column="ID" property="id" jdbcType="VARCHAR"/> | ||
6 | + <result column="POSID" property="posid" jdbcType="VARCHAR"/> | ||
7 | + <result column="BRANCHID" property="branchid" jdbcType="VARCHAR"/> | ||
8 | + <result column="ORDERID" property="orderid" jdbcType="VARCHAR"/> | ||
9 | + <result column="PAYMENT" property="payment" jdbcType="DECIMAL"/> | ||
10 | + <result column="CURCODE" property="curcode" jdbcType="VARCHAR"/> | ||
11 | + <result column="REMARK1" property="remark1" jdbcType="VARCHAR"/> | ||
12 | + <result column="REMARK2" property="remark2" jdbcType="VARCHAR"/> | ||
13 | + <result column="ACC_TYPE" property="accType" jdbcType="VARCHAR"/> | ||
14 | + <result column="SUCCESS" property="success" jdbcType="VARCHAR"/> | ||
15 | + <result column="TYPE" property="type" jdbcType="VARCHAR"/> | ||
16 | + <result column="REFERER" property="referer" jdbcType="VARCHAR"/> | ||
17 | + <result column="CLIENTIP" property="clientip" jdbcType="VARCHAR"/> | ||
18 | + <result column="ACCDATE" property="accdate" jdbcType="TIMESTAMP"/> | ||
19 | + <result column="USRMSG" property="usrmsg" jdbcType="VARCHAR"/> | ||
20 | + <result column="USRINFO" property="usrinfo" jdbcType="VARCHAR"/> | ||
21 | + <result column="PAYTYPE" property="paytype" jdbcType="VARCHAR"/> | ||
22 | + <result column="SIGN" property="sign" jdbcType="VARCHAR"/> | ||
23 | </resultMap> | 23 | </resultMap> |
24 | - <sql id="Base_Column_List" > | 24 | + <sql id="Base_Column_List"> |
25 | ID, POSID, BRANCHID, ORDERID, PAYMENT, CURCODE, REMARK1, REMARK2, ACC_TYPE, SUCCESS, | 25 | ID, POSID, BRANCHID, ORDERID, PAYMENT, CURCODE, REMARK1, REMARK2, ACC_TYPE, SUCCESS, |
26 | TYPE, REFERER, CLIENTIP, ACCDATE, USRMSG, USRINFO, PAYTYPE, SIGN | 26 | TYPE, REFERER, CLIENTIP, ACCDATE, USRMSG, USRINFO, PAYTYPE, SIGN |
27 | </sql> | 27 | </sql> |
28 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | 28 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> |
29 | select | 29 | select |
30 | - <include refid="Base_Column_List" /> | 30 | + <include refid="Base_Column_List"/> |
31 | from pay_response | 31 | from pay_response |
32 | where ID = #{id,jdbcType=VARCHAR} | 32 | where ID = #{id,jdbcType=VARCHAR} |
33 | </select> | 33 | </select> |
34 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | 34 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
35 | delete from pay_response | 35 | delete from pay_response |
36 | where ID = #{id,jdbcType=VARCHAR} | 36 | where ID = #{id,jdbcType=VARCHAR} |
37 | </delete> | 37 | </delete> |
38 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.PayResponse" > | 38 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.PayResponse"> |
39 | insert into pay_response (ID, POSID, BRANCHID, | 39 | insert into pay_response (ID, POSID, BRANCHID, |
40 | ORDERID, PAYMENT, CURCODE, | 40 | ORDERID, PAYMENT, CURCODE, |
41 | REMARK1, REMARK2, ACC_TYPE, | 41 | REMARK1, REMARK2, ACC_TYPE, |
@@ -51,179 +51,179 @@ | @@ -51,179 +51,179 @@ | ||
51 | #{usrinfo,jdbcType=VARCHAR}, #{paytype,jdbcType=VARCHAR}, #{sign,jdbcType=VARCHAR} | 51 | #{usrinfo,jdbcType=VARCHAR}, #{paytype,jdbcType=VARCHAR}, #{sign,jdbcType=VARCHAR} |
52 | ) | 52 | ) |
53 | </insert> | 53 | </insert> |
54 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayResponse" > | 54 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.PayResponse"> |
55 | insert into pay_response | 55 | insert into pay_response |
56 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
57 | - <if test="id != null" > | 56 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
57 | + <if test="id != null"> | ||
58 | ID, | 58 | ID, |
59 | </if> | 59 | </if> |
60 | - <if test="posid != null" > | 60 | + <if test="posid != null"> |
61 | POSID, | 61 | POSID, |
62 | </if> | 62 | </if> |
63 | - <if test="branchid != null" > | 63 | + <if test="branchid != null"> |
64 | BRANCHID, | 64 | BRANCHID, |
65 | </if> | 65 | </if> |
66 | - <if test="orderid != null" > | 66 | + <if test="orderid != null"> |
67 | ORDERID, | 67 | ORDERID, |
68 | </if> | 68 | </if> |
69 | - <if test="payment != null" > | 69 | + <if test="payment != null"> |
70 | PAYMENT, | 70 | PAYMENT, |
71 | </if> | 71 | </if> |
72 | - <if test="curcode != null" > | 72 | + <if test="curcode != null"> |
73 | CURCODE, | 73 | CURCODE, |
74 | </if> | 74 | </if> |
75 | - <if test="remark1 != null" > | 75 | + <if test="remark1 != null"> |
76 | REMARK1, | 76 | REMARK1, |
77 | </if> | 77 | </if> |
78 | - <if test="remark2 != null" > | 78 | + <if test="remark2 != null"> |
79 | REMARK2, | 79 | REMARK2, |
80 | </if> | 80 | </if> |
81 | - <if test="accType != null" > | 81 | + <if test="accType != null"> |
82 | ACC_TYPE, | 82 | ACC_TYPE, |
83 | </if> | 83 | </if> |
84 | - <if test="success != null" > | 84 | + <if test="success != null"> |
85 | SUCCESS, | 85 | SUCCESS, |
86 | </if> | 86 | </if> |
87 | - <if test="type != null" > | 87 | + <if test="type != null"> |
88 | TYPE, | 88 | TYPE, |
89 | </if> | 89 | </if> |
90 | - <if test="referer != null" > | 90 | + <if test="referer != null"> |
91 | REFERER, | 91 | REFERER, |
92 | </if> | 92 | </if> |
93 | - <if test="clientip != null" > | 93 | + <if test="clientip != null"> |
94 | CLIENTIP, | 94 | CLIENTIP, |
95 | </if> | 95 | </if> |
96 | - <if test="accdate != null" > | 96 | + <if test="accdate != null"> |
97 | ACCDATE, | 97 | ACCDATE, |
98 | </if> | 98 | </if> |
99 | - <if test="usrmsg != null" > | 99 | + <if test="usrmsg != null"> |
100 | USRMSG, | 100 | USRMSG, |
101 | </if> | 101 | </if> |
102 | - <if test="usrinfo != null" > | 102 | + <if test="usrinfo != null"> |
103 | USRINFO, | 103 | USRINFO, |
104 | </if> | 104 | </if> |
105 | - <if test="paytype != null" > | 105 | + <if test="paytype != null"> |
106 | PAYTYPE, | 106 | PAYTYPE, |
107 | </if> | 107 | </if> |
108 | - <if test="sign != null" > | 108 | + <if test="sign != null"> |
109 | SIGN, | 109 | SIGN, |
110 | </if> | 110 | </if> |
111 | </trim> | 111 | </trim> |
112 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
113 | - <if test="id != null" > | 112 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
113 | + <if test="id != null"> | ||
114 | #{id,jdbcType=VARCHAR}, | 114 | #{id,jdbcType=VARCHAR}, |
115 | </if> | 115 | </if> |
116 | - <if test="posid != null" > | 116 | + <if test="posid != null"> |
117 | #{posid,jdbcType=VARCHAR}, | 117 | #{posid,jdbcType=VARCHAR}, |
118 | </if> | 118 | </if> |
119 | - <if test="branchid != null" > | 119 | + <if test="branchid != null"> |
120 | #{branchid,jdbcType=VARCHAR}, | 120 | #{branchid,jdbcType=VARCHAR}, |
121 | </if> | 121 | </if> |
122 | - <if test="orderid != null" > | 122 | + <if test="orderid != null"> |
123 | #{orderid,jdbcType=VARCHAR}, | 123 | #{orderid,jdbcType=VARCHAR}, |
124 | </if> | 124 | </if> |
125 | - <if test="payment != null" > | 125 | + <if test="payment != null"> |
126 | #{payment,jdbcType=DECIMAL}, | 126 | #{payment,jdbcType=DECIMAL}, |
127 | </if> | 127 | </if> |
128 | - <if test="curcode != null" > | 128 | + <if test="curcode != null"> |
129 | #{curcode,jdbcType=VARCHAR}, | 129 | #{curcode,jdbcType=VARCHAR}, |
130 | </if> | 130 | </if> |
131 | - <if test="remark1 != null" > | 131 | + <if test="remark1 != null"> |
132 | #{remark1,jdbcType=VARCHAR}, | 132 | #{remark1,jdbcType=VARCHAR}, |
133 | </if> | 133 | </if> |
134 | - <if test="remark2 != null" > | 134 | + <if test="remark2 != null"> |
135 | #{remark2,jdbcType=VARCHAR}, | 135 | #{remark2,jdbcType=VARCHAR}, |
136 | </if> | 136 | </if> |
137 | - <if test="accType != null" > | 137 | + <if test="accType != null"> |
138 | #{accType,jdbcType=VARCHAR}, | 138 | #{accType,jdbcType=VARCHAR}, |
139 | </if> | 139 | </if> |
140 | - <if test="success != null" > | 140 | + <if test="success != null"> |
141 | #{success,jdbcType=VARCHAR}, | 141 | #{success,jdbcType=VARCHAR}, |
142 | </if> | 142 | </if> |
143 | - <if test="type != null" > | 143 | + <if test="type != null"> |
144 | #{type,jdbcType=VARCHAR}, | 144 | #{type,jdbcType=VARCHAR}, |
145 | </if> | 145 | </if> |
146 | - <if test="referer != null" > | 146 | + <if test="referer != null"> |
147 | #{referer,jdbcType=VARCHAR}, | 147 | #{referer,jdbcType=VARCHAR}, |
148 | </if> | 148 | </if> |
149 | - <if test="clientip != null" > | 149 | + <if test="clientip != null"> |
150 | #{clientip,jdbcType=VARCHAR}, | 150 | #{clientip,jdbcType=VARCHAR}, |
151 | </if> | 151 | </if> |
152 | - <if test="accdate != null" > | 152 | + <if test="accdate != null"> |
153 | #{accdate,jdbcType=TIMESTAMP}, | 153 | #{accdate,jdbcType=TIMESTAMP}, |
154 | </if> | 154 | </if> |
155 | - <if test="usrmsg != null" > | 155 | + <if test="usrmsg != null"> |
156 | #{usrmsg,jdbcType=VARCHAR}, | 156 | #{usrmsg,jdbcType=VARCHAR}, |
157 | </if> | 157 | </if> |
158 | - <if test="usrinfo != null" > | 158 | + <if test="usrinfo != null"> |
159 | #{usrinfo,jdbcType=VARCHAR}, | 159 | #{usrinfo,jdbcType=VARCHAR}, |
160 | </if> | 160 | </if> |
161 | - <if test="paytype != null" > | 161 | + <if test="paytype != null"> |
162 | #{paytype,jdbcType=VARCHAR}, | 162 | #{paytype,jdbcType=VARCHAR}, |
163 | </if> | 163 | </if> |
164 | - <if test="sign != null" > | 164 | + <if test="sign != null"> |
165 | #{sign,jdbcType=VARCHAR}, | 165 | #{sign,jdbcType=VARCHAR}, |
166 | </if> | 166 | </if> |
167 | </trim> | 167 | </trim> |
168 | </insert> | 168 | </insert> |
169 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayResponse" > | 169 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.PayResponse"> |
170 | update pay_response | 170 | update pay_response |
171 | - <set > | ||
172 | - <if test="posid != null" > | 171 | + <set> |
172 | + <if test="posid != null"> | ||
173 | POSID = #{posid,jdbcType=VARCHAR}, | 173 | POSID = #{posid,jdbcType=VARCHAR}, |
174 | </if> | 174 | </if> |
175 | - <if test="branchid != null" > | 175 | + <if test="branchid != null"> |
176 | BRANCHID = #{branchid,jdbcType=VARCHAR}, | 176 | BRANCHID = #{branchid,jdbcType=VARCHAR}, |
177 | </if> | 177 | </if> |
178 | - <if test="orderid != null" > | 178 | + <if test="orderid != null"> |
179 | ORDERID = #{orderid,jdbcType=VARCHAR}, | 179 | ORDERID = #{orderid,jdbcType=VARCHAR}, |
180 | </if> | 180 | </if> |
181 | - <if test="payment != null" > | 181 | + <if test="payment != null"> |
182 | PAYMENT = #{payment,jdbcType=DECIMAL}, | 182 | PAYMENT = #{payment,jdbcType=DECIMAL}, |
183 | </if> | 183 | </if> |
184 | - <if test="curcode != null" > | 184 | + <if test="curcode != null"> |
185 | CURCODE = #{curcode,jdbcType=VARCHAR}, | 185 | CURCODE = #{curcode,jdbcType=VARCHAR}, |
186 | </if> | 186 | </if> |
187 | - <if test="remark1 != null" > | 187 | + <if test="remark1 != null"> |
188 | REMARK1 = #{remark1,jdbcType=VARCHAR}, | 188 | REMARK1 = #{remark1,jdbcType=VARCHAR}, |
189 | </if> | 189 | </if> |
190 | - <if test="remark2 != null" > | 190 | + <if test="remark2 != null"> |
191 | REMARK2 = #{remark2,jdbcType=VARCHAR}, | 191 | REMARK2 = #{remark2,jdbcType=VARCHAR}, |
192 | </if> | 192 | </if> |
193 | - <if test="accType != null" > | 193 | + <if test="accType != null"> |
194 | ACC_TYPE = #{accType,jdbcType=VARCHAR}, | 194 | ACC_TYPE = #{accType,jdbcType=VARCHAR}, |
195 | </if> | 195 | </if> |
196 | - <if test="success != null" > | 196 | + <if test="success != null"> |
197 | SUCCESS = #{success,jdbcType=VARCHAR}, | 197 | SUCCESS = #{success,jdbcType=VARCHAR}, |
198 | </if> | 198 | </if> |
199 | - <if test="type != null" > | 199 | + <if test="type != null"> |
200 | TYPE = #{type,jdbcType=VARCHAR}, | 200 | TYPE = #{type,jdbcType=VARCHAR}, |
201 | </if> | 201 | </if> |
202 | - <if test="referer != null" > | 202 | + <if test="referer != null"> |
203 | REFERER = #{referer,jdbcType=VARCHAR}, | 203 | REFERER = #{referer,jdbcType=VARCHAR}, |
204 | </if> | 204 | </if> |
205 | - <if test="clientip != null" > | 205 | + <if test="clientip != null"> |
206 | CLIENTIP = #{clientip,jdbcType=VARCHAR}, | 206 | CLIENTIP = #{clientip,jdbcType=VARCHAR}, |
207 | </if> | 207 | </if> |
208 | - <if test="accdate != null" > | 208 | + <if test="accdate != null"> |
209 | ACCDATE = #{accdate,jdbcType=TIMESTAMP}, | 209 | ACCDATE = #{accdate,jdbcType=TIMESTAMP}, |
210 | </if> | 210 | </if> |
211 | - <if test="usrmsg != null" > | 211 | + <if test="usrmsg != null"> |
212 | USRMSG = #{usrmsg,jdbcType=VARCHAR}, | 212 | USRMSG = #{usrmsg,jdbcType=VARCHAR}, |
213 | </if> | 213 | </if> |
214 | - <if test="usrinfo != null" > | 214 | + <if test="usrinfo != null"> |
215 | USRINFO = #{usrinfo,jdbcType=VARCHAR}, | 215 | USRINFO = #{usrinfo,jdbcType=VARCHAR}, |
216 | </if> | 216 | </if> |
217 | - <if test="paytype != null" > | 217 | + <if test="paytype != null"> |
218 | PAYTYPE = #{paytype,jdbcType=VARCHAR}, | 218 | PAYTYPE = #{paytype,jdbcType=VARCHAR}, |
219 | </if> | 219 | </if> |
220 | - <if test="sign != null" > | 220 | + <if test="sign != null"> |
221 | SIGN = #{sign,jdbcType=VARCHAR}, | 221 | SIGN = #{sign,jdbcType=VARCHAR}, |
222 | </if> | 222 | </if> |
223 | </set> | 223 | </set> |
224 | where ID = #{id,jdbcType=VARCHAR} | 224 | where ID = #{id,jdbcType=VARCHAR} |
225 | </update> | 225 | </update> |
226 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayResponse" > | 226 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.PayResponse"> |
227 | update pay_response | 227 | update pay_response |
228 | set POSID = #{posid,jdbcType=VARCHAR}, | 228 | set POSID = #{posid,jdbcType=VARCHAR}, |
229 | BRANCHID = #{branchid,jdbcType=VARCHAR}, | 229 | BRANCHID = #{branchid,jdbcType=VARCHAR}, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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.USERSMapper" > | ||
4 | - <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.USERS" > | ||
5 | - <id column="user_id" property="userId" jdbcType="INTEGER" /> | ||
6 | - <result column="username" property="username" jdbcType="VARCHAR" /> | ||
7 | - <result column="password" property="password" jdbcType="VARCHAR" /> | ||
8 | - <result column="birthday" property="birthday" jdbcType="TIMESTAMP" /> | ||
9 | - <result column="sex" property="sex" jdbcType="CHAR" /> | ||
10 | - <result column="address" property="address" jdbcType="VARCHAR" /> | ||
11 | - <result column="state" property="state" jdbcType="BIT" /> | ||
12 | - <result column="mobilePhone" property="mobilephone" jdbcType="VARCHAR" /> | ||
13 | - <result column="creatTime" property="creattime" jdbcType="TIMESTAMP" /> | ||
14 | - <result column="updateTime" property="updatetime" jdbcType="TIMESTAMP" /> | ||
15 | - <result column="userFace" property="userface" jdbcType="VARCHAR" /> | ||
16 | - <result column="realName" property="realname" jdbcType="VARCHAR" /> | ||
17 | - <result column="email" property="email" jdbcType="VARCHAR" /> | ||
18 | - <result column="age" property="age" jdbcType="INTEGER" /> | ||
19 | - <result column="company_id" property="companyId" jdbcType="INTEGER" /> | 3 | +<mapper namespace="com.sunyo.energy.location.dao.USERSMapper"> |
4 | + <resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.USERS"> | ||
5 | + <id column="user_id" property="userId" jdbcType="INTEGER"/> | ||
6 | + <result column="username" property="username" jdbcType="VARCHAR"/> | ||
7 | + <result column="password" property="password" jdbcType="VARCHAR"/> | ||
8 | + <result column="birthday" property="birthday" jdbcType="TIMESTAMP"/> | ||
9 | + <result column="sex" property="sex" jdbcType="CHAR"/> | ||
10 | + <result column="address" property="address" jdbcType="VARCHAR"/> | ||
11 | + <result column="state" property="state" jdbcType="BIT"/> | ||
12 | + <result column="mobilePhone" property="mobilephone" jdbcType="VARCHAR"/> | ||
13 | + <result column="creatTime" property="creattime" jdbcType="TIMESTAMP"/> | ||
14 | + <result column="updateTime" property="updatetime" jdbcType="TIMESTAMP"/> | ||
15 | + <result column="userFace" property="userface" jdbcType="VARCHAR"/> | ||
16 | + <result column="realName" property="realname" jdbcType="VARCHAR"/> | ||
17 | + <result column="email" property="email" jdbcType="VARCHAR"/> | ||
18 | + <result column="age" property="age" jdbcType="INTEGER"/> | ||
19 | + <result column="company_id" property="companyId" jdbcType="INTEGER"/> | ||
20 | </resultMap> | 20 | </resultMap> |
21 | - <sql id="Base_Column_List" > | 21 | + <sql id="Base_Column_List"> |
22 | user_id, username, password, birthday, sex, address, state, mobilePhone, creatTime, | 22 | user_id, username, password, birthday, sex, address, state, mobilePhone, creatTime, |
23 | updateTime, userFace, realName, email, age, company_id | 23 | updateTime, userFace, realName, email, age, company_id |
24 | </sql> | 24 | </sql> |
25 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | 25 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> |
26 | select | 26 | select |
27 | - <include refid="Base_Column_List" /> | 27 | + <include refid="Base_Column_List"/> |
28 | from users | 28 | from users |
29 | where user_id = #{userId,jdbcType=INTEGER} | 29 | where user_id = #{userId,jdbcType=INTEGER} |
30 | </select> | 30 | </select> |
31 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | 31 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
32 | delete from users | 32 | delete from users |
33 | where user_id = #{userId,jdbcType=INTEGER} | 33 | where user_id = #{userId,jdbcType=INTEGER} |
34 | </delete> | 34 | </delete> |
35 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.USERS" > | 35 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.USERS"> |
36 | insert into users (user_id, username, password, | 36 | insert into users (user_id, username, password, |
37 | birthday, sex, address, | 37 | birthday, sex, address, |
38 | state, mobilePhone, creatTime, | 38 | state, mobilePhone, creatTime, |
@@ -46,152 +46,152 @@ | @@ -46,152 +46,152 @@ | ||
46 | #{email,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER} | 46 | #{email,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER} |
47 | ) | 47 | ) |
48 | </insert> | 48 | </insert> |
49 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.USERS" > | 49 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.USERS"> |
50 | insert into users | 50 | insert into users |
51 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
52 | - <if test="userId != null" > | 51 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
52 | + <if test="userId != null"> | ||
53 | user_id, | 53 | user_id, |
54 | </if> | 54 | </if> |
55 | - <if test="username != null" > | 55 | + <if test="username != null"> |
56 | username, | 56 | username, |
57 | </if> | 57 | </if> |
58 | - <if test="password != null" > | 58 | + <if test="password != null"> |
59 | password, | 59 | password, |
60 | </if> | 60 | </if> |
61 | - <if test="birthday != null" > | 61 | + <if test="birthday != null"> |
62 | birthday, | 62 | birthday, |
63 | </if> | 63 | </if> |
64 | - <if test="sex != null" > | 64 | + <if test="sex != null"> |
65 | sex, | 65 | sex, |
66 | </if> | 66 | </if> |
67 | - <if test="address != null" > | 67 | + <if test="address != null"> |
68 | address, | 68 | address, |
69 | </if> | 69 | </if> |
70 | - <if test="state != null" > | 70 | + <if test="state != null"> |
71 | state, | 71 | state, |
72 | </if> | 72 | </if> |
73 | - <if test="mobilephone != null" > | 73 | + <if test="mobilephone != null"> |
74 | mobilePhone, | 74 | mobilePhone, |
75 | </if> | 75 | </if> |
76 | - <if test="creattime != null" > | 76 | + <if test="creattime != null"> |
77 | creatTime, | 77 | creatTime, |
78 | </if> | 78 | </if> |
79 | - <if test="updatetime != null" > | 79 | + <if test="updatetime != null"> |
80 | updateTime, | 80 | updateTime, |
81 | </if> | 81 | </if> |
82 | - <if test="userface != null" > | 82 | + <if test="userface != null"> |
83 | userFace, | 83 | userFace, |
84 | </if> | 84 | </if> |
85 | - <if test="realname != null" > | 85 | + <if test="realname != null"> |
86 | realName, | 86 | realName, |
87 | </if> | 87 | </if> |
88 | - <if test="email != null" > | 88 | + <if test="email != null"> |
89 | email, | 89 | email, |
90 | </if> | 90 | </if> |
91 | - <if test="age != null" > | 91 | + <if test="age != null"> |
92 | age, | 92 | age, |
93 | </if> | 93 | </if> |
94 | - <if test="companyId != null" > | 94 | + <if test="companyId != null"> |
95 | company_id, | 95 | company_id, |
96 | </if> | 96 | </if> |
97 | </trim> | 97 | </trim> |
98 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
99 | - <if test="userId != null" > | 98 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
99 | + <if test="userId != null"> | ||
100 | #{userId,jdbcType=INTEGER}, | 100 | #{userId,jdbcType=INTEGER}, |
101 | </if> | 101 | </if> |
102 | - <if test="username != null" > | 102 | + <if test="username != null"> |
103 | #{username,jdbcType=VARCHAR}, | 103 | #{username,jdbcType=VARCHAR}, |
104 | </if> | 104 | </if> |
105 | - <if test="password != null" > | 105 | + <if test="password != null"> |
106 | #{password,jdbcType=VARCHAR}, | 106 | #{password,jdbcType=VARCHAR}, |
107 | </if> | 107 | </if> |
108 | - <if test="birthday != null" > | 108 | + <if test="birthday != null"> |
109 | #{birthday,jdbcType=TIMESTAMP}, | 109 | #{birthday,jdbcType=TIMESTAMP}, |
110 | </if> | 110 | </if> |
111 | - <if test="sex != null" > | 111 | + <if test="sex != null"> |
112 | #{sex,jdbcType=CHAR}, | 112 | #{sex,jdbcType=CHAR}, |
113 | </if> | 113 | </if> |
114 | - <if test="address != null" > | 114 | + <if test="address != null"> |
115 | #{address,jdbcType=VARCHAR}, | 115 | #{address,jdbcType=VARCHAR}, |
116 | </if> | 116 | </if> |
117 | - <if test="state != null" > | 117 | + <if test="state != null"> |
118 | #{state,jdbcType=BIT}, | 118 | #{state,jdbcType=BIT}, |
119 | </if> | 119 | </if> |
120 | - <if test="mobilephone != null" > | 120 | + <if test="mobilephone != null"> |
121 | #{mobilephone,jdbcType=VARCHAR}, | 121 | #{mobilephone,jdbcType=VARCHAR}, |
122 | </if> | 122 | </if> |
123 | - <if test="creattime != null" > | 123 | + <if test="creattime != null"> |
124 | #{creattime,jdbcType=TIMESTAMP}, | 124 | #{creattime,jdbcType=TIMESTAMP}, |
125 | </if> | 125 | </if> |
126 | - <if test="updatetime != null" > | 126 | + <if test="updatetime != null"> |
127 | #{updatetime,jdbcType=TIMESTAMP}, | 127 | #{updatetime,jdbcType=TIMESTAMP}, |
128 | </if> | 128 | </if> |
129 | - <if test="userface != null" > | 129 | + <if test="userface != null"> |
130 | #{userface,jdbcType=VARCHAR}, | 130 | #{userface,jdbcType=VARCHAR}, |
131 | </if> | 131 | </if> |
132 | - <if test="realname != null" > | 132 | + <if test="realname != null"> |
133 | #{realname,jdbcType=VARCHAR}, | 133 | #{realname,jdbcType=VARCHAR}, |
134 | </if> | 134 | </if> |
135 | - <if test="email != null" > | 135 | + <if test="email != null"> |
136 | #{email,jdbcType=VARCHAR}, | 136 | #{email,jdbcType=VARCHAR}, |
137 | </if> | 137 | </if> |
138 | - <if test="age != null" > | 138 | + <if test="age != null"> |
139 | #{age,jdbcType=INTEGER}, | 139 | #{age,jdbcType=INTEGER}, |
140 | </if> | 140 | </if> |
141 | - <if test="companyId != null" > | 141 | + <if test="companyId != null"> |
142 | #{companyId,jdbcType=INTEGER}, | 142 | #{companyId,jdbcType=INTEGER}, |
143 | </if> | 143 | </if> |
144 | </trim> | 144 | </trim> |
145 | </insert> | 145 | </insert> |
146 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.USERS" > | 146 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.USERS"> |
147 | update users | 147 | update users |
148 | - <set > | ||
149 | - <if test="username != null" > | 148 | + <set> |
149 | + <if test="username != null"> | ||
150 | username = #{username,jdbcType=VARCHAR}, | 150 | username = #{username,jdbcType=VARCHAR}, |
151 | </if> | 151 | </if> |
152 | - <if test="password != null" > | 152 | + <if test="password != null"> |
153 | password = #{password,jdbcType=VARCHAR}, | 153 | password = #{password,jdbcType=VARCHAR}, |
154 | </if> | 154 | </if> |
155 | - <if test="birthday != null" > | 155 | + <if test="birthday != null"> |
156 | birthday = #{birthday,jdbcType=TIMESTAMP}, | 156 | birthday = #{birthday,jdbcType=TIMESTAMP}, |
157 | </if> | 157 | </if> |
158 | - <if test="sex != null" > | 158 | + <if test="sex != null"> |
159 | sex = #{sex,jdbcType=CHAR}, | 159 | sex = #{sex,jdbcType=CHAR}, |
160 | </if> | 160 | </if> |
161 | - <if test="address != null" > | 161 | + <if test="address != null"> |
162 | address = #{address,jdbcType=VARCHAR}, | 162 | address = #{address,jdbcType=VARCHAR}, |
163 | </if> | 163 | </if> |
164 | - <if test="state != null" > | 164 | + <if test="state != null"> |
165 | state = #{state,jdbcType=BIT}, | 165 | state = #{state,jdbcType=BIT}, |
166 | </if> | 166 | </if> |
167 | - <if test="mobilephone != null" > | 167 | + <if test="mobilephone != null"> |
168 | mobilePhone = #{mobilephone,jdbcType=VARCHAR}, | 168 | mobilePhone = #{mobilephone,jdbcType=VARCHAR}, |
169 | </if> | 169 | </if> |
170 | - <if test="creattime != null" > | 170 | + <if test="creattime != null"> |
171 | creatTime = #{creattime,jdbcType=TIMESTAMP}, | 171 | creatTime = #{creattime,jdbcType=TIMESTAMP}, |
172 | </if> | 172 | </if> |
173 | - <if test="updatetime != null" > | 173 | + <if test="updatetime != null"> |
174 | updateTime = #{updatetime,jdbcType=TIMESTAMP}, | 174 | updateTime = #{updatetime,jdbcType=TIMESTAMP}, |
175 | </if> | 175 | </if> |
176 | - <if test="userface != null" > | 176 | + <if test="userface != null"> |
177 | userFace = #{userface,jdbcType=VARCHAR}, | 177 | userFace = #{userface,jdbcType=VARCHAR}, |
178 | </if> | 178 | </if> |
179 | - <if test="realname != null" > | 179 | + <if test="realname != null"> |
180 | realName = #{realname,jdbcType=VARCHAR}, | 180 | realName = #{realname,jdbcType=VARCHAR}, |
181 | </if> | 181 | </if> |
182 | - <if test="email != null" > | 182 | + <if test="email != null"> |
183 | email = #{email,jdbcType=VARCHAR}, | 183 | email = #{email,jdbcType=VARCHAR}, |
184 | </if> | 184 | </if> |
185 | - <if test="age != null" > | 185 | + <if test="age != null"> |
186 | age = #{age,jdbcType=INTEGER}, | 186 | age = #{age,jdbcType=INTEGER}, |
187 | </if> | 187 | </if> |
188 | - <if test="companyId != null" > | 188 | + <if test="companyId != null"> |
189 | company_id = #{companyId,jdbcType=INTEGER}, | 189 | company_id = #{companyId,jdbcType=INTEGER}, |
190 | </if> | 190 | </if> |
191 | </set> | 191 | </set> |
192 | where user_id = #{userId,jdbcType=INTEGER} | 192 | where user_id = #{userId,jdbcType=INTEGER} |
193 | </update> | 193 | </update> |
194 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.USERS" > | 194 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.USERS"> |
195 | update users | 195 | update users |
196 | set username = #{username,jdbcType=VARCHAR}, | 196 | set username = #{username,jdbcType=VARCHAR}, |
197 | password = #{password,jdbcType=VARCHAR}, | 197 | password = #{password,jdbcType=VARCHAR}, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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" /> | 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> | 23 | </resultMap> |
24 | - <sql id="Base_Column_List" > | 24 | + <sql id="Base_Column_List"> |
25 | id, prepaid, warningTrip, warningThreshold, overdraft, overdraftThreshold, waterLoad, | 25 | id, prepaid, warningTrip, warningThreshold, overdraft, overdraftThreshold, waterLoad, |
26 | water, power, powerFactor, free, freeElectricityLimit, freeWater, wm_id, creatTime, | 26 | water, power, powerFactor, free, freeElectricityLimit, freeWater, wm_id, creatTime, |
27 | ee_id, reamke2, reamke3 | 27 | ee_id, reamke2, reamke3 |
28 | </sql> | 28 | </sql> |
29 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | 29 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> |
30 | select | 30 | select |
31 | - <include refid="Base_Column_List" /> | 31 | + <include refid="Base_Column_List"/> |
32 | from water_electricity_parameter | 32 | from water_electricity_parameter |
33 | where id = #{id,jdbcType=INTEGER} | 33 | where id = #{id,jdbcType=INTEGER} |
34 | </select> | 34 | </select> |
@@ -42,11 +42,11 @@ | @@ -42,11 +42,11 @@ | ||
42 | from water_electricity_parameter where ee_id = #{value,jdbcType=VARCHAR} | 42 | from water_electricity_parameter where ee_id = #{value,jdbcType=VARCHAR} |
43 | </select> | 43 | </select> |
44 | 44 | ||
45 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | 45 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
46 | delete from water_electricity_parameter | 46 | delete from water_electricity_parameter |
47 | where id = #{id,jdbcType=INTEGER} | 47 | where id = #{id,jdbcType=INTEGER} |
48 | </delete> | 48 | </delete> |
49 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | 49 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter"> |
50 | insert into water_electricity_parameter (id, prepaid, warningTrip, | 50 | insert into water_electricity_parameter (id, prepaid, warningTrip, |
51 | warningThreshold, overdraft, overdraftThreshold, | 51 | warningThreshold, overdraft, overdraftThreshold, |
52 | waterLoad, water, power, | 52 | waterLoad, water, power, |
@@ -62,179 +62,179 @@ | @@ -62,179 +62,179 @@ | ||
62 | #{eeId,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR} | 62 | #{eeId,jdbcType=VARCHAR}, #{reamke2,jdbcType=VARCHAR}, #{reamke3,jdbcType=VARCHAR} |
63 | ) | 63 | ) |
64 | </insert> | 64 | </insert> |
65 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | 65 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter"> |
66 | insert into water_electricity_parameter | 66 | insert into water_electricity_parameter |
67 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
68 | - <if test="id != null" > | 67 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
68 | + <if test="id != null"> | ||
69 | id, | 69 | id, |
70 | </if> | 70 | </if> |
71 | - <if test="prepaid != null" > | 71 | + <if test="prepaid != null"> |
72 | prepaid, | 72 | prepaid, |
73 | </if> | 73 | </if> |
74 | - <if test="warningtrip != null" > | 74 | + <if test="warningtrip != null"> |
75 | warningTrip, | 75 | warningTrip, |
76 | </if> | 76 | </if> |
77 | - <if test="warningthreshold != null" > | 77 | + <if test="warningthreshold != null"> |
78 | warningThreshold, | 78 | warningThreshold, |
79 | </if> | 79 | </if> |
80 | - <if test="overdraft != null" > | 80 | + <if test="overdraft != null"> |
81 | overdraft, | 81 | overdraft, |
82 | </if> | 82 | </if> |
83 | - <if test="overdraftthreshold != null" > | 83 | + <if test="overdraftthreshold != null"> |
84 | overdraftThreshold, | 84 | overdraftThreshold, |
85 | </if> | 85 | </if> |
86 | - <if test="waterload != null" > | 86 | + <if test="waterload != null"> |
87 | waterLoad, | 87 | waterLoad, |
88 | </if> | 88 | </if> |
89 | - <if test="water != null" > | 89 | + <if test="water != null"> |
90 | water, | 90 | water, |
91 | </if> | 91 | </if> |
92 | - <if test="power != null" > | 92 | + <if test="power != null"> |
93 | power, | 93 | power, |
94 | </if> | 94 | </if> |
95 | - <if test="powerfactor != null" > | 95 | + <if test="powerfactor != null"> |
96 | powerFactor, | 96 | powerFactor, |
97 | </if> | 97 | </if> |
98 | - <if test="free != null" > | 98 | + <if test="free != null"> |
99 | free, | 99 | free, |
100 | </if> | 100 | </if> |
101 | - <if test="freeelectricitylimit != null" > | 101 | + <if test="freeelectricitylimit != null"> |
102 | freeElectricityLimit, | 102 | freeElectricityLimit, |
103 | </if> | 103 | </if> |
104 | - <if test="freewater != null" > | 104 | + <if test="freewater != null"> |
105 | freeWater, | 105 | freeWater, |
106 | </if> | 106 | </if> |
107 | - <if test="wmId != null" > | 107 | + <if test="wmId != null"> |
108 | wm_id, | 108 | wm_id, |
109 | </if> | 109 | </if> |
110 | - <if test="creattime != null" > | 110 | + <if test="creattime != null"> |
111 | creatTime, | 111 | creatTime, |
112 | </if> | 112 | </if> |
113 | - <if test="eeId != null" > | 113 | + <if test="eeId != null"> |
114 | ee_id, | 114 | ee_id, |
115 | </if> | 115 | </if> |
116 | - <if test="reamke2 != null" > | 116 | + <if test="reamke2 != null"> |
117 | reamke2, | 117 | reamke2, |
118 | </if> | 118 | </if> |
119 | - <if test="reamke3 != null" > | 119 | + <if test="reamke3 != null"> |
120 | reamke3, | 120 | reamke3, |
121 | </if> | 121 | </if> |
122 | </trim> | 122 | </trim> |
123 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
124 | - <if test="id != null" > | 123 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
124 | + <if test="id != null"> | ||
125 | #{id,jdbcType=INTEGER}, | 125 | #{id,jdbcType=INTEGER}, |
126 | </if> | 126 | </if> |
127 | - <if test="prepaid != null" > | 127 | + <if test="prepaid != null"> |
128 | #{prepaid,jdbcType=BIT}, | 128 | #{prepaid,jdbcType=BIT}, |
129 | </if> | 129 | </if> |
130 | - <if test="warningtrip != null" > | 130 | + <if test="warningtrip != null"> |
131 | #{warningtrip,jdbcType=BIT}, | 131 | #{warningtrip,jdbcType=BIT}, |
132 | </if> | 132 | </if> |
133 | - <if test="warningthreshold != null" > | 133 | + <if test="warningthreshold != null"> |
134 | #{warningthreshold,jdbcType=DECIMAL}, | 134 | #{warningthreshold,jdbcType=DECIMAL}, |
135 | </if> | 135 | </if> |
136 | - <if test="overdraft != null" > | 136 | + <if test="overdraft != null"> |
137 | #{overdraft,jdbcType=BIT}, | 137 | #{overdraft,jdbcType=BIT}, |
138 | </if> | 138 | </if> |
139 | - <if test="overdraftthreshold != null" > | 139 | + <if test="overdraftthreshold != null"> |
140 | #{overdraftthreshold,jdbcType=DECIMAL}, | 140 | #{overdraftthreshold,jdbcType=DECIMAL}, |
141 | </if> | 141 | </if> |
142 | - <if test="waterload != null" > | 142 | + <if test="waterload != null"> |
143 | #{waterload,jdbcType=BIT}, | 143 | #{waterload,jdbcType=BIT}, |
144 | </if> | 144 | </if> |
145 | - <if test="water != null" > | 145 | + <if test="water != null"> |
146 | #{water,jdbcType=DECIMAL}, | 146 | #{water,jdbcType=DECIMAL}, |
147 | </if> | 147 | </if> |
148 | - <if test="power != null" > | 148 | + <if test="power != null"> |
149 | #{power,jdbcType=DECIMAL}, | 149 | #{power,jdbcType=DECIMAL}, |
150 | </if> | 150 | </if> |
151 | - <if test="powerfactor != null" > | 151 | + <if test="powerfactor != null"> |
152 | #{powerfactor,jdbcType=VARCHAR}, | 152 | #{powerfactor,jdbcType=VARCHAR}, |
153 | </if> | 153 | </if> |
154 | - <if test="free != null" > | 154 | + <if test="free != null"> |
155 | #{free,jdbcType=BIT}, | 155 | #{free,jdbcType=BIT}, |
156 | </if> | 156 | </if> |
157 | - <if test="freeelectricitylimit != null" > | 157 | + <if test="freeelectricitylimit != null"> |
158 | #{freeelectricitylimit,jdbcType=DECIMAL}, | 158 | #{freeelectricitylimit,jdbcType=DECIMAL}, |
159 | </if> | 159 | </if> |
160 | - <if test="freewater != null" > | 160 | + <if test="freewater != null"> |
161 | #{freewater,jdbcType=VARCHAR}, | 161 | #{freewater,jdbcType=VARCHAR}, |
162 | </if> | 162 | </if> |
163 | - <if test="wmId != null" > | 163 | + <if test="wmId != null"> |
164 | #{wmId,jdbcType=VARCHAR}, | 164 | #{wmId,jdbcType=VARCHAR}, |
165 | </if> | 165 | </if> |
166 | - <if test="creattime != null" > | 166 | + <if test="creattime != null"> |
167 | #{creattime,jdbcType=TIMESTAMP}, | 167 | #{creattime,jdbcType=TIMESTAMP}, |
168 | </if> | 168 | </if> |
169 | - <if test="eeId != null" > | 169 | + <if test="eeId != null"> |
170 | #{eeId,jdbcType=VARCHAR}, | 170 | #{eeId,jdbcType=VARCHAR}, |
171 | </if> | 171 | </if> |
172 | - <if test="reamke2 != null" > | 172 | + <if test="reamke2 != null"> |
173 | #{reamke2,jdbcType=VARCHAR}, | 173 | #{reamke2,jdbcType=VARCHAR}, |
174 | </if> | 174 | </if> |
175 | - <if test="reamke3 != null" > | 175 | + <if test="reamke3 != null"> |
176 | #{reamke3,jdbcType=VARCHAR}, | 176 | #{reamke3,jdbcType=VARCHAR}, |
177 | </if> | 177 | </if> |
178 | </trim> | 178 | </trim> |
179 | </insert> | 179 | </insert> |
180 | - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | 180 | + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter"> |
181 | update water_electricity_parameter | 181 | update water_electricity_parameter |
182 | - <set > | ||
183 | - <if test="prepaid != null" > | 182 | + <set> |
183 | + <if test="prepaid != null"> | ||
184 | prepaid = #{prepaid,jdbcType=BIT}, | 184 | prepaid = #{prepaid,jdbcType=BIT}, |
185 | </if> | 185 | </if> |
186 | - <if test="warningtrip != null" > | 186 | + <if test="warningtrip != null"> |
187 | warningTrip = #{warningtrip,jdbcType=BIT}, | 187 | warningTrip = #{warningtrip,jdbcType=BIT}, |
188 | </if> | 188 | </if> |
189 | - <if test="warningthreshold != null" > | 189 | + <if test="warningthreshold != null"> |
190 | warningThreshold = #{warningthreshold,jdbcType=DECIMAL}, | 190 | warningThreshold = #{warningthreshold,jdbcType=DECIMAL}, |
191 | </if> | 191 | </if> |
192 | - <if test="overdraft != null" > | 192 | + <if test="overdraft != null"> |
193 | overdraft = #{overdraft,jdbcType=BIT}, | 193 | overdraft = #{overdraft,jdbcType=BIT}, |
194 | </if> | 194 | </if> |
195 | - <if test="overdraftthreshold != null" > | 195 | + <if test="overdraftthreshold != null"> |
196 | overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL}, | 196 | overdraftThreshold = #{overdraftthreshold,jdbcType=DECIMAL}, |
197 | </if> | 197 | </if> |
198 | - <if test="waterload != null" > | 198 | + <if test="waterload != null"> |
199 | waterLoad = #{waterload,jdbcType=BIT}, | 199 | waterLoad = #{waterload,jdbcType=BIT}, |
200 | </if> | 200 | </if> |
201 | - <if test="water != null" > | 201 | + <if test="water != null"> |
202 | water = #{water,jdbcType=DECIMAL}, | 202 | water = #{water,jdbcType=DECIMAL}, |
203 | </if> | 203 | </if> |
204 | - <if test="power != null" > | 204 | + <if test="power != null"> |
205 | power = #{power,jdbcType=DECIMAL}, | 205 | power = #{power,jdbcType=DECIMAL}, |
206 | </if> | 206 | </if> |
207 | - <if test="powerfactor != null" > | 207 | + <if test="powerfactor != null"> |
208 | powerFactor = #{powerfactor,jdbcType=VARCHAR}, | 208 | powerFactor = #{powerfactor,jdbcType=VARCHAR}, |
209 | </if> | 209 | </if> |
210 | - <if test="free != null" > | 210 | + <if test="free != null"> |
211 | free = #{free,jdbcType=BIT}, | 211 | free = #{free,jdbcType=BIT}, |
212 | </if> | 212 | </if> |
213 | - <if test="freeelectricitylimit != null" > | 213 | + <if test="freeelectricitylimit != null"> |
214 | freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL}, | 214 | freeElectricityLimit = #{freeelectricitylimit,jdbcType=DECIMAL}, |
215 | </if> | 215 | </if> |
216 | - <if test="freewater != null" > | 216 | + <if test="freewater != null"> |
217 | freeWater = #{freewater,jdbcType=VARCHAR}, | 217 | freeWater = #{freewater,jdbcType=VARCHAR}, |
218 | </if> | 218 | </if> |
219 | - <if test="wmId != null" > | 219 | + <if test="wmId != null"> |
220 | wm_id = #{wmId,jdbcType=VARCHAR}, | 220 | wm_id = #{wmId,jdbcType=VARCHAR}, |
221 | </if> | 221 | </if> |
222 | - <if test="creattime != null" > | 222 | + <if test="creattime != null"> |
223 | creatTime = #{creattime,jdbcType=TIMESTAMP}, | 223 | creatTime = #{creattime,jdbcType=TIMESTAMP}, |
224 | </if> | 224 | </if> |
225 | - <if test="eeId != null" > | 225 | + <if test="eeId != null"> |
226 | ee_id = #{eeId,jdbcType=VARCHAR}, | 226 | ee_id = #{eeId,jdbcType=VARCHAR}, |
227 | </if> | 227 | </if> |
228 | - <if test="reamke2 != null" > | 228 | + <if test="reamke2 != null"> |
229 | reamke2 = #{reamke2,jdbcType=VARCHAR}, | 229 | reamke2 = #{reamke2,jdbcType=VARCHAR}, |
230 | </if> | 230 | </if> |
231 | - <if test="reamke3 != null" > | 231 | + <if test="reamke3 != null"> |
232 | reamke3 = #{reamke3,jdbcType=VARCHAR}, | 232 | reamke3 = #{reamke3,jdbcType=VARCHAR}, |
233 | </if> | 233 | </if> |
234 | </set> | 234 | </set> |
235 | where ee_id = #{eeId,jdbcType=INTEGER} | 235 | where ee_id = #{eeId,jdbcType=INTEGER} |
236 | </update> | 236 | </update> |
237 | - <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter" > | 237 | + <update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.WaterElectricityParameter"> |
238 | update water_electricity_parameter | 238 | update water_electricity_parameter |
239 | set prepaid = #{prepaid,jdbcType=BIT}, | 239 | set prepaid = #{prepaid,jdbcType=BIT}, |
240 | warningTrip = #{warningtrip,jdbcType=BIT}, | 240 | warningTrip = #{warningtrip,jdbcType=BIT}, |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 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" > | 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" /> | 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> | 19 | </resultMap> |
20 | 20 | ||
21 | <select id="waterMeterAll" parameterType="string" resultMap="BaseResultMap"> | 21 | <select id="waterMeterAll" parameterType="string" resultMap="BaseResultMap"> |
22 | select * from water_meter where wm_id like concat('%',#{value},'%') | 22 | select * from water_meter where wm_id like concat('%',#{value},'%') |
23 | </select> | 23 | </select> |
24 | 24 | ||
25 | - <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterMeter" > | 25 | + <insert id="insert" parameterType="com.sunyo.energy.location.model.WaterMeter"> |
26 | insert into water_meter (wm_id, wm_sacc, wm_lacc, | 26 | insert into water_meter (wm_id, wm_sacc, wm_lacc, |
27 | wm_rdtime, wm_fmstate, wm_errmessage, | 27 | wm_rdtime, wm_fmstate, wm_errmessage, |
28 | wm_voltage, wm_signalpower, creatTime, | 28 | wm_voltage, wm_signalpower, creatTime, |
@@ -48,93 +48,93 @@ | @@ -48,93 +48,93 @@ | ||
48 | select reamke1 from water_meter where wm_id = #{value,jdbcType=VARCHAR} | 48 | select reamke1 from water_meter where wm_id = #{value,jdbcType=VARCHAR} |
49 | </select> | 49 | </select> |
50 | 50 | ||
51 | - <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterMeter" > | 51 | + <insert id="insertSelective" parameterType="com.sunyo.energy.location.model.WaterMeter"> |
52 | insert into water_meter | 52 | insert into water_meter |
53 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
54 | - <if test="wmId != null" > | 53 | + <trim prefix="(" suffix=")" suffixOverrides=","> |
54 | + <if test="wmId != null"> | ||
55 | wm_id, | 55 | wm_id, |
56 | </if> | 56 | </if> |
57 | - <if test="wmSacc != null" > | 57 | + <if test="wmSacc != null"> |
58 | wm_sacc, | 58 | wm_sacc, |
59 | </if> | 59 | </if> |
60 | - <if test="wmLacc != null" > | 60 | + <if test="wmLacc != null"> |
61 | wm_lacc, | 61 | wm_lacc, |
62 | </if> | 62 | </if> |
63 | - <if test="wmRdtime != null" > | 63 | + <if test="wmRdtime != null"> |
64 | wm_rdtime, | 64 | wm_rdtime, |
65 | </if> | 65 | </if> |
66 | - <if test="wmFmstate != null" > | 66 | + <if test="wmFmstate != null"> |
67 | wm_fmstate, | 67 | wm_fmstate, |
68 | </if> | 68 | </if> |
69 | - <if test="wmErrmessage != null" > | 69 | + <if test="wmErrmessage != null"> |
70 | wm_errmessage, | 70 | wm_errmessage, |
71 | </if> | 71 | </if> |
72 | - <if test="wmVoltage != null" > | 72 | + <if test="wmVoltage != null"> |
73 | wm_voltage, | 73 | wm_voltage, |
74 | </if> | 74 | </if> |
75 | - <if test="wmSignalpower != null" > | 75 | + <if test="wmSignalpower != null"> |
76 | wm_signalpower, | 76 | wm_signalpower, |
77 | </if> | 77 | </if> |
78 | - <if test="creattime != null" > | 78 | + <if test="creattime != null"> |
79 | creatTime, | 79 | creatTime, |
80 | </if> | 80 | </if> |
81 | - <if test="updatetime != null" > | 81 | + <if test="updatetime != null"> |
82 | updateTime, | 82 | updateTime, |
83 | </if> | 83 | </if> |
84 | - <if test="reamke1 != null" > | 84 | + <if test="reamke1 != null"> |
85 | reamke1, | 85 | reamke1, |
86 | </if> | 86 | </if> |
87 | - <if test="reamke2 != null" > | 87 | + <if test="reamke2 != null"> |
88 | reamke2, | 88 | reamke2, |
89 | </if> | 89 | </if> |
90 | - <if test="reamke3 != null" > | 90 | + <if test="reamke3 != null"> |
91 | reamke3, | 91 | reamke3, |
92 | </if> | 92 | </if> |
93 | - <if test="reamke4 != null" > | 93 | + <if test="reamke4 != null"> |
94 | reamke4, | 94 | reamke4, |
95 | </if> | 95 | </if> |
96 | </trim> | 96 | </trim> |
97 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
98 | - <if test="wmId != null" > | 97 | + <trim prefix="values (" suffix=")" suffixOverrides=","> |
98 | + <if test="wmId != null"> | ||
99 | #{wmId,jdbcType=VARCHAR}, | 99 | #{wmId,jdbcType=VARCHAR}, |
100 | </if> | 100 | </if> |
101 | - <if test="wmSacc != null" > | 101 | + <if test="wmSacc != null"> |
102 | #{wmSacc,jdbcType=VARCHAR}, | 102 | #{wmSacc,jdbcType=VARCHAR}, |
103 | </if> | 103 | </if> |
104 | - <if test="wmLacc != null" > | 104 | + <if test="wmLacc != null"> |
105 | #{wmLacc,jdbcType=VARCHAR}, | 105 | #{wmLacc,jdbcType=VARCHAR}, |
106 | </if> | 106 | </if> |
107 | - <if test="wmRdtime != null" > | 107 | + <if test="wmRdtime != null"> |
108 | #{wmRdtime,jdbcType=VARCHAR}, | 108 | #{wmRdtime,jdbcType=VARCHAR}, |
109 | </if> | 109 | </if> |
110 | - <if test="wmFmstate != null" > | 110 | + <if test="wmFmstate != null"> |
111 | #{wmFmstate,jdbcType=VARCHAR}, | 111 | #{wmFmstate,jdbcType=VARCHAR}, |
112 | </if> | 112 | </if> |
113 | - <if test="wmErrmessage != null" > | 113 | + <if test="wmErrmessage != null"> |
114 | #{wmErrmessage,jdbcType=VARCHAR}, | 114 | #{wmErrmessage,jdbcType=VARCHAR}, |
115 | </if> | 115 | </if> |
116 | - <if test="wmVoltage != null" > | 116 | + <if test="wmVoltage != null"> |
117 | #{wmVoltage,jdbcType=VARCHAR}, | 117 | #{wmVoltage,jdbcType=VARCHAR}, |
118 | </if> | 118 | </if> |
119 | - <if test="wmSignalpower != null" > | 119 | + <if test="wmSignalpower != null"> |
120 | #{wmSignalpower,jdbcType=VARCHAR}, | 120 | #{wmSignalpower,jdbcType=VARCHAR}, |
121 | </if> | 121 | </if> |
122 | - <if test="creattime != null" > | 122 | + <if test="creattime != null"> |
123 | #{creattime,jdbcType=TIMESTAMP}, | 123 | #{creattime,jdbcType=TIMESTAMP}, |
124 | </if> | 124 | </if> |
125 | - <if test="updatetime != null" > | 125 | + <if test="updatetime != null"> |
126 | #{updatetime,jdbcType=TIMESTAMP}, | 126 | #{updatetime,jdbcType=TIMESTAMP}, |
127 | </if> | 127 | </if> |
128 | - <if test="reamke1 != null" > | 128 | + <if test="reamke1 != null"> |
129 | #{reamke1,jdbcType=VARCHAR}, | 129 | #{reamke1,jdbcType=VARCHAR}, |
130 | </if> | 130 | </if> |
131 | - <if test="reamke2 != null" > | 131 | + <if test="reamke2 != null"> |
132 | #{reamke2,jdbcType=VARCHAR}, | 132 | #{reamke2,jdbcType=VARCHAR}, |
133 | </if> | 133 | </if> |
134 | - <if test="reamke3 != null" > | 134 | + <if test="reamke3 != null"> |
135 | #{reamke3,jdbcType=VARCHAR}, | 135 | #{reamke3,jdbcType=VARCHAR}, |
136 | </if> | 136 | </if> |
137 | - <if test="reamke4 != null" > | 137 | + <if test="reamke4 != null"> |
138 | #{reamke4,jdbcType=VARCHAR}, | 138 | #{reamke4,jdbcType=VARCHAR}, |
139 | </if> | 139 | </if> |
140 | </trim> | 140 | </trim> |
-
请 注册 或 登录 后发表评论