Commit 0325154e authored by frank.xa.zhang's avatar frank.xa.zhang

fixed mybatis xml config issue

parent 811c3879
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="ID" jdbcType="VARCHAR" property="ID" /> <id column="ID" jdbcType="VARCHAR" property="ID"/>
<result column="Name" jdbcType="VARCHAR" property="name" /> <result column="Name" jdbcType="VARCHAR" property="name"/>
<result column="ServiceTypeID" jdbcType="VARCHAR" property="serviceTypeID" /> <result column="ServiceTypeID" jdbcType="VARCHAR" property="serviceTypeID"/>
<result column="IndustryIDs" jdbcType="VARCHAR" property="industryIDs" /> <result column="IndustryIDs" jdbcType="VARCHAR" property="industryIDs"/>
<result column="PayTaxType" jdbcType="INTEGER" property="payTaxType" /> <result column="PayTaxType" jdbcType="INTEGER" property="payTaxType"/>
<result column="GroupType" jdbcType="INTEGER" property="groupType" /> <result column="GroupType" jdbcType="INTEGER" property="groupType"/>
<result column="CopyFrom" jdbcType="VARCHAR" property="copyFrom" /> <result column="CopyFrom" jdbcType="VARCHAR" property="copyFrom"/>
<result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" /> <result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" /> <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="IsSystemType" jdbcType="INTEGER" property="isSystemType" /> <result column="IsSystemType" jdbcType="INTEGER" property="isSystemType"/>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
...@@ -72,7 +73,8 @@ ...@@ -72,7 +73,8 @@
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
...@@ -91,7 +93,8 @@ ...@@ -91,7 +93,8 @@
ID, Name, ServiceTypeID, IndustryIDs, PayTaxType, GroupType, CopyFrom, UpdateTime, ID, Name, ServiceTypeID, IndustryIDs, PayTaxType, GroupType, CopyFrom, UpdateTime,
CreateTime, IsSystemType CreateTime, IsSystemType
</sql> </sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample"
resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -100,10 +103,10 @@ ...@@ -100,10 +103,10 @@
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from TemplateGroup from TemplateGroup
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
...@@ -115,7 +118,7 @@ ...@@ -115,7 +118,7 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from TemplateGroup from TemplateGroup
where ID = #{ID,jdbcType=VARCHAR} where ID = #{ID,jdbcType=VARCHAR}
</select> </select>
...@@ -134,7 +137,7 @@ ...@@ -134,7 +137,7 @@
--> -->
delete from TemplateGroup delete from TemplateGroup
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="pwc.taxtech.atms.entitiy.TemplateGroup"> <insert id="insert" parameterType="pwc.taxtech.atms.entitiy.TemplateGroup">
...@@ -222,14 +225,15 @@ ...@@ -222,14 +225,15 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample"
resultType="java.lang.Long">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
select count(*) from TemplateGroup select count(*) from TemplateGroup
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
...@@ -271,7 +275,7 @@ ...@@ -271,7 +275,7 @@
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
...@@ -291,7 +295,7 @@ ...@@ -291,7 +295,7 @@
CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
IsSystemType = #{record.isSystemType,jdbcType=INTEGER} IsSystemType = #{record.isSystemType,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entitiy.TemplateGroup"> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entitiy.TemplateGroup">
...@@ -348,7 +352,8 @@ ...@@ -348,7 +352,8 @@
IsSystemType = #{isSystemType,jdbcType=INTEGER} IsSystemType = #{isSystemType,jdbcType=INTEGER}
where ID = #{ID,jdbcType=VARCHAR} where ID = #{ID,jdbcType=VARCHAR}
</update> </update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample" resultMap="BaseResultMap"> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.TemplateGroupExample"
resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -357,10 +362,10 @@ ...@@ -357,10 +362,10 @@
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from TemplateGroup from TemplateGroup
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
......
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="ID" jdbcType="VARCHAR" property="ID" /> <id column="ID" jdbcType="VARCHAR" property="ID"/>
<result column="Name" jdbcType="VARCHAR" property="name" /> <result column="Name" jdbcType="VARCHAR" property="name"/>
<result column="Code" jdbcType="VARCHAR" property="code" /> <result column="Code" jdbcType="VARCHAR" property="code"/>
<result column="Path" jdbcType="VARCHAR" property="path" /> <result column="Path" jdbcType="VARCHAR" property="path"/>
<result column="ReportType" jdbcType="INTEGER" property="reportType" /> <result column="ReportType" jdbcType="INTEGER" property="reportType"/>
<result column="TemplateGroupID" jdbcType="VARCHAR" property="templateGroupID" /> <result column="TemplateGroupID" jdbcType="VARCHAR" property="templateGroupID"/>
<result column="OrderIndex" jdbcType="INTEGER" property="orderIndex" /> <result column="OrderIndex" jdbcType="INTEGER" property="orderIndex"/>
<result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" /> <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" /> <result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="IsSystemType" jdbcType="INTEGER" property="isSystemType" /> <result column="IsSystemType" jdbcType="INTEGER" property="isSystemType"/>
<result column="IsActiveAssociation" jdbcType="INTEGER" property="isActiveAssociation" /> <result column="IsActiveAssociation" jdbcType="INTEGER" property="isActiveAssociation"/>
<result column="ParentId" jdbcType="VARCHAR" property="parentId" /> <result column="ParentId" jdbcType="VARCHAR" property="parentId"/>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
...@@ -102,10 +104,10 @@ ...@@ -102,10 +104,10 @@
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from Template from Template
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
...@@ -117,7 +119,7 @@ ...@@ -117,7 +119,7 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from Template from Template
where ID = #{ID,jdbcType=VARCHAR} where ID = #{ID,jdbcType=VARCHAR}
</select> </select>
...@@ -136,7 +138,7 @@ ...@@ -136,7 +138,7 @@
--> -->
delete from Template delete from Template
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="pwc.taxtech.atms.entitiy.Template"> <insert id="insert" parameterType="pwc.taxtech.atms.entitiy.Template">
...@@ -245,7 +247,7 @@ ...@@ -245,7 +247,7 @@
--> -->
select count(*) from Template select count(*) from Template
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
...@@ -293,7 +295,7 @@ ...@@ -293,7 +295,7 @@
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
...@@ -315,7 +317,7 @@ ...@@ -315,7 +317,7 @@
IsActiveAssociation = #{record.isActiveAssociation,jdbcType=INTEGER}, IsActiveAssociation = #{record.isActiveAssociation,jdbcType=INTEGER},
ParentId = #{record.parentId,jdbcType=VARCHAR} ParentId = #{record.parentId,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause"/>
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entitiy.Template"> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entitiy.Template">
...@@ -380,7 +382,8 @@ ...@@ -380,7 +382,8 @@
ParentId = #{parentId,jdbcType=VARCHAR} ParentId = #{parentId,jdbcType=VARCHAR}
where ID = #{ID,jdbcType=VARCHAR} where ID = #{ID,jdbcType=VARCHAR}
</update> </update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.TemplateExample" resultMap="BaseResultMap"> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.TemplateExample"
resultMap="BaseResultMap">
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
...@@ -389,10 +392,10 @@ ...@@ -389,10 +392,10 @@
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from Template from Template
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause"/>
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
...@@ -400,26 +403,28 @@ ...@@ -400,26 +403,28 @@
</select> </select>
<resultMap id="TemplateUniqDto" type="pwc.taxtech.atms.dto.TemplateUniqDto"> <resultMap id="TemplateUniqDto" type="pwc.taxtech.atms.dto.TemplateUniqDto">
<id column="ID" jdbcType="VARCHAR" property="ID" /> <id column="ID" jdbcType="VARCHAR" property="ID"/>
<result column="Code" jdbcType="VARCHAR" property="Code" /> <result column="Code" jdbcType="VARCHAR" property="Code"/>
<result column="Name" jdbcType="VARCHAR" property="Name" /> <result column="Name" jdbcType="VARCHAR" property="Name"/>
<result column="OrderIndex" jdbcType="INTEGER" property="OrderIndex" /> <result column="OrderIndex" jdbcType="INTEGER" property="OrderIndex"/>
<result column="ReportType" jdbcType="INTEGER" property="ReportType" /> <result column="ReportType" jdbcType="INTEGER" property="ReportType"/>
<result column="TemplateGroupID" jdbcType="VARCHAR" property="TemplateGroupID" /> <result column="TemplateGroupID" jdbcType="VARCHAR" property="TemplateGroupID"/>
<result column="TemplateGroupName" jdbcType="VARCHAR" property="TemplateGroupName" /> <result column="TemplateGroupName" jdbcType="VARCHAR" property="TemplateGroupName"/>
<result column="ParentID" jdbcType="VARCHAR" property="ParentID" /> <result column="ParentID" jdbcType="VARCHAR" property="ParentID"/>
<result column="ParentName" jdbcType="VARCHAR" property="ParentName" /> <result column="ParentName" jdbcType="VARCHAR" property="ParentName"/>
<result column="PayTaxType" jdbcType="INTEGER" property="PayTaxType" /> <result column="PayTaxType" jdbcType="INTEGER" property="PayTaxType"/>
<result column="IndustryIDs" jdbcType="VARCHAR" property="IndustryIDs" /> <result column="IndustryIDs" jdbcType="VARCHAR" property="IndustryIDs"/>
<result column="ServiceTypeID" jdbcType="VARCHAR" property="ServiceTypeID" /> <result column="ServiceTypeID" jdbcType="VARCHAR" property="ServiceTypeID"/>
<result column="IsActiveAssociation" jdbcType="INTEGER" property="IsActiveAssociation" /> <result column="IsActiveAssociation" jdbcType="INTEGER" property="IsActiveAssociation"/>
</resultMap> </resultMap>
<select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto" > <select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto">
SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as TemplateGroupName,p.IsActiveAssociation FROM Template p join TemplateGroup q on p.templategroupID=q.ID SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as TemplateGroupName,p.IsActiveAssociation
<if test="serviceTypeID!=null"> FROM Template p join TemplateGroup q on p.templategroupID=q.ID
<where>
<if test="serviceTypeID!=null">
WHERE q.ServiceTypeID=#{serviceTypeID,jdbcType=VARCHAR} WHERE q.ServiceTypeID=#{serviceTypeID,jdbcType=VARCHAR}
</if> </if>
<if test="payTaxType!=null"> <if test="payTaxType!=null">
AND q.PayTaxType = #{payTaxType,jdbcType=INTEGER} AND q.PayTaxType = #{payTaxType,jdbcType=INTEGER}
</if> </if>
...@@ -429,6 +434,7 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat ...@@ -429,6 +434,7 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat
<if test="industryIDs!=null"> <if test="industryIDs!=null">
AND q.IndustryIDs =#{industryID,jdbcType=VARCHAR} AND q.IndustryIDs =#{industryID,jdbcType=VARCHAR}
</if> </if>
</where>
ORDER BY p.TemplateGroupID, p.OrderIndex ORDER BY p.TemplateGroupID, p.OrderIndex
</select> </select>
<resultMap id="TemplateAndGroupDbDto" type="pwc.taxtech.atms.dto.TemplateAndGroupDbDto"> <resultMap id="TemplateAndGroupDbDto" type="pwc.taxtech.atms.dto.TemplateAndGroupDbDto">
...@@ -441,14 +447,16 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat ...@@ -441,14 +447,16 @@ SELECT p.ID,p.Code,p.Name,p.ReportType,q.ID as TemplateGroupID,q.Name as Templat
</select> </select>
<select id="getCountOfTemplateAndGroupByTemplateName" parameterType="map" resultType="java.lang.Long"> <select id="getCountOfTemplateAndGroupByTemplateName" parameterType="map" resultType="java.lang.Long">
SELECT COUNT(1) FROM Template p join TemplateGroup q on p.TemplateGroupID=q.ID SELECT COUNT(1) FROM Template p join TemplateGroup q on p.TemplateGroupID=q.ID
<where>
<if test="templateGroupID!=null"> <if test="templateGroupID!=null">
WHERE q.ID = #{templateGroupID,jdbcType=VARCHAR} AND q.ID = #{templateGroupID,jdbcType=VARCHAR}
</if> </if>
<if test="templateID!=null"> <if test="templateID!=null">
AND p.ID<>#{templateID,jdbcType=VARCHAR} AND p.ID&lt;&gt;#{templateID,jdbcType=VARCHAR}
</if> </if>
<if test="templateName!=null"> <if test="templateName!=null">
AND p.Name= #{templateName,jdbcType=VARCHAR} AND p.Name= #{templateName,jdbcType=VARCHAR}
</if> </if>
</where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment