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>
|
||||||
@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
@ -58,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
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>
|
||||||
@ -75,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</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>
|
||||||
@ -95,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user