dingxin hace 6 años
padre
commit
7685ff3438

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java Ver fichero

@@ -47,4 +47,6 @@ public interface TpTicketMapper {
47 47
     TpTicket getTicketTpUserId(@Param("ticketId") Integer ticketId, @Param("communityId") Integer communityId);
48 48
 
49 49
     Integer selectRecordStatus(@Param("communityId") Integer communityId, @Param("ticketId")Integer ticketId);
50
+
51
+    TpTicket selectTpTicketName(@Param("communityId")Integer communityId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
50 52
 }

+ 7
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Ver fichero

@@ -286,7 +286,13 @@ public class TicketServiceImpl implements ITicketService {
286 286
         tpTicket.setCreateUser(userElement.getUserVerifyId());
287 287
         tpTicket.setCreateDate(new Date());
288 288
         tpTicket.setUpdateUser(userElement.getId());
289
-//        tpTicket.setUpdateDate(new Date());
289
+        //tpTicket.setUpdateDate(new Date());
290
+        //校验此工单是否已存在
291
+//        TpTicket tpTicketName= tpTicketMapper.selectTpTicketName(userElement.getCommunityId(),tpTicket.getType(),tpTicket.getTicketTitle());
292
+//        if (null != tpTicketName){
293
+//            response.addError("工单已存在");
294
+//            return  response;
295
+//        }
290 296
         // 插入工单
291 297
         tpTicketMapper.insertSelective(tpTicket);
292 298
         insertTdImage(tpTicket, imageUrl, userElement.getId());

+ 8
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml Ver fichero

@@ -268,4 +268,12 @@
268 268
      and community_id= #{communityId,jdbcType=INTEGER}
269 269
      and status = 4
270 270
   </select>
271
+  <select id="selectTpTicketName" resultType="com.community.huiju.model.TpTicket">
272
+    select
273
+    *
274
+    from tp_ticket
275
+    where community_id = #{communityId,jdbcType=INTEGER}
276
+     and ticket_title= #{ticketTitle,jdbcType=INTEGER}
277
+     and type = #{type,jdbcType=VARCHAR}
278
+  </select>
271 279
 </mapper>