md
This commit is contained in:
parent
204a1d70d9
commit
f97b829e7b
@ -34,6 +34,8 @@ public class EmisBrand extends BaseEntity
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 品牌编码 */
|
||||
private String code;
|
||||
/* 名称 */
|
||||
private String name;
|
||||
/* 英文名称 */
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisBrandMapper">
|
||||
|
||||
|
||||
<resultMap type="EmisBrand" id="EmisBrandResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="nameEn" column="name_en" />
|
||||
<result property="logo" column="logo" />
|
||||
@ -23,13 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectEmisBrandList" parameterType="EmisBrand" resultMap="EmisBrandResult">
|
||||
<include refid="selectEmisBrandVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<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="nameEn != null and nameEn != ''"> and name_en like concat('%', #{nameEn}, '%')</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>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<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
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEmisBrand" parameterType="EmisBrand">
|
||||
insert into emis_brand
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="nameEn != null and nameEn != ''">name_en,</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="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="nameEn != null and nameEn != ''">#{nameEn},</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="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisBrand" parameterType="EmisBrand">
|
||||
update emis_brand
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
||||
<if test="logo != null and logo != ''">logo = #{logo},</if>
|
||||
@ -118,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<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=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user