Helius
2020-12-27 c0691d2302bbaed2a47b2b703b83ed5bc204e397
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -25,6 +25,7 @@
        <result property="projName" column="proj_name"/>
        <result property="deductionNum" column="deductionNum"/>
        <result property="isCourse" column="is_course"/>
        <result property="timeLength" column="time_length"/>
@@ -179,6 +180,9 @@
            <if test="deductionNum != null ">
                deductionNum = #{deductionNum},
            </if>
            <if test="failTime != null ">
                fail_time = #{failTime},
            </if>
        </set>
        WHERE ID = #{id}
@@ -224,13 +228,17 @@
    <select id="selectInPage" resultMap="SysProjUseMap">
        select
        a.*,
        b.TIME_LENGTH
        b.TIME_LENGTH,
        b.img
        from sys_proj_use a
        left join shopping_goods b on a.proj_id=b.id
        where 1=1
        <if test="record!=null">
            <if test="record.id != null and record.id !='' ">
                and a.ID = #{record.id}
            </if>
            <if test="record.queryKey != null and record.queryKey !='' ">
                and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey}))
            </if>
            <if test="record.orderItemId != null and record.orderItemId !='' ">
                and a.ORDER_ITEM_ID = #{record.orderItemId}
@@ -419,8 +427,11 @@
    <!-- 根据对象查询 -->
    <select id="selectByModel" resultMap="SysProjUseMap">
        select
        a.*
        a.*,
        b.time_length,
        b.img
        from sys_proj_use a
        left join shopping_goods b on a.proj_id=b.id
        where 1=1
        <if test="record!=null">
            <if test="record.id != null and record.id !='' ">
@@ -719,4 +730,9 @@
        group by b.id) t
    </select>
    <select id="selectHasValidProjUse" resultMap="SysProjUseMap">
        select * from sys_proj_use
        where date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') and STATUS='有效'
    </select>
</mapper>