Browse Source

查询海运价格逻辑

dongyongwei 4 years ago
parent
commit
8429fe19c9

+ 100 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/quotation/TSeapriceQueryLogController.java

@@ -0,0 +1,100 @@
+package com.ruoyi.web.controller.warehouse.quotation;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.quotation.domain.TSeapriceQueryLog;
+import com.ruoyi.quotation.service.ITSeapriceQueryLogService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 海运价格查询日志记录Controller
+ * 
+ * @author frank
+ * @date 2021-07-16
+ */
+@RestController
+@RequestMapping("/quotation/queryseapricelog")
+public class TSeapriceQueryLogController extends BaseController
+{
+    @Autowired
+    private ITSeapriceQueryLogService tSeapriceQueryLogService;
+
+    /**
+     * 查询海运价格查询日志记录列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        tSeapriceQueryLog.setfUserId(SecurityUtils.getLoginUser().getUser().getUserId());
+        startPage();
+        List<TSeapriceQueryLog> list = tSeapriceQueryLogService.selectTSeapriceQueryLogList(tSeapriceQueryLog);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出海运价格查询日志记录列表
+     */
+    @Log(title = "海运价格查询日志记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        List<TSeapriceQueryLog> list = tSeapriceQueryLogService.selectTSeapriceQueryLogList(tSeapriceQueryLog);
+        ExcelUtil<TSeapriceQueryLog> util = new ExcelUtil<TSeapriceQueryLog>(TSeapriceQueryLog.class);
+        return util.exportExcel(list, "queryseapricelog");
+    }
+
+    /**
+     * 获取海运价格查询日志记录详细信息
+     */
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId)
+    {
+        return AjaxResult.success(tSeapriceQueryLogService.selectTSeapriceQueryLogById(fId));
+    }
+
+    /**
+     * 新增海运价格查询日志记录
+     */
+    @Log(title = "海运价格查询日志记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        return toAjax(tSeapriceQueryLogService.insertTSeapriceQueryLog(tSeapriceQueryLog));
+    }
+
+    /**
+     * 修改海运价格查询日志记录
+     */
+    @Log(title = "海运价格查询日志记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        return toAjax(tSeapriceQueryLogService.updateTSeapriceQueryLog(tSeapriceQueryLog));
+    }
+
+    /**
+     * 删除海运价格查询日志记录
+     */
+    @Log(title = "海运价格查询日志记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds)
+    {
+        return toAjax(tSeapriceQueryLogService.deleteTSeapriceQueryLogByIds(fIds));
+    }
+}

+ 5 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java

@@ -1,5 +1,6 @@
 package com.ruoyi.framework.config;
 
+import com.ruoyi.framework.interceptor.TSeapriceQueryLogInterceptor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -24,6 +25,9 @@ public class ResourcesConfig implements WebMvcConfigurer
     @Autowired
     private RepeatSubmitInterceptor repeatSubmitInterceptor;
 
+    @Autowired
+    private TSeapriceQueryLogInterceptor tSeapriceQueryLogInterceptor;
+
     @Override
     public void addResourceHandlers(ResourceHandlerRegistry registry)
     {
@@ -42,6 +46,7 @@ public class ResourcesConfig implements WebMvcConfigurer
     public void addInterceptors(InterceptorRegistry registry)
     {
         registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**");
+        registry.addInterceptor(tSeapriceQueryLogInterceptor).addPathPatterns("/**");
     }
 
     /**

+ 51 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/TSeapriceQueryLogInterceptor.java

@@ -0,0 +1,51 @@
+package com.ruoyi.framework.interceptor;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.map.MapUtil;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.quotation.domain.TSeapriceQueryLog;
+import com.ruoyi.quotation.service.ITSeapriceQueryLogService;
+import com.ruoyi.system.service.ISysOperLogService;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+
+@Component
+public class TSeapriceQueryLogInterceptor implements HandlerInterceptor {
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
+            throws Exception {
+        //返回 false 则请求中断
+        return true;
+    }
+
+    @Override
+    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
+                           ModelAndView modelAndView) throws Exception {
+    }
+
+    @Override
+    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
+            throws Exception {
+        String uri = request.getRequestURI();
+        if("/warehouse/seaprice/query".equals(uri)){
+            if("app".equals(request.getParameter("queryFrom"))){
+                TSeapriceQueryLog tSeapriceQueryLog = new TSeapriceQueryLog();
+                tSeapriceQueryLog.setfPortDestinationId(Long.valueOf(request.getParameter("fPortDestinationId")));
+                tSeapriceQueryLog.setfPortOriginId(Long.valueOf(request.getParameter("fPortOriginId")));
+                tSeapriceQueryLog.setfPortTransitId(Long.valueOf(request.getParameter("fPortTransitId")));
+                tSeapriceQueryLog.setfValiddateBegin(DateUtil.parse(request.getParameter("fValiddateBegin"),"yyyy-MM-dd HH:mm:ss"));
+                tSeapriceQueryLog.setfValiddateEnd(DateUtil.parse(request.getParameter("fValiddateEnd"),"yyyy-MM-dd HH:mm:ss"));
+                tSeapriceQueryLog.setfUserId(SecurityUtils.getLoginUser().getUser().getUserId());
+                tSeapriceQueryLog.setfQueryDatetime(new Date());
+                SpringUtils.getBean(ITSeapriceQueryLogService.class).insertTSeapriceQueryLog(tSeapriceQueryLog);
+            }
+        }
+    }
+}

+ 187 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/domain/TSeapriceQueryLog.java

@@ -0,0 +1,187 @@
+package com.ruoyi.quotation.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 海运价格查询日志记录对象 t_seaprice_query_log
+ * 
+ * @author frank
+ * @date 2021-07-16
+ */
+public class TSeapriceQueryLog extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    private Long fId;
+
+    /** 起始港ID */
+    @Excel(name = "起始港ID")
+    private Long fPortOriginId;
+
+    /** 目的港ID */
+    @Excel(name = "目的港ID")
+    private Long fPortDestinationId;
+
+    /** 中转港ID */
+    @Excel(name = "中转港ID")
+    private Long fPortTransitId;
+
+    /** 起始港名称 */
+    private String fPortOriginName;
+
+    /** 目的港名称 */
+    private String fPortDestinationName;
+
+    /** 中转港名称 */
+    private String fPortTransitName;
+
+    public String getfPortOriginName() {
+        return fPortOriginName;
+    }
+
+    public void setfPortOriginName(String fPortOriginName) {
+        this.fPortOriginName = fPortOriginName;
+    }
+
+    public String getfPortDestinationName() {
+        return fPortDestinationName;
+    }
+
+    public void setfPortDestinationName(String fPortDestinationName) {
+        this.fPortDestinationName = fPortDestinationName;
+    }
+
+    public String getfPortTransitName() {
+        return fPortTransitName;
+    }
+
+    public void setfPortTransitName(String fPortTransitName) {
+        this.fPortTransitName = fPortTransitName;
+    }
+
+    /** 查询价格开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "查询价格开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date fValiddateBegin;
+
+    /** 查询价格结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "查询价格结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date fValiddateEnd;
+
+    /** 查询用户ID */
+    @Excel(name = "查询用户ID")
+    private Long fUserId;
+
+    /** 查询时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "查询时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date fQueryDatetime;
+
+    /** 是否删除(1删除,0未删除) */
+    @Excel(name = "是否删除(1删除,0未删除)")
+    private String fDelFlag;
+
+    public void setfId(Long fId) 
+    {
+        this.fId = fId;
+    }
+
+    public Long getfId() 
+    {
+        return fId;
+    }
+    public void setfPortOriginId(Long fPortOriginId) 
+    {
+        this.fPortOriginId = fPortOriginId;
+    }
+
+    public Long getfPortOriginId() 
+    {
+        return fPortOriginId;
+    }
+    public void setfPortDestinationId(Long fPortDestinationId) 
+    {
+        this.fPortDestinationId = fPortDestinationId;
+    }
+
+    public Long getfPortDestinationId() 
+    {
+        return fPortDestinationId;
+    }
+    public void setfPortTransitId(Long fPortTransitId) 
+    {
+        this.fPortTransitId = fPortTransitId;
+    }
+
+    public Long getfPortTransitId() 
+    {
+        return fPortTransitId;
+    }
+    public void setfValiddateBegin(Date fValiddateBegin) 
+    {
+        this.fValiddateBegin = fValiddateBegin;
+    }
+
+    public Date getfValiddateBegin() 
+    {
+        return fValiddateBegin;
+    }
+    public void setfValiddateEnd(Date fValiddateEnd) 
+    {
+        this.fValiddateEnd = fValiddateEnd;
+    }
+
+    public Date getfValiddateEnd() 
+    {
+        return fValiddateEnd;
+    }
+    public void setfUserId(Long fUserId) 
+    {
+        this.fUserId = fUserId;
+    }
+
+    public Long getfUserId() 
+    {
+        return fUserId;
+    }
+    public void setfQueryDatetime(Date fQueryDatetime) 
+    {
+        this.fQueryDatetime = fQueryDatetime;
+    }
+
+    public Date getfQueryDatetime() 
+    {
+        return fQueryDatetime;
+    }
+    public void setfDelFlag(String fDelFlag) 
+    {
+        this.fDelFlag = fDelFlag;
+    }
+
+    public String getfDelFlag() 
+    {
+        return fDelFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("fId", getfId())
+            .append("fPortOriginId", getfPortOriginId())
+            .append("fPortDestinationId", getfPortDestinationId())
+            .append("fPortTransitId", getfPortTransitId())
+            .append("fValiddateBegin", getfValiddateBegin())
+            .append("fValiddateEnd", getfValiddateEnd())
+            .append("fUserId", getfUserId())
+            .append("fQueryDatetime", getfQueryDatetime())
+            .append("fDelFlag", getfDelFlag())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/mapper/TSeapriceQueryLogMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.quotation.mapper;
+
+import com.ruoyi.quotation.domain.TSeapriceQueryLog;
+
+import java.util.List;
+
+/**
+ * 海运价格查询日志记录Mapper接口
+ * 
+ * @author frank
+ * @date 2021-07-16
+ */
+public interface TSeapriceQueryLogMapper 
+{
+    /**
+     * 查询海运价格查询日志记录
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 海运价格查询日志记录
+     */
+    public TSeapriceQueryLog selectTSeapriceQueryLogById(Long fId);
+
+    /**
+     * 查询海运价格查询日志记录列表
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 海运价格查询日志记录集合
+     */
+    public List<TSeapriceQueryLog> selectTSeapriceQueryLogList(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 新增海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    public int insertTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 修改海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    public int updateTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 删除海运价格查询日志记录
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 结果
+     */
+    public int deleteTSeapriceQueryLogById(Long fId);
+
+    /**
+     * 批量删除海运价格查询日志记录
+     * 
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTSeapriceQueryLogByIds(Long[] fIds);
+}

+ 62 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/ITSeapriceQueryLogService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.quotation.service;
+
+import com.ruoyi.quotation.domain.TSeapriceQueryLog;
+
+import java.util.List;
+
+/**
+ * 海运价格查询日志记录Service接口
+ * 
+ * @author frank
+ * @date 2021-07-16
+ */
+public interface ITSeapriceQueryLogService 
+{
+    /**
+     * 查询海运价格查询日志记录
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 海运价格查询日志记录
+     */
+    public TSeapriceQueryLog selectTSeapriceQueryLogById(Long fId);
+
+    /**
+     * 查询海运价格查询日志记录列表
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 海运价格查询日志记录集合
+     */
+    public List<TSeapriceQueryLog> selectTSeapriceQueryLogList(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 新增海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    public int insertTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 修改海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    public int updateTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog);
+
+    /**
+     * 批量删除海运价格查询日志记录
+     * 
+     * @param fIds 需要删除的海运价格查询日志记录ID
+     * @return 结果
+     */
+    public int deleteTSeapriceQueryLogByIds(Long[] fIds);
+
+    /**
+     * 删除海运价格查询日志记录信息
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 结果
+     */
+    public int deleteTSeapriceQueryLogById(Long fId);
+}

+ 95 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/quotation/service/impl/TSeapriceQueryLogServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.quotation.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.quotation.domain.TSeapriceQueryLog;
+import com.ruoyi.quotation.mapper.TSeapriceQueryLogMapper;
+import com.ruoyi.quotation.service.ITSeapriceQueryLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 海运价格查询日志记录Service业务层处理
+ * 
+ * @author frank
+ * @date 2021-07-16
+ */
+@Service
+public class TSeapriceQueryLogServiceImpl implements ITSeapriceQueryLogService
+{
+    @Autowired
+    private TSeapriceQueryLogMapper tSeapriceQueryLogMapper;
+
+    /**
+     * 查询海运价格查询日志记录
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 海运价格查询日志记录
+     */
+    @Override
+    public TSeapriceQueryLog selectTSeapriceQueryLogById(Long fId)
+    {
+        return tSeapriceQueryLogMapper.selectTSeapriceQueryLogById(fId);
+    }
+
+    /**
+     * 查询海运价格查询日志记录列表
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 海运价格查询日志记录
+     */
+    @Override
+    public List<TSeapriceQueryLog> selectTSeapriceQueryLogList(TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        return tSeapriceQueryLogMapper.selectTSeapriceQueryLogList(tSeapriceQueryLog);
+    }
+
+    /**
+     * 新增海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    @Override
+    public int insertTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        return tSeapriceQueryLogMapper.insertTSeapriceQueryLog(tSeapriceQueryLog);
+    }
+
+    /**
+     * 修改海运价格查询日志记录
+     * 
+     * @param tSeapriceQueryLog 海运价格查询日志记录
+     * @return 结果
+     */
+    @Override
+    public int updateTSeapriceQueryLog(TSeapriceQueryLog tSeapriceQueryLog)
+    {
+        return tSeapriceQueryLogMapper.updateTSeapriceQueryLog(tSeapriceQueryLog);
+    }
+
+    /**
+     * 批量删除海运价格查询日志记录
+     * 
+     * @param fIds 需要删除的海运价格查询日志记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSeapriceQueryLogByIds(Long[] fIds)
+    {
+        return tSeapriceQueryLogMapper.deleteTSeapriceQueryLogByIds(fIds);
+    }
+
+    /**
+     * 删除海运价格查询日志记录信息
+     * 
+     * @param fId 海运价格查询日志记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTSeapriceQueryLogById(Long fId)
+    {
+        return tSeapriceQueryLogMapper.deleteTSeapriceQueryLogById(fId);
+    }
+}

+ 115 - 0
ruoyi-warehouse/src/main/resources/mapper/quotation/TSeapriceQueryLogMapper.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.quotation.mapper.TSeapriceQueryLogMapper">
+
+    <resultMap type="TSeapriceQueryLog" id="TSeapriceQueryLogResult">
+        <result property="fId" column="f_id"/>
+        <result property="fPortOriginId" column="f_port_origin_id"/>
+        <result property="fPortDestinationId" column="f_port_destination_id"/>
+        <result property="fPortTransitId" column="f_port_transit_id"/>
+        <result property="fPortOriginName" column="f_port_origin_name"/>
+        <result property="fPortDestinationName" column="f_port_destination_name"/>
+        <result property="fPortTransitName" column="f_port_transit_name"/>
+        <result property="fValiddateBegin" column="f_validdate_begin"/>
+        <result property="fValiddateEnd" column="f_validdate_end"/>
+        <result property="fUserId" column="f_user_id"/>
+        <result property="fQueryDatetime" column="f_query_datetime"/>
+        <result property="fDelFlag" column="f_del_flag"/>
+    </resultMap>
+
+    <sql id="selectTSeapriceQueryLogVo">
+        select s.f_id,
+               s.f_port_origin_id,
+               s.f_port_destination_id,
+               s.f_port_transit_id,
+               de.f_name  as f_port_destination_name,
+               ori.f_name as f_port_origin_name,
+               tr.f_name  as f_port_transit_name,
+               s.f_validdate_begin,
+               s.f_validdate_end,
+               s.f_user_id,
+               s.f_query_datetime,
+               s.f_del_flag
+        from t_seaprice_query_log s
+                 left join t_address de on de.f_id = s.f_port_destination_id
+                 left join t_address ori on ori.f_id = s.f_port_origin_id
+                 left join t_address tr on tr.f_id = s.f_port_transit_id
+    </sql>
+
+    <select id="selectTSeapriceQueryLogList" parameterType="TSeapriceQueryLog" resultMap="TSeapriceQueryLogResult">
+        <include refid="selectTSeapriceQueryLogVo"/>
+        <where>
+            <if test="fPortOriginId != null ">and s.f_port_origin_id = #{fPortOriginId}</if>
+            <if test="fPortDestinationId != null ">and s.f_port_destination_id = #{fPortDestinationId}</if>
+            <if test="fPortTransitId != null ">and s.f_port_transit_id = #{fPortTransitId}</if>
+            <if test="fValiddateBegin != null ">and s.f_validdate_begin = #{fValiddateBegin}</if>
+            <if test="fValiddateEnd != null ">and s.f_validdate_end = #{fValiddateEnd}</if>
+            <if test="fUserId != null ">and s.f_user_id = #{fUserId}</if>
+            <if test="fQueryDatetime != null ">and s.f_query_datetime = #{fQueryDatetime}</if>
+            <if test="fDelFlag != null  and fDelFlag != ''">and s.f_del_flag = #{fDelFlag}</if>
+        </where>
+            order by s.f_id desc
+    </select>
+
+    <select id="selectTSeapriceQueryLogById" parameterType="Long" resultMap="TSeapriceQueryLogResult">
+        <include refid="selectTSeapriceQueryLogVo"/>
+        where s.f_id = #{fId}
+    </select>
+
+    <insert id="insertTSeapriceQueryLog" parameterType="TSeapriceQueryLog">
+        insert into t_seaprice_query_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fId != null">f_id,</if>
+            <if test="fPortOriginId != null">f_port_origin_id,</if>
+            <if test="fPortDestinationId != null">f_port_destination_id,</if>
+            <if test="fPortTransitId != null">f_port_transit_id,</if>
+            <if test="fValiddateBegin != null">f_validdate_begin,</if>
+            <if test="fValiddateEnd != null">f_validdate_end,</if>
+            <if test="fUserId != null">f_user_id,</if>
+            <if test="fQueryDatetime != null">f_query_datetime,</if>
+            <if test="fDelFlag != null">f_del_flag,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fId != null">#{fId},</if>
+            <if test="fPortOriginId != null">#{fPortOriginId},</if>
+            <if test="fPortDestinationId != null">#{fPortDestinationId},</if>
+            <if test="fPortTransitId != null">#{fPortTransitId},</if>
+            <if test="fValiddateBegin != null">#{fValiddateBegin},</if>
+            <if test="fValiddateEnd != null">#{fValiddateEnd},</if>
+            <if test="fUserId != null">#{fUserId},</if>
+            <if test="fQueryDatetime != null">#{fQueryDatetime},</if>
+            <if test="fDelFlag != null">#{fDelFlag},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTSeapriceQueryLog" parameterType="TSeapriceQueryLog">
+        update t_seaprice_query_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fPortOriginId != null">f_port_origin_id = #{fPortOriginId},</if>
+            <if test="fPortDestinationId != null">f_port_destination_id = #{fPortDestinationId},</if>
+            <if test="fPortTransitId != null">f_port_transit_id = #{fPortTransitId},</if>
+            <if test="fValiddateBegin != null">f_validdate_begin = #{fValiddateBegin},</if>
+            <if test="fValiddateEnd != null">f_validdate_end = #{fValiddateEnd},</if>
+            <if test="fUserId != null">f_user_id = #{fUserId},</if>
+            <if test="fQueryDatetime != null">f_query_datetime = #{fQueryDatetime},</if>
+            <if test="fDelFlag != null">f_del_flag = #{fDelFlag},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTSeapriceQueryLogById" parameterType="Long">
+        delete
+        from t_seaprice_query_log
+        where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTSeapriceQueryLogByIds" parameterType="String">
+        delete from t_seaprice_query_log where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+</mapper>