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

fixed mybatis xml config issue

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