@@ -17,10 +17,9 @@ public interface GDTicketMapper extends BaseMapper<GDTicketEntity> {
@Select("SELECT * FROM `gd_ticket` WHERE `ticket_id` = #{ticketId};")
GDTicketEntityfindByTicketId(LongticketId);
@Select("SELECT count(t.uid) FROM ( SELECT `uid` FROM `gd_ticket` WHERE `source` LIKE '%${source}%' AND `title` LIKE '%${title}%' AND `create_type` LIKE '%${create_type}%' AND `compensate_state` LIKE '%${compensate_state}%' AND `type_id` LIKE '%${type_id}%' AND `sign_state` LIKE '%${sign_state}%' AND `urgent_type` LIKE '%${urgent_type}%' AND `state` LIKE '%${state}%' AND `area_name` LIKE '%${area_name}%') t")
@Select("SELECT COUNT(*) FROM (SELECT `uid` FROM `gd_ticket` WHERE ( #{source} IS NULL OR #{source} = '' OR `source` LIKE CONCAT('%', #{source}, '%')) AND ( #{title} IS NULL OR #{title} = '' OR `title` LIKE CONCAT('%', #{title}, '%') ) AND ( #{create_type} IS NULL OR #{create_type} = '' OR `create_type` LIKE CONCAT('%', #{create_type}, '%') ) AND ( #{compensate_state} IS NULL OR #{compensate_state} = '' OR `compensate_state` LIKE CONCAT('%', #{compensate_state}, '%') ) AND ( #{type_id} IS NULL OR #{type_id} = '' OR `type_id` LIKE CONCAT('%', #{type_id}, '%') ) AND ( #{sign_state} IS NULL OR #{sign_state} = '' OR `sign_state` LIKE CONCAT('%', #{sign_state}, '%') ) AND ( #{urgent_type} IS NULL OR #{urgent_type} = '' OR `urgent_type` LIKE CONCAT('%', #{urgent_type}, '%')) ) t")
IntegercountUsable(TicketListRequestparam);
@Select("SELECT `source`, `title`, `create_type`,`compensate_state`, `type_id`, `sign_state`, `urgent_type`, `state`, `area_name` , `pre_delivery_id`, `ticket_id`, `create_at` FROM `gd_ticket` WHERE `source` LIKE '%${source}%' AND `title` LIKE '%${title}%' AND `create_type` LIKE '%${create_type}%' AND `compensate_state` LIKE '%${compensate_state}%' AND `type_id` LIKE '%${type_id}%' AND `sign_state` LIKE '%${sign_state}%' AND `urgent_type` LIKE '%${urgent_type}%' AND `state` LIKE '%${state}%' AND `area_name` LIKE '%${area_name}%' ORDER BY `ticket_id` DESC LIMIT #{offset}, #{size}; ")
@Select("SELECT * FROM `gd_ticket` WHERE ( #{source} IS NULL OR #{source} = '' OR `source` LIKE CONCAT('%', #{source}, '%')) AND ( #{title} IS NULL OR #{title} = '' OR `title` LIKE CONCAT('%', #{title}, '%') ) AND ( #{create_type} IS NULL OR #{create_type} = '' OR `create_type` LIKE CONCAT('%', #{create_type}, '%') ) AND ( #{compensate_state} IS NULL OR #{compensate_state} = '' OR `compensate_state` LIKE CONCAT('%', #{compensate_state}, '%') ) AND ( #{type_id} IS NULL OR #{type_id} = '' OR `type_id` LIKE CONCAT('%', #{type_id}, '%') ) AND ( #{sign_state} IS NULL OR #{sign_state} = '' OR `sign_state` LIKE CONCAT('%', #{sign_state}, '%') ) AND ( #{urgent_type} IS NULL OR #{urgent_type} = '' OR `urgent_type` LIKE CONCAT('%', #{urgent_type}, '%') )")
@Select("SELECT count(a.`uid`) FROM `package_notice` a, `log_order_mail_detail` b WHERE a.`orderCode` = b.`logisticsOrderCode` AND a.`orderCode` LIKE '%${orderCode}%' ; ")
IntegercountUsable(PackageNoticeRequestparam);
@Select("SELECT a.`orderCode`, b.`expressCode`, b.`mailNo`, a.`status` FROM `package_notice` a, `log_order_mail_detail` b WHERE a.`orderCode` = b.`logisticsOrderCode` AND a.`orderCode` LIKE '%${orderCode}%' ORDER BY a.`updated` DESC LIMIT #{offset}, #{size}; ")