xiaoyong931011
2022-07-05 4c25fa8ed2bb8679f33dfadaf49e2724ef182bd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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.xcong.farmer.cms.modules.system.mapper.CmsTemplateMapper">
 
    <select id="selectInPage" resultType="com.xcong.farmer.cms.modules.system.entity.CmsTemplateEntity">
        select * from cms_template
        <where>
            1=1
            <if test="record.companyId != null and record.companyId != 0">
                and company_id=#{record.companyId}
            </if>
        </where>
    </select>
 
    <delete id="delete">
        delete from cms_template
        where id=#{id}
          <if test="companyId != null and companyId != 0">
              and company_id=#{companyId}
          </if>
    </delete>
</mapper>