|
@@ -379,17 +379,45 @@ public class SocialServiceImpl implements SocialServiceI {
|
379
|
379
|
}
|
380
|
380
|
|
381
|
381
|
@Override
|
|
382
|
+ @Transactional(rollbackFor = Exception.class)
|
382
|
383
|
public ResponseBean updateTransaction(String paramets,Integer userId) {
|
383
|
384
|
ResponseBean response = new ResponseBean();
|
384
|
385
|
JSONObject jsonObject = JSONObject.parseObject(paramets);
|
385
|
386
|
String id = (String) jsonObject.get("id");
|
386
|
|
- String transactionTitle = (String) jsonObject.get("title");
|
387
|
|
- String transactionContent = (String) jsonObject.get("content");
|
|
387
|
+ String transactionTitle = (String) jsonObject.get("transactionTitle");
|
|
388
|
+ String transactionContent = (String) jsonObject.get("transactionContent");
|
|
389
|
+ String imageUrl = (String) jsonObject.get("imageUrl");
|
|
390
|
+ TpTransaction tpTransaction = JSONObject.parseObject(paramets,TpTransaction.class);
|
|
391
|
+
|
|
392
|
+ tdImagesMapper.deleteTdImages( Integer.valueOf(id),Constant.TRANSACTION);
|
|
393
|
+ try {
|
|
394
|
+ insertTdImage(tpTransaction, imageUrl, userId,Constant.TRANSACTION);
|
|
395
|
+ } catch (IOException e) {
|
|
396
|
+ e.printStackTrace();
|
|
397
|
+ throw new RuntimeException("图片修改异常");
|
|
398
|
+ }
|
388
|
399
|
tpTransactionMapper.updateTransaction(Integer.valueOf(id),transactionTitle,transactionContent,userId);
|
389
|
400
|
response.addSuccess("修改成功");
|
390
|
401
|
return response;
|
391
|
402
|
}
|
392
|
403
|
|
|
404
|
+ @Override
|
|
405
|
+ public ResponseBean deleteransaction(String paramets) {
|
|
406
|
+ ResponseBean responseBean= new ResponseBean();
|
|
407
|
+ JSONObject jsonObject = JSONObject.parseObject(paramets);
|
|
408
|
+ String id = (String) jsonObject.get("id");
|
|
409
|
+ TpTransaction tpTransaction=tpTransactionMapper.getById(Integer.valueOf(id));
|
|
410
|
+ if(null!= tpTransaction) {
|
|
411
|
+ tpTransaction.setStatus("0");
|
|
412
|
+ tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
|
|
413
|
+ responseBean.addSuccess("删除成功");
|
|
414
|
+ }else {
|
|
415
|
+ responseBean.addSuccess("当前ID不存在");
|
|
416
|
+ }
|
|
417
|
+ return responseBean;
|
|
418
|
+ }
|
|
419
|
+
|
|
420
|
+
|
393
|
421
|
@Override
|
394
|
422
|
public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId, Integer userId) {
|
395
|
423
|
//修改工单内容和评分
|
|
@@ -436,7 +464,8 @@ public class SocialServiceImpl implements SocialServiceI {
|
436
|
464
|
responseBean.addSuccess("取消报名成功");
|
437
|
465
|
return responseBean;
|
438
|
466
|
}
|
439
|
|
-
|
|
467
|
+
|
|
468
|
+
|
440
|
469
|
public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId, Integer userId,String remark){
|
441
|
470
|
ResponseBean responseBean = new ResponseBean();
|
442
|
471
|
//判断是否已经报名
|