|
@@ -3,6 +3,7 @@ package com.community.huiju.service.impl;
|
3
|
3
|
import com.alibaba.fastjson.JSONObject;
|
4
|
4
|
import com.community.commom.constant.Constant;
|
5
|
5
|
import com.community.commom.mode.ResponseBean;
|
|
6
|
+import com.community.commom.session.UserElement;
|
6
|
7
|
import com.community.huiju.dao.*;
|
7
|
8
|
import com.community.huiju.model.*;
|
8
|
9
|
import com.community.huiju.service.ImageServiceI;
|
|
@@ -452,17 +453,33 @@ public class SocialServiceImpl implements SocialServiceI {
|
452
|
453
|
}
|
453
|
454
|
|
454
|
455
|
@Override
|
455
|
|
- public ResponseBean deleteransaction(Integer id,Integer userId) {
|
|
456
|
+ public ResponseBean deleteransaction(Integer id, UserElement userElement) {
|
456
|
457
|
ResponseBean responseBean= new ResponseBean();
|
457
|
458
|
TpTransaction tpTransaction=tpTransactionMapper.getById(Integer.valueOf(id));
|
458
|
|
- if(null!= tpTransaction && userId.equals(tpTransaction.getTaUserId())) {
|
|
459
|
+ if(null!= tpTransaction && userElement.getId().equals(tpTransaction.getTaUserId())) {
|
459
|
460
|
tpTransaction.setStatus("0");
|
460
|
461
|
tpTransaction.setUpdateDate(new Date());
|
461
|
462
|
tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
|
462
|
463
|
responseBean.addSuccess("删除成功");
|
463
|
464
|
|
|
465
|
+
|
|
466
|
+
|
464
|
467
|
// 把消息变为无效
|
465
|
|
-
|
|
468
|
+ Map<String, Object> map = new HashMap<>();
|
|
469
|
+ map.put("communityId", userElement.getCommunityId());
|
|
470
|
+ map.put("messageType", "9");
|
|
471
|
+ map.put("adviceType", "4");
|
|
472
|
+ map.put("uuidType", "2");
|
|
473
|
+ map.put("source", "1");
|
|
474
|
+ map.put("status", "1");
|
|
475
|
+ map.put("modelType", "1");
|
|
476
|
+ map.put("transactionId", tpTransaction.getId());
|
|
477
|
+ TpMessage tpMessage = tpMessageMapper.selectConditionsTpMessage(map);
|
|
478
|
+ if (null != tpMessage) {
|
|
479
|
+ tpMessage.setStatus("0");
|
|
480
|
+ tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
|
|
481
|
+ }
|
|
482
|
+
|
466
|
483
|
|
467
|
484
|
|
468
|
485
|
}else {
|