拆表及行业,技能添加 by kevin.cui
This commit is contained in:
69
source/xzs/src/main/resources/mapper/IndustryMapper.xml
Normal file
69
source/xzs/src/main/resources/mapper/IndustryMapper.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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.mindskip.xzs.repository.IndustryMapper">
|
||||
<resultMap id="BaseResultMap" type="com.mindskip.xzs.domain.Industry">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_industry
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from t_industry
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Industry" useGeneratedKeys="true">
|
||||
insert into t_industry (`name`)
|
||||
values (#{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Industry" useGeneratedKeys="true">
|
||||
insert into t_industry
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.mindskip.xzs.domain.Industry">
|
||||
update t_industry
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.mindskip.xzs.domain.Industry">
|
||||
update t_industry
|
||||
set `name` = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="page" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_industry
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
and id= #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="allIndustry" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_industry
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user