md
This commit is contained in:
parent
204a1d70d9
commit
f97b829e7b
@ -34,6 +34,8 @@ public class EmisBrand extends BaseEntity
|
|||||||
|
|
||||||
/* id */
|
/* id */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
/* 品牌编码 */
|
||||||
|
private String code;
|
||||||
/* 名称 */
|
/* 名称 */
|
||||||
private String name;
|
private String name;
|
||||||
/* 英文名称 */
|
/* 英文名称 */
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisBrandMapper">
|
<mapper namespace="com.xdadan.erp.emis.mapper.EmisBrandMapper">
|
||||||
|
|
||||||
<resultMap type="EmisBrand" id="EmisBrandResult">
|
<resultMap type="EmisBrand" id="EmisBrandResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="code" column="code" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="nameEn" column="name_en" />
|
<result property="nameEn" column="name_en" />
|
||||||
<result property="logo" column="logo" />
|
<result property="logo" column="logo" />
|
||||||
@ -23,13 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmisBrandVo">
|
<sql id="selectEmisBrandVo">
|
||||||
select id, name, name_en, logo, url, sort_order, status, brand_img, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from emis_brand
|
select id, code, name, name_en, logo, url, sort_order, status, brand_img, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from emis_brand
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEmisBrandList" parameterType="EmisBrand" resultMap="EmisBrandResult">
|
<select id="selectEmisBrandList" parameterType="EmisBrand" resultMap="EmisBrandResult">
|
||||||
<include refid="selectEmisBrandVo"/>
|
<include refid="selectEmisBrandVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null "> and id = #{id}</if>
|
<if test="id != null "> and id = #{id}</if>
|
||||||
|
<if test="code != null and code != ''"> and code=#{code}</if>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="nameEn != null and nameEn != ''"> and name_en like concat('%', #{nameEn}, '%')</if>
|
<if test="nameEn != null and nameEn != ''"> and name_en like concat('%', #{nameEn}, '%')</if>
|
||||||
<if test="logo != null and logo != ''"> and logo like concat('%', #{logo}, '%')</if>
|
<if test="logo != null and logo != ''"> and logo like concat('%', #{logo}, '%')</if>
|
||||||
@ -47,17 +49,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEmisBrandById" parameterType="Long" resultMap="EmisBrandResult">
|
<select id="selectEmisBrandById" parameterType="Long" resultMap="EmisBrandResult">
|
||||||
select id, name, name_en, logo, url, sort_order, status, brand_img, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time
|
select id, code, name, name_en, logo, url, sort_order, status, brand_img, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time
|
||||||
from emis_brand a
|
from emis_brand a
|
||||||
where a.id = #{id}
|
where a.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertEmisBrand" parameterType="EmisBrand">
|
<insert id="insertEmisBrand" parameterType="EmisBrand">
|
||||||
insert into emis_brand
|
insert into emis_brand
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
|
<if test="code != null and code != ''">code,</if>
|
||||||
<if test="name != null and name != ''">name,</if>
|
<if test="name != null and name != ''">name,</if>
|
||||||
<if test="nameEn != null and nameEn != ''">name_en,</if>
|
<if test="nameEn != null and nameEn != ''">name_en,</if>
|
||||||
<if test="logo != null and logo != ''">logo,</if>
|
<if test="logo != null and logo != ''">logo,</if>
|
||||||
@ -72,9 +75,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="code != null and code != ''">#{code},</if>
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
<if test="nameEn != null and nameEn != ''">#{nameEn},</if>
|
<if test="nameEn != null and nameEn != ''">#{nameEn},</if>
|
||||||
<if test="logo != null and logo != ''">#{logo},</if>
|
<if test="logo != null and logo != ''">#{logo},</if>
|
||||||
@ -89,12 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateEmisBrand" parameterType="EmisBrand">
|
<update id="updateEmisBrand" parameterType="EmisBrand">
|
||||||
update emis_brand
|
update emis_brand
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="code != null and code != ''">code = #{code},</if>
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
||||||
<if test="logo != null and logo != ''">logo = #{logo},</if>
|
<if test="logo != null and logo != ''">logo = #{logo},</if>
|
||||||
@ -118,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteEmisBrandByIds" parameterType="String">
|
<delete id="deleteEmisBrandByIds" parameterType="String">
|
||||||
delete from emis_brand where id in
|
delete from emis_brand where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user