Blame view

MatchDictMapper.xml 805 Bytes
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?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.subsidy.mapper.MatchDictMapper">

    <select id="matches" parameterType="string" resultType="com.subsidy.model.MatchDictDO">
        SELECT
            *
        FROM
            match_dict t
        WHERE
            t.delete_date IS NULL
            <if test="matchName != null and matchName != ''">
                AND t.match_name LIKE concat('%',#{matchName} ,'%')
            </if>
    </select>

    <update id="closeMatch">
        update match_dict t set t.status = '0'
    </update>

    <update id="openMatch" parameterType="long">
        update match_dict t set t.status = '1' where t.id = #{id}
    </update>

</mapper>