Преглед изворни кода

Merge branch 'V3.0.0' of http://git.ycjcjy.com/fuxingfan/smartCommunity into V3.0.0

魏熙美 пре 6 година
родитељ
комит
640f3f8c8d

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpTicketAndTransactionController.java Прегледај датотеку

@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.dao.TpTransactionMapper;
7
+import com.community.huiju.dao.TpUserMapper;
7 8
 import com.community.huiju.model.TpTransaction;
9
+import com.community.huiju.model.TpUser;
8 10
 import com.community.huiju.service.SocialServiceI;
9 11
 import io.swagger.annotations.Api;
10 12
 import io.swagger.annotations.ApiImplicitParam;
@@ -24,6 +26,9 @@ public class TpTicketAndTransactionController {
24 26
     @Autowired
25 27
     private SocialServiceI socialServiceI;
26 28
 
29
+    @Autowired
30
+    private TpUserMapper tpUserMapper;
31
+
27 32
     @ApiOperation(value = "app端话题管理", notes = "app端话题管理")
28 33
     @ApiImplicitParams({
29 34
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "loginName",value = "电话号码"),
@@ -155,4 +160,18 @@ public class TpTicketAndTransactionController {
155 160
         return responseBean;
156 161
     }
157 162
 
163
+    @ApiOperation(value = "app端话题管理话题详情", notes = "app端话题管理话题详情")
164
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
165
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "帖子id"),
166
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "loginName", value = "手机号"),
167
+    })
168
+    @RequestMapping(value = "/getTransactionManage/{communityId}", method = RequestMethod.GET)
169
+    public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId,@RequestParam("loginName") String loginName) {
170
+        ResponseBean responseBean = new ResponseBean();
171
+        TpUser tpUser= tpUserMapper.selectLoginName(loginName,communityId);
172
+        TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId, tpUser.getId());
173
+        responseBean.addSuccess(activity);
174
+        return responseBean;
175
+    }
176
+
158 177
 }

+ 9
- 9
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShopAppraisal.java Прегледај датотеку

@@ -9,7 +9,7 @@ public class TpShopAppraisal {
9 9
 
10 10
     private Integer shopId;
11 11
 
12
-    private String score;
12
+    private Integer score;
13 13
 
14 14
     private String content;
15 15
 
@@ -31,6 +31,14 @@ public class TpShopAppraisal {
31 31
      */
32 32
     private TpShopAppraisalReplay tpShopAppraisalReplay;
33 33
 
34
+    public Integer getScore() {
35
+        return score;
36
+    }
37
+
38
+    public void setScore(Integer score) {
39
+        this.score = score;
40
+    }
41
+
34 42
     public void setTpShopAppraisalReplay(TpShopAppraisalReplay tpShopAppraisalReplay) {
35 43
         this.tpShopAppraisalReplay = tpShopAppraisalReplay;
36 44
     }
@@ -63,14 +71,6 @@ public class TpShopAppraisal {
63 71
         this.shopId = shopId;
64 72
     }
65 73
 
66
-    public String getScore() {
67
-        return score;
68
-    }
69
-
70
-    public void setScore(String score) {
71
-        this.score = score == null ? null : score.trim();
72
-    }
73
-
74 74
     public String getContent() {
75 75
         return content;
76 76
     }

+ 9
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Прегледај датотеку

@@ -638,8 +638,8 @@ public class SocialServiceImpl implements SocialServiceI {
638 638
                 tdImagesMapper.insert(tdImages);
639 639
             }
640 640
         }
641
-        // 推消
642
-        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"6","1","1", tpTransactionReply.getUuid(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
641
+        // 推消
642
+        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"6","1","1", tpTransactionReply.getReplyId(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
643 643
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReply.getTransactionId());
644 644
         tpMessageMapper.insertSelective(tpMessage);
645 645
         response.addSuccess("成功");
@@ -1103,8 +1103,12 @@ public class SocialServiceImpl implements SocialServiceI {
1103 1103
 
1104 1104
         JSONArray tpTransactionIdId = parseObject.getJSONArray("id");
1105 1105
         Integer[] tpTransactionReportArray = tpTransactionIdId.toArray(new Integer[]{});
1106
-        for (Integer TpTransactionReport:tpTransactionReportArray){
1107
-            tpTransactionReportMapper.deleteTransactionReport(TpTransactionReport,tpUser.getCommunityId());
1106
+        for (Integer tpTransactionReportID:tpTransactionReportArray){
1107
+            tpTransactionReportMapper.deleteTransactionReport(tpTransactionReportID,tpUser.getCommunityId());
1108
+            TpTransaction tpTransaction= new TpTransaction();
1109
+            tpTransaction.setId(tpTransactionReportID);
1110
+            tpTransaction.setIsReported("0");
1111
+            tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
1108 1112
         }
1109 1113
         response.addSuccess("成功");
1110 1114
         return response;
@@ -1132,6 +1136,7 @@ public class SocialServiceImpl implements SocialServiceI {
1132 1136
         tpTransaction.setViewCount(0);
1133 1137
         tpTransaction.setIsReported("0");
1134 1138
         tpTransaction.setReleaseIdentity("1");
1139
+        tpTransaction.setStatus("1");
1135 1140
         tpTransactionMapper.insertSelective(tpTransaction);
1136 1141
         JSONArray contentImg = jsonobject.getJSONArray("contentImg");
1137 1142
 

+ 5
- 5
CODE/smart-community/app-api/src/main/resources/mapper/TpShopAppraisalMapper.xml Прегледај датотеку

@@ -5,7 +5,7 @@
5 5
     <id column="id" jdbcType="INTEGER" property="id" />
6 6
     <result column="community_id" jdbcType="INTEGER" property="communityId" />
7 7
     <result column="shop_id" jdbcType="INTEGER" property="shopId" />
8
-    <result column="score" jdbcType="VARCHAR" property="score" />
8
+    <result column="score" jdbcType="INTEGER" property="score" />
9 9
     <result column="content" jdbcType="VARCHAR" property="content" />
10 10
     <result column="appraisal_people" jdbcType="VARCHAR" property="appraisalPeople" />
11 11
     <result column="appraisal_tel" jdbcType="VARCHAR" property="appraisalTel" />
@@ -36,7 +36,7 @@
36 36
       status, create_user, create_date
37 37
       )
38 38
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, 
39
-      #{score,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{appraisalPeople,jdbcType=VARCHAR}, 
39
+      #{score,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{appraisalPeople,jdbcType=VARCHAR},
40 40
       #{appraisalTel,jdbcType=VARCHAR}, #{appraisalAvatar,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
41 41
       #{status,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}
42 42
       )
@@ -92,7 +92,7 @@
92 92
         #{shopId,jdbcType=INTEGER},
93 93
       </if>
94 94
       <if test="score != null">
95
-        #{score,jdbcType=VARCHAR},
95
+        #{score,jdbcType=INTEGER},
96 96
       </if>
97 97
       <if test="content != null">
98 98
         #{content,jdbcType=VARCHAR},
@@ -130,7 +130,7 @@
130 130
         shop_id = #{shopId,jdbcType=INTEGER},
131 131
       </if>
132 132
       <if test="score != null">
133
-        score = #{score,jdbcType=VARCHAR},
133
+        score = #{score,jdbcType=INTEGER},
134 134
       </if>
135 135
       <if test="content != null">
136 136
         content = #{content,jdbcType=VARCHAR},
@@ -163,7 +163,7 @@
163 163
     update tp_shop_appraisal
164 164
     set community_id = #{communityId,jdbcType=INTEGER},
165 165
       shop_id = #{shopId,jdbcType=INTEGER},
166
-      score = #{score,jdbcType=VARCHAR},
166
+      score = #{score,jdbcType=INTEGER},
167 167
       content = #{content,jdbcType=VARCHAR},
168 168
       appraisal_people = #{appraisalPeople,jdbcType=VARCHAR},
169 169
       appraisal_tel = #{appraisalTel,jdbcType=VARCHAR},

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml Прегледај датотеку

@@ -9,7 +9,7 @@
9 9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
10 10
     <result column="reportName" property="reportName" jdbcType="VARCHAR" />
11 11
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
-    <result column="reportStringName" property="reportUserName" jdbcType="VARCHAR" />
12
+    <result column="reportUserName" property="reportUserName" jdbcType="VARCHAR" />
13 13
 
14 14
   </resultMap>
15 15
   <sql id="Base_Column_List" >

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java Прегледај датотеку

@@ -396,8 +396,8 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
396 396
 			tdImages.setCreateUser(userElement.getId());
397 397
 			tdImagesMapper.insert(tdImages);
398 398
 		}
399
-		Message  tpMessage=new Message(null,userElement.getCommunityId(),"9","1","1", tpTransaction.getUuid(),"1","2",  userElement.getUserName()+":"+ replyContent,
400
-				"1",null,null,"0",userElement.getUserVerifyId(),LocalDateTime.now(),null,null,null,null,null,tpTransaction.getId());
399
+		Message  tpMessage=new Message(null,userElement.getCommunityId(),"6","1","1", transactionReply.getReplyUuid(),"1","2",  userElement.getUserName()+":"+ replyContent,
400
+				"1",null,null,"0",userElement.getUserVerifyId(),LocalDateTime.now(),null,null,null,null,null,transactionReply.getTransactionId());
401 401
 		tpMessageMapper.insert(tpMessage);
402 402
 		response.addSuccess("成功");
403 403
 		return response;