|
@@ -75,7 +75,8 @@ public class SocialServiceImpl implements SocialServiceI {
|
75
|
75
|
if (null != allViewNum){
|
76
|
76
|
tpAnnouncementMapper.updateByPrimaryKeySelective(id, allViewNum);
|
77
|
77
|
}
|
78
|
|
- return tpAnnouncementMapper.selectByPrimaryKey(id, communityId);
|
|
78
|
+ TpAnnouncement tpAnnouncement = tpAnnouncementMapper.selectByPrimaryKey(id, communityId);
|
|
79
|
+ return tpAnnouncement;
|
79
|
80
|
}
|
80
|
81
|
|
81
|
82
|
/**
|
|
@@ -289,7 +290,7 @@ public class SocialServiceImpl implements SocialServiceI {
|
289
|
290
|
|
290
|
291
|
if (Constant.EFFECTIVE.equals(taUser.getStatus()) && (Constant.RELATION.equals(sysRole.getRoleName()) || Constant.TENANT.equals(sysRole.getRoleName()) || Constant.OWNER.equals(sysRole.getRoleName()))){
|
291
|
292
|
tpTransactionMapper.insertSelective(tpTransaction);
|
292
|
|
- insertTdImage(tpTransaction, imageUrl, userId);
|
|
293
|
+ insertTdImage(tpTransaction, imageUrl, userId,Constant.TRANSACTION);
|
293
|
294
|
TpTransaction tpTransaction1=tpTransactionMapper.getById(tpTransaction.getId());
|
294
|
295
|
response.addSuccess(tpTransaction1);
|
295
|
296
|
return response;
|
|
@@ -298,11 +299,19 @@ public class SocialServiceImpl implements SocialServiceI {
|
298
|
299
|
return response;
|
299
|
300
|
}
|
300
|
301
|
|
301
|
|
- private void insertTdImage(TpTransaction tpTransaction, String imageUrl, Integer userId) throws IOException {
|
|
302
|
+ /**
|
|
303
|
+ * 图片入库
|
|
304
|
+ * @param tpTransaction
|
|
305
|
+ * @param imageUrl
|
|
306
|
+ * @param userId
|
|
307
|
+ * @param type 服务:service, 公告:announcement , 活动:activity 租赁 : transaction
|
|
308
|
+ * @throws IOException
|
|
309
|
+ */
|
|
310
|
+ private void insertTdImage(TpTransaction tpTransaction, String imageUrl, Integer userId,String type) throws IOException {
|
302
|
311
|
TdImages tdImages = new TdImages();
|
303
|
312
|
Integer uuId = tpTransaction.getId();
|
304
|
313
|
tdImages.setImageUrl(imageUrl);
|
305
|
|
- tdImages.setType(Constant.SOCIAL);
|
|
314
|
+ tdImages.setType(type);
|
306
|
315
|
tdImages.setUuid(uuId);
|
307
|
316
|
tdImages.setCreateUser(userId);
|
308
|
317
|
tdImages.setCreateTime(new Date());
|