1
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.jarvis.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 闲管家订单变更日志(全表检索,用于排查)
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ErpGoofishOrderEventLogQuery extends BaseEntity {
|
||||
|
||||
private Long orderId;
|
||||
private String appKey;
|
||||
private String orderNo;
|
||||
private String eventType;
|
||||
private String source;
|
||||
/** 模糊匹配 message */
|
||||
private String messageKeyword;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.jarvis.mapper;
|
||||
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -10,4 +11,6 @@ public interface ErpGoofishOrderEventLogMapper {
|
||||
int insert(ErpGoofishOrderEventLog row);
|
||||
|
||||
List<ErpGoofishOrderEventLog> selectByOrderId(@Param("orderId") Long orderId);
|
||||
|
||||
List<ErpGoofishOrderEventLog> selectLogList(ErpGoofishOrderEventLogQuery query);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.jarvis.service;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -43,4 +44,7 @@ public interface IErpGoofishOrderService {
|
||||
|
||||
/** 订单状态 / 物流 / 发货 变更日志(新→旧) */
|
||||
List<ErpGoofishOrderEventLog> listEventLogsByOrderId(Long orderId);
|
||||
|
||||
/** 全表分页检索(排查用,配合 PageHelper) */
|
||||
List<ErpGoofishOrderEventLog> selectEventLogList(ErpGoofishOrderEventLogQuery query);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.jarvis.config.JarvisGoofishProperties;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery;
|
||||
import com.ruoyi.jarvis.domain.ErpOpenConfig;
|
||||
import com.ruoyi.jarvis.dto.GoofishNotifyMessage;
|
||||
import com.ruoyi.jarvis.mapper.ErpGoofishOrderEventLogMapper;
|
||||
@@ -174,4 +175,13 @@ public class ErpGoofishOrderServiceImpl implements IErpGoofishOrderService {
|
||||
List<ErpGoofishOrderEventLog> list = erpGoofishOrderEventLogMapper.selectByOrderId(orderId);
|
||||
return list != null ? list : Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ErpGoofishOrderEventLog> selectEventLogList(ErpGoofishOrderEventLogQuery query) {
|
||||
if (query == null) {
|
||||
query = new ErpGoofishOrderEventLogQuery();
|
||||
}
|
||||
List<ErpGoofishOrderEventLog> list = erpGoofishOrderEventLogMapper.selectLogList(query);
|
||||
return list != null ? list : Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,24 @@
|
||||
where order_id = #{orderId}
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectLogList" parameterType="com.ruoyi.jarvis.domain.ErpGoofishOrderEventLogQuery" resultMap="ErpGoofishOrderEventLogResult">
|
||||
select id, order_id, app_key, order_no, event_type, source, message, create_time
|
||||
from erp_goofish_order_event_log
|
||||
<where>
|
||||
<if test="orderId != null">and order_id = #{orderId}</if>
|
||||
<if test="appKey != null and appKey != ''">and app_key = #{appKey}</if>
|
||||
<if test="orderNo != null and orderNo != ''">and order_no like concat('%', #{orderNo}, '%')</if>
|
||||
<if test="eventType != null and eventType != ''">and event_type = #{eventType}</if>
|
||||
<if test="source != null and source != ''">and source like concat('%', #{source}, '%')</if>
|
||||
<if test="messageKeyword != null and messageKeyword != ''">and message like concat('%', #{messageKeyword}, '%')</if>
|
||||
<if test="params != null and params.beginTime != null and params.beginTime != ''">
|
||||
and create_time >= concat(#{params.beginTime}, ' 00:00:00')
|
||||
</if>
|
||||
<if test="params != null and params.endTime != null and params.endTime != ''">
|
||||
and create_time <= concat(#{params.endTime}, ' 23:59:59')
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user