瀏覽代碼

修复 工单bug

weiximei 6 年之前
父節點
當前提交
036555e3d4

+ 27
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/hk/test/OpenapiTest.java 查看文件

@@ -180,5 +180,31 @@ class OpenapiTest {
180 180
         
181 181
         return data;
182 182
 	}
183
-	
183
+
184
+
185
+
186
+	/**
187
+	 * HTTPS方式
188
+	 * 分页获取监控点信息 测试
189
+	 * @return
190
+	 * @throws Exception
191
+	 */
192
+	private static String testGetDoorEventsHistory() throws Exception{
193
+		String url = OPENAPI_IP_PORT_HTTPS + "/openapi/service/acs/event/getDoorEventsHistory";
194
+		Map<String, Object> map = new HashMap<String, Object>();
195
+		map.put("appkey", APPKEY);//设置APPKEY
196
+		map.put("time", System.currentTimeMillis());//设置时间参数
197
+		map.put("pageNo", 1);//设置分页参数
198
+		map.put("pageSize", 5);//设置分页参数
199
+		map.put("opUserUuid", OP_USER_UUID);//设置操作用户UUID
200
+		String params = JSON.toJSONString(map);
201
+		System.out.println(" ====== getCameras请求参数:【" + params + "】");
202
+		String data = HttpClientSSLUtils.doPost(url + "?token=" + Digests.buildToken(url + "?" + params, null, SECRET), params);
203
+		System.out.println(" ====== getCameras请求返回结果:【{" + data + "}】");
204
+
205
+		return data;
206
+	}
207
+
208
+
209
+
184 210
 }

+ 10
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java 查看文件

@@ -11,6 +11,7 @@ import com.github.pagehelper.Page;
11 11
 import com.github.pagehelper.PageHelper;
12 12
 import com.google.common.collect.Maps;
13 13
 import com.sun.org.apache.bcel.internal.generic.NEW;
14
+import org.springframework.beans.BeanUtils;
14 15
 import org.springframework.beans.factory.annotation.Autowired;
15 16
 import org.springframework.stereotype.Service;
16 17
 import org.springframework.transaction.annotation.Transactional;
@@ -386,20 +387,23 @@ public class SocialServiceImpl implements SocialServiceI {
386 387
     public ResponseBean updateTransaction(String paramets,Integer userId,Integer id) {
387 388
         ResponseBean response = new ResponseBean();
388 389
         JSONObject jsonObject = JSONObject.parseObject(paramets);
389
-        String transactionTitle = (String) jsonObject.get("transactionTitle");
390
-        String transactionContent = (String) jsonObject.get("transactionContent");
391 390
         String imageUrl = (String) jsonObject.get("imageUrl");
391
+
392 392
         TpTransaction tpTransaction = JSONObject.parseObject(paramets, TpTransaction.class);
393
-        TpTransaction taUser = tpTransactionMapper.getById(id);
394
-        if (null != taUser && userId.equals(taUser.getTaUserId())) {
393
+        TpTransaction transaction = tpTransactionMapper.getById(id);
394
+        transaction.setTransactionTitle(tpTransaction.getTransactionTitle());
395
+        transaction.setTransactionContent(tpTransaction.getTransactionContent());
396
+
397
+
398
+        if (null != transaction && userId.equals(transaction.getTaUserId())) {
395 399
             tdImagesMapper.deleteTdImages(Integer.valueOf(id), Constant.TRANSACTION);
396 400
             try {
397
-                insertTdImage(tpTransaction, imageUrl, userId, Constant.TRANSACTION);
401
+                insertTdImage(transaction, imageUrl, userId, Constant.TRANSACTION);
398 402
             } catch (IOException e) {
399 403
                 e.printStackTrace();
400 404
                 throw new RuntimeException("图片修改异常");
401 405
             }
402
-            tpTransactionMapper.updateTransaction(Integer.valueOf(id), transactionTitle, transactionContent, userId);
406
+            tpTransactionMapper.updateTransaction(Integer.valueOf(id), transaction.getTransactionTitle(), transaction.getTransactionContent(), userId);
403 407
             response.addSuccess("修改成功");
404 408
             return response;
405 409
 

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml 查看文件

@@ -214,6 +214,7 @@
214 214
     <include refid="Base_Column_List" />
215 215
     from tp_ticket
216 216
       <trim prefix="where" prefixOverrides="and">
217
+        and status = 1
217 218
         <if test="communityId != null" >
218 219
           and community_id = #{communityId,jdbcType=INTEGER}
219 220
         </if>
@@ -246,5 +247,6 @@
246 247
     WHERE
247 248
         t.id = #{ticketId,jdbcType=INTEGER}
248 249
         AND t.community_id = #{communityId,jdbcType=INTEGER}
250
+        and status = 1
249 251
   </select>
250 252
 </mapper>

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml 查看文件

@@ -204,6 +204,7 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
204 204
     <if test="transactionTitle != null and transactionTitle !=''">
205 205
       and transaction_title LIKE concat('%',#{transactionTitle,jdbcType=VARCHAR},'%')
206 206
     </if>
207
+    and status = 1
207 208
     order by create_date DESC
208 209
   </select>
209 210
 
@@ -216,6 +217,7 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
216 217
     <if test="type != null and type != ''">
217 218
       and type = #{type,jdbcType=INTEGER}
218 219
     </if>
220
+    and status = 1
219 221
     order by create_date DESC
220 222
   </select>
221 223