前端传字符串 后端比较date类型字段

复制代码
@Select({
            "<script>",
            "SELECT",
            "    cj.CJMC AS cjdm_name,",
            "    zyc.ZYCMC AS zycdm_name,",
            "    a.czcx AS cz_name,",
            "    a.gjzc,",
            "    xc.S_MC AS xc_name,",
            "    a.jtyq,",
            "    a.FBSJ,",
            "    ry.XM AS fbr_name,",
            "    CASE a.zt",
            "        WHEN '01' THEN '已保存'",
            "        WHEN '21' THEN '已发布'",
            "        WHEN '31' THEN '作废'",
            "        ELSE a.zt",
            "    END AS zt_name",
            "FROM SCZZ.GL_CLKX_KCYQ_CLMX a",
            "LEFT JOIN hmiszd.d_dm_ty xc ON a.xc = xc.S_DM AND xc.S_FLDM = '02'",
//            "LEFT JOIN Hmiszd.d_dm_cz cz ON a.cz = cz.S_CZDM",
            "LEFT JOIN common.zd_cj cj ON a.cjdm = cj.CJDM AND cj.CJLX = 'yy' AND cj.CJDM NOT LIKE '%25'",
            "LEFT JOIN common.zd_zyc zyc ON a.zycdm = zyc.ZYCDM",
            "LEFT JOIN COMMON.RY_RYDA ry ON a.fbr = ry.GZH",
            " where 1=1 ",

            "    <if test='zbid != null and zbid != \"\"'>",
            "        AND a.zbid = #{zbid}",
            "    </if>",
            "    <if test='xc != null and xc != \"\"'>",
            "        AND a.xc = #{xc}",
            "    </if>",
            "    <if test='cz != null and cz != \"\"'>",
            "        AND a.cz = #{cz}",
            "    </if>",
            "    <if test='czcx != null and czcx != \"\"'>",
            "        AND a.czcx = #{czcx}",
            "    </if>",
            "    <if test='gjzc != null and gjzc != \"\"'>",
            "        AND a.gjzc LIKE '%' || #{gjzc} || '%'",
            "    </if>",
            "    <if test='jtyq != null and jtyq != \"\"'>",
            "        AND a.jtyq LIKE '%' || #{jtyq} || '%'",
            "    </if>",
            "    <if test='cjdm != null and cjdm != \"\"'>",
            "        AND a.cjdm = #{cjdm}",
            "    </if>",
            "    <if test='zycdm != null and zycdm != \"\"'>",
            "        AND a.zycdm = #{zycdm}",
            "    </if>",
            "    <if test='fbsj != null'>",
            "        AND a.fbsj = #{fbsj}",
            "    </if>",
            "    <if test='zt != null and zt != \"\"'>",
            "        AND a.zt = #{zt}",
            "    </if>",
            "    <if test='fbr != null and fbr != \"\"'>",
            "        AND a.fbr = #{fbr}",
            "    </if>",
//            "    <if test='startTime != null and startTime != \"\"  and endTime != null and endTime != \"\"'>",
//            "        AND a.fbsj between to_date(#{startTime}, 'yyyy-MM-dd HH24:MI:SS')   and  to_date(#{endTime}, 'yyyy-MM-dd HH24:MI:SS') ",
//            "    </if>",

            "    <if test='startTime != null and startTime != \"\"  and endTime != null and endTime != \"\"'>",
            "        AND to_char(a.fbsj,'yyyy-MM-dd HH24:MI:SS') between #{startTime} and #{endTime} ",
            "    </if>",

            "</script>"
    })
    List<KczdWithDict> listWithDict(Kczd kczd);
相关推荐
原则猫9 分钟前
前端基础大厦
前端
陈随易1 小时前
编程语言级别的Skill市场,AI Agent 的未来形态
前端·后端·程序员
SoaringHeart2 小时前
Flutter进阶:基于 EasyRefresh 的下拉刷新封装 n_easy_refresh_mixin.dart
前端·flutter
IT_陈寒4 小时前
Vite的热更新突然不香了,排查三小时差点砸键盘
前端·人工智能·后端
子兮曰4 小时前
Agency-Agents 深度解析:400+ AI 专家的"梦之队"如何重塑开发工作流
前端·后端·vibecoding
竹林8185 小时前
用 The Graph 查询链上数据实战:从手搓 RPC 到 Subgraph,我的 NFT 项目数据加载快了 10 倍
前端·javascript
妙码生花5 小时前
从 PHP 到 AI + Golang,程序员自救转型手记(十九):点选验证码代码逐行目检
前端·后端·go
Awu12276 小时前
⚡从零开发 Agent CLI(五)实现一个可治理、可扩展的工具系统
前端·人工智能·claude
咪库咪库咪7 小时前
Vue3-生命周期
前端
莪_幻尘7 小时前
你的 AI Skill 越多越蠢?Token 上下文爆炸的求生指南
前端·ai编程