傅行帆 4 jaren geleden
bovenliggende
commit
19bef3ce28

+ 1
- 1
src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java Bestand weergeven

@@ -30,7 +30,7 @@ import java.io.IOException;
30 30
  * @since 2019-02-14
31 31
  */
32 32
 @RestController
33
-@RequestMapping("/")
33
+@RequestMapping("/api")
34 34
 @Api(value = "工单列表API", tags = "工单列表API")
35 35
 public class TpTicketController extends BaseController {
36 36
     @Autowired

+ 1
- 1
src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java Bestand weergeven

@@ -30,7 +30,7 @@ public interface TpTicketMapper extends BaseMapper<TpTicket> {
30 30
      * @param map
31 31
      * @return
32 32
      */
33
-    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,Map map);
33
+    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,@Param("type") String type);
34 34
 
35 35
     TpTicket selectTpTicketName(@Param("communityId")Integer communityId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
36 36
 

+ 1
- 3
src/main/java/com/huiju/estateagents/property/service/impl/SocialServiceImpl.java Bestand weergeven

@@ -82,9 +82,7 @@ public class SocialServiceImpl implements SocialServiceI {
82 82
         Page<TpAnnouncement> page = new Page<>(pageNum, pageSize);
83 83
         // 获取数据
84 84
         IPage<TpAnnouncement> wxAnnouncementsPage = tpAnnouncementMapper.getWxAnnouncements(page, orgId, title);
85
-        parameter.put("total", wxAnnouncementsPage.getTotal());
86
-        parameter.put("list", wxAnnouncementsPage.getRecords());
87
-        responseBean.addSuccess(parameter);
85
+        responseBean.addSuccess(wxAnnouncementsPage);
88 86
         return responseBean;
89 87
     }
90 88
 

+ 6
- 6
src/main/java/com/huiju/estateagents/property/service/impl/TpTicketServiceImpl.java Bestand weergeven

@@ -436,14 +436,14 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
436 436
         Map<String, Object> result = Maps.newHashMap();
437 437
 
438 438
         Map<String, Object> parameter = Maps.newHashMap();
439
-        parameter.put("communityId", tpTicket.getOrgId());
439
+        parameter.put("orgId", tpTicket.getOrgId());
440 440
         parameter.put("taUserId", tpTicket.getTaUserId());
441 441
 
442 442
         //  1:投诉   2:报修 3:联系物业
443 443
         parameter.put("type", 2);
444 444
         // 报修
445 445
         Page<TpTicket> pageRepairs = new Page(pageNum, pageSize);
446
-        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageRepairs, parameter);
446
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageRepairs, tpTicket.getType());
447 447
         List<TpTicket> tpTicketRepairsList = tpTicketIPage.getRecords();
448 448
         List<TpTicketVO> repairsList = Lists.newArrayList();
449 449
         tpTicketVOConvert(tpTicketRepairsList, repairsList);
@@ -452,7 +452,7 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
452 452
         //  1:投诉   2:报修 3:联系物业
453 453
         parameter.put("type", 1);
454 454
         Page<TpTicket> pageComplaint = new Page(pageNum, pageSize);
455
-        IPage<TpTicket> tpTicketIPageComplaint = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageComplaint, parameter);
455
+        IPage<TpTicket> tpTicketIPageComplaint = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageComplaint, tpTicket.getType());
456 456
         List<TpTicket> tpTicketComplaintList = tpTicketIPageComplaint.getRecords();
457 457
         List<TpTicketVO> complaintList = Lists.newArrayList();
458 458
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
@@ -461,7 +461,7 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
461 461
         //  1:投诉   2:报修 3:联系物业
462 462
         parameter.put("type", 3);
463 463
         Page<TpTicket> pageLiaison = new Page(pageNum, pageSize);
464
-        IPage<TpTicket> tpTicketIPageLiaison = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageLiaison, parameter);
464
+        IPage<TpTicket> tpTicketIPageLiaison = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageLiaison, tpTicket.getType());
465 465
         List<TpTicket> tpTicketLiaisonList = tpTicketIPageLiaison.getRecords();
466 466
         List<TpTicketVO> liaisonList = Lists.newArrayList();
467 467
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
@@ -550,14 +550,14 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
550 550
         ResponseBean response = new ResponseBean();
551 551
 
552 552
         Map<String, Object> parameter = Maps.newHashMap();
553
-        parameter.put("communityId", tpTicket.getOrgId());
553
+        parameter.put("orgId", tpTicket.getOrgId());
554 554
         parameter.put("taUserId", tpTicket.getTaUserId());
555 555
 
556 556
         //  1:投诉   2:报修 3:联系物业
557 557
         parameter.put("type", tpTicket.getType());
558 558
 
559 559
         Page<TpTicket> pagelist = new Page<>(pageNum, pageSize);
560
-        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pagelist, parameter);
560
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pagelist, tpTicket.getType());
561 561
         List<TpTicket> tpTicketList = tpTicketIPage.getRecords();
562 562
 
563 563
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();

+ 1
- 1
src/main/resources/mapper/property/BillInvoiceMapper.xml Bestand weergeven

@@ -147,7 +147,7 @@
147 147
         LEFT JOIN tp_bill b ON b.id = i.bill_id
148 148
         AND b.org_id = #{orgId,jdbcType=INTEGER}
149 149
         WHERE
150
-        i.orgId = #{orgId,jdbcType=INTEGER}
150
+        i.org_id = #{orgId,jdbcType=INTEGER}
151 151
         <if test="payType == 0">
152 152
             AND i.bill_status = 0
153 153
         </if>

+ 1
- 1
src/main/resources/mapper/property/TpAnnouncementMapper.xml Bestand weergeven

@@ -88,7 +88,7 @@
88 88
     a.view_count
89 89
     FROM
90 90
     tp_announcement a
91
-    LEFT JOIN tp_user u ON a.create_user = u.id
91
+    LEFT JOIN ta_user u ON a.create_user = u.user_id
92 92
     AND u.org_id = #{orgId,jdbcType=INTEGER}
93 93
     WHERE
94 94
     a.org_id = #{orgId,jdbcType=INTEGER}

+ 7
- 7
src/main/resources/mapper/property/TpTicketMapper.xml Bestand weergeven

@@ -69,17 +69,17 @@
69 69
         WHERE p.id=#{id,jdbcType=INTEGER}
70 70
     </select>
71 71
 
72
-    <select id="selectByCommuniytIdAndByTaUserIdAndByType" parameterType="map" resultType="com.huiju.estateagents.property.model.TpTicket" >
72
+    <select id="selectByCommuniytIdAndByTaUserIdAndByType" parameterType="java.util.Map" resultType="com.huiju.estateagents.property.model.TpTicket" >
73 73
         select
74 74
          *
75 75
         from tp_ticket
76 76
         <trim prefix="where" prefixOverrides="and">
77
-            <if test="communityId != null" >
78
-                and community_id = #{communityId,jdbcType=INTEGER}
79
-            </if>
80
-            <if test="taUserId != null" >
81
-                and ta_user_id = #{taUserId,jdbcType=INTEGER}
82
-            </if>
77
+<!--            <if test="orgId != null" >-->
78
+<!--                and org_id = #{orgId,jdbcType=INTEGER}-->
79
+<!--            </if>-->
80
+<!--            <if test="taUserId != null" >-->
81
+<!--                and ta_user_id = #{taUserId,jdbcType=INTEGER}-->
82
+<!--            </if>-->
83 83
             <if test="type != null" >
84 84
                 and type = #{type,jdbcType=CHAR}
85 85
             </if>