111 lines
4.2 KiB
XML
111 lines
4.2 KiB
XML
<?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.ailanyin.mapper.HxBusinessResponsibilityMapper">
|
|
<resultMap id="BaseResultMap" type="com.ailanyin.model.HxBusinessResponsibility">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="month" jdbcType="VARCHAR" property="month" />
|
|
<result column="indicator_name" jdbcType="VARCHAR" property="indicatorName" />
|
|
<result column="completed_tasks" jdbcType="VARCHAR" property="completedTasks" />
|
|
<result column="target_tasks" jdbcType="VARCHAR" property="targetTasks" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
"id", "month", "indicator_name", "completed_tasks", "target_tasks"
|
|
</sql>
|
|
<select id="selectHxBusinessResponsibilityList" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from ROOT."hx_business_responsibility"
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Sun Dec 12 07:40:53 UTC 2021.
|
|
-->
|
|
delete from hx_business_responsibility
|
|
where `id` = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ailanyin.model.HxBusinessResponsibility">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Sun Dec 12 07:40:53 UTC 2021.
|
|
-->
|
|
insert into hx_business_responsibility (`id`, `month`, `indicator_name`,
|
|
`completed_tasks`, `target_tasks`)
|
|
values (#{id,jdbcType=BIGINT}, #{month,jdbcType=VARCHAR}, #{indicatorName,jdbcType=VARCHAR},
|
|
#{completedTasks,jdbcType=VARCHAR}, #{targetTasks,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ailanyin.model.HxBusinessResponsibility">
|
|
insert into ROOT."hx_business_responsibility"
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
"id",
|
|
</if>
|
|
<if test="month != null">
|
|
"month",
|
|
</if>
|
|
<if test="indicatorName != null">
|
|
"indicator_name",
|
|
</if>
|
|
<if test="completedTasks != null">
|
|
"completed_tasks",
|
|
</if>
|
|
<if test="targetTasks != null">
|
|
"target_tasks",
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="month != null">
|
|
#{month,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="indicatorName != null">
|
|
#{indicatorName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="completedTasks != null">
|
|
#{completedTasks,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="targetTasks != null">
|
|
#{targetTasks,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateSelective" parameterType="com.ailanyin.model.HxBusinessResponsibility">
|
|
update ROOT."hx_business_responsibility"
|
|
<set>
|
|
<if test="completedTasks != null">
|
|
"completed_tasks" = #{completedTasks,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="targetTasks != null">
|
|
"target_tasks" = #{targetTasks,jdbcType=VARCHAR}
|
|
</if>
|
|
</set>
|
|
where "month" = #{month,jdbcType=VARCHAR} and
|
|
"indicator_name" = #{indicatorName,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ailanyin.model.HxBusinessResponsibility">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Sun Dec 12 07:40:53 UTC 2021.
|
|
-->
|
|
update hx_business_responsibility
|
|
set `month` = #{month,jdbcType=VARCHAR},
|
|
`indicator_name` = #{indicatorName,jdbcType=VARCHAR},
|
|
`completed_tasks` = #{completedTasks,jdbcType=VARCHAR},
|
|
`target_tasks` = #{targetTasks,jdbcType=VARCHAR}
|
|
where `id` = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
|
|
<select id="checkIsExist" resultType="int">
|
|
select
|
|
count("id")
|
|
from ROOT."hx_business_responsibility"
|
|
where "month" = #{month,jdbcType=VARCHAR} and
|
|
"indicator_name" = #{indicatorName,jdbcType=VARCHAR}
|
|
</select>
|
|
</mapper>
|