<?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>
|
|
<select id="selectByIdAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.CmsTemplateEntity">
|
select * from cms_template
|
where id = #{id}
|
<if test="companyId != null and companyId != 0">
|
and company_id = #{companyId}
|
</if>
|
</select>
|
</mapper>
|