Browse Source

统一下单

傅行帆 6 years ago
parent
commit
b5061dfcd3

+ 9
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/WxMPUserController.java View File

110
 			}
110
 			}
111
 			//返回查询的金额
111
 			//返回查询的金额
112
 			JSONObject jsonParam = carNoJson.getJSONObject("data").getJSONObject("JsonParam");
112
 			JSONObject jsonParam = carNoJson.getJSONObject("data").getJSONObject("JsonParam");
113
-			responseBean.addSuccess(jsonParam.get("ActualAmount"));
113
+			Map<String,Object> resultMap = Maps.newHashMap();
114
+			resultMap.put("ActualAmount",jsonParam.get("ActualAmount"));
115
+			responseBean.addSuccess(resultMap);
114
 		}
116
 		}
115
 		return responseBean;
117
 		return responseBean;
116
 	}
118
 	}
128
 		ResponseBean responseBean = new ResponseBean();
130
 		ResponseBean responseBean = new ResponseBean();
129
 		Map<String, String> resp = Maps.newHashMap();
131
 		Map<String, String> resp = Maps.newHashMap();
130
 		try {
132
 		try {
131
-			String parkInfoByCarNo = fuShiServer.getParkInfoByCarNo(carNo);
132
-			JSONObject carNoJson = JSONObject.parseObject(parkInfoByCarNo);
133
-			String actualAmount = String.valueOf(Double.valueOf(((BigDecimal) carNoJson.getJSONObject("JsonParam").get("ActualAmount")).toString()) * 100);
134
-			actualAmount = actualAmount.substring(0, actualAmount.lastIndexOf("."));
135
-			resp = wxMPUserService.wxTmpOrder(carNo,actualAmount,communityId,openid,(BigDecimal) carNoJson.getJSONObject("JsonParam").get("ActualAmount"));
133
+			//String parkInfoByCarNo = fuShiServer.getParkInfoByCarNo(carNo);
134
+			//JSONObject carNoJson = JSONObject.parseObject(parkInfoByCarNo);
135
+			//String actualAmount = String.valueOf(Double.valueOf(((BigDecimal) carNoJson.getJSONObject("JsonParam").get("ActualAmount")).toString()) * 100);
136
+			//actualAmount = actualAmount.substring(0, actualAmount.lastIndexOf("."));
137
+			//resp = wxMPUserService.wxTmpOrder(carNo,actualAmount,communityId,openid,(BigDecimal) carNoJson.getJSONObject("JsonParam").get("ActualAmount"));
138
+			resp = wxMPUserService.wxTmpOrder(carNo,"1",communityId,openid,new BigDecimal("0.1"));
136
 		} catch (Exception e) {
139
 		} catch (Exception e) {
137
 			e.printStackTrace();
140
 			e.printStackTrace();
138
 			responseBean.addError(e.getMessage());
141
 			responseBean.addError(e.getMessage());

+ 5
- 4
文档/MYSQL/smartCommunity.pdb View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1562638718" Name="smartCommunity" Objects="1344" Symbols="150" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
2
+<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1562828972" Name="smartCommunity" Objects="1333" Symbols="150" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
3
 <!-- do not edit this file -->
3
 <!-- do not edit this file -->
4
 
4
 
5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
20137
 <a:Code>price</a:Code>
20137
 <a:Code>price</a:Code>
20138
 <a:CreationDate>1562638665</a:CreationDate>
20138
 <a:CreationDate>1562638665</a:CreationDate>
20139
 <a:Creator>szc</a:Creator>
20139
 <a:Creator>szc</a:Creator>
20140
-<a:ModificationDate>1562638718</a:ModificationDate>
20140
+<a:ModificationDate>1562828972</a:ModificationDate>
20141
 <a:Modifier>szc</a:Modifier>
20141
 <a:Modifier>szc</a:Modifier>
20142
 <a:Comment>缴费金额元</a:Comment>
20142
 <a:Comment>缴费金额元</a:Comment>
20143
-<a:DataType>decimal(2)</a:DataType>
20144
-<a:Length>2</a:Length>
20143
+<a:DataType>decimal(10,2)</a:DataType>
20144
+<a:Length>10</a:Length>
20145
+<a:Precision>2</a:Precision>
20145
 </o:Column>
20146
 </o:Column>
20146
 </c:Columns>
20147
 </c:Columns>
20147
 <c:Keys>
20148
 <c:Keys>

+ 5
- 4
文档/MYSQL/smartCommunity.pdm View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1562638718" Name="smartCommunity" Objects="1344" Symbols="150" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
2
+<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1562828972" Name="smartCommunity" Objects="1333" Symbols="150" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
3
 <!-- do not edit this file -->
3
 <!-- do not edit this file -->
4
 
4
 
5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
20137
 <a:Code>price</a:Code>
20137
 <a:Code>price</a:Code>
20138
 <a:CreationDate>1562638665</a:CreationDate>
20138
 <a:CreationDate>1562638665</a:CreationDate>
20139
 <a:Creator>szc</a:Creator>
20139
 <a:Creator>szc</a:Creator>
20140
-<a:ModificationDate>1562638718</a:ModificationDate>
20140
+<a:ModificationDate>1562828972</a:ModificationDate>
20141
 <a:Modifier>szc</a:Modifier>
20141
 <a:Modifier>szc</a:Modifier>
20142
 <a:Comment>缴费金额元</a:Comment>
20142
 <a:Comment>缴费金额元</a:Comment>
20143
-<a:DataType>decimal(2)</a:DataType>
20144
-<a:Length>2</a:Length>
20143
+<a:DataType>decimal(10,2)</a:DataType>
20144
+<a:Length>10</a:Length>
20145
+<a:Precision>2</a:Precision>
20145
 </o:Column>
20146
 </o:Column>
20146
 </c:Columns>
20147
 </c:Columns>
20147
 <c:Keys>
20148
 <c:Keys>