dingxin 6 anos atrás
pai
commit
4fb475aa7d

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Ver arquivo

@@ -299,7 +299,7 @@ public class SocialController extends BaseController {
299 299
 
300 300
     @ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
301 301
     @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
302
-            @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
302
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型0 代表 议事大厅 1 是邻里互助 2 是二手/租赁 3 是其他话题"),
303 303
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionTitle", value = "帖子标题"),
304 304
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
305 305
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")}
@@ -369,7 +369,7 @@ public class SocialController extends BaseController {
369 369
         ResponseBean responseBean = new ResponseBean();
370 370
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
371 371
         Integer userId = userElement.getId();
372
-        ResponseBean response = socialServiceI.selectAllTransaction(userId, pageNum, pageSize,type);
372
+        ResponseBean response = socialServiceI.selectAllTransaction(userId, pageNum, pageSize,type,userElement.getCommunityId());
373 373
         return response;
374 374
     }
375 375
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java Ver arquivo

@@ -23,7 +23,7 @@ public interface TpTransactionMapper {
23 23
 
24 24
     List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("transactionTitle") String transactionTitle, @Param("type") String type);
25 25
 
26
-    List<TpTransaction> selectTransaction(@Param("userId")Integer userId, @Param("communityId")Integer communityId,@Param("type") Integer type);
26
+    List<TpTransaction> selectTransaction(@Param("id")Integer userId, @Param("communityId")Integer communityId,@Param("type") Integer type);
27 27
 
28 28
     void updateTransaction(@Param("id")Integer id, @Param("transactionTitle")String transactionTitle, @Param("transactionContent")String transactionContent, @Param("userId")Integer userId);
29 29
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Ver arquivo

@@ -116,7 +116,7 @@ public interface SocialServiceI {
116 116
 	 * @param userId
117 117
 	 * @return
118 118
 	 */
119
-	ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer pageSize,Integer type);
119
+	ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer pageSize,Integer type,Integer communityId);
120 120
 
121 121
 	/**
122 122
 	 * 修改当前帖子

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Ver arquivo

@@ -406,10 +406,9 @@ public class SocialServiceImpl implements SocialServiceI {
406 406
         }
407 407
     }
408 408
     @Override
409
-    public ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer paeSize,Integer type) {
409
+    public ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer paeSize,Integer type,Integer communityId) {
410 410
         ResponseBean responseBean = new ResponseBean();
411 411
         TaUser user=taUserMapper.selectByPrimaryKey(userId);
412
-         Integer communityId=user.getCommunityId();
413 412
 
414 413
         //判断身份是否为业主且状态为已停用
415 414
         TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(userId);

+ 23
- 7
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Ver arquivo

@@ -218,16 +218,32 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
218 218
   </select>
219 219
 
220 220
   <select id="selectTransaction" resultMap="BaseResultMap">
221
-    select
221
+    SELECT
222 222
     <include refid="Base_Column_List" />
223
-    from tp_transaction
224
-    where community_id = #{communityId,jdbcType=INTEGER}
225
-    and ta_user_id = #{userId,jdbcType=INTEGER}
223
+    FROM
224
+    tp_transaction t
225
+    WHERE t.create_user=#{id,jdbcType=INTEGER}
226
+    AND t.community_id=#{communityId,jdbcType=INTEGER}
227
+    UNION ALL
228
+    SELECT
229
+    <include refid="Base_Column_List" />
230
+    FROM
231
+    tp_transaction t
232
+    INNER JOIN(SELECT
233
+    y.transaction_id
234
+    FROM
235
+    tp_transaction_reply y
236
+    LEFT JOIN tp_transaction t ON y.transaction_id = t.id
237
+    WHERE
238
+    y.ta_user_id = #{id,jdbcType=INTEGER}
226 239
     <if test="type != null and type != ''">
227
-      and type = #{type,jdbcType=INTEGER}
240
+      and  t.type = #{type,jdbcType=INTEGER}
228 241
     </if>
229
-    and status = 1
230
-    order by update_date DESC, create_date DESC
242
+    AND y.community_id = #{communityId,jdbcType=INTEGER}
243
+    AND y.transaction_id NOT IN ( SELECT t.id FROM tp_transaction t WHERE t.create_user = #{id,jdbcType=INTEGER} AND t.community_id = #{communityId,jdbcType=INTEGER}  )
244
+    GROUP BY
245
+    y.transaction_id) a ON a.transaction_id = t.id
246
+    order by create_date DESC
231 247
   </select>
232 248
 
233 249
   <update id="updateTransaction" parameterType="com.community.huiju.model.TpTransaction" >

+ 14
- 9
VUECODE/smart-property-manage/src/views/social/activity/info/index.vue Ver arquivo

@@ -26,7 +26,7 @@
26 26
       </div>
27 27
       <div class="circular"/>
28 28
       <div class="people-limit">限制{{ ruleForm.signUpMax }}人</div>
29
-      <el-button type="primary" style="float: left;" @click="lockSignUp">查看报名名单</el-button>
29
+      <a type="primary" style="float: left;" @click="lockSignUp">查看报名名单</a>
30 30
     </div>
31 31
     <span>报名截止时间:{{ formatDate(ruleForm.registrationEndTime) }}</span>
32 32
     <div class="bom-button">
@@ -103,14 +103,19 @@ export default {
103 103
       this.$router.push({ name: 'activity-signIn-index', query: { id: this.ruleForm.id }})
104 104
     },
105 105
     // 下载图片
106
-     downloadCodeImg(){
107
-      console.log('下载图片')
108
-      var a = document.createElement('a')
109
-      a.download = this.ruleForm.activityCode
110
-       // 设置图片地址
111
-      a.href = this.ruleForm.activityCode
112
-      a.click();
113
-            }
106
+//      downloadCodeImg(){
107
+//       var a = document.createElement('a')
108
+//       a.download = this.ruleForm.activityCode
109
+//        // 设置图片地址
110
+//       a.href = this.ruleForm.activityCode
111
+//       a.click();
112
+//     }
113
+   downloadCodeImg(){
114
+  var alink = document.createElement("a");
115
+  alink.href = this.ruleForm.activityCode;
116
+  alink.download = "pic"; //图片名
117
+  alink.click();
118
+  }
114 119
 }
115 120
   }
116 121
 </script>