Commit c7939ead authored by frank.xa.zhang's avatar frank.xa.zhang

[fixed issue] change the database to new style

parent ef2478a6
......@@ -108,17 +108,17 @@ public interface TaxRuleSettingMapper extends MyMapper {
int updateByPrimaryKey(TaxRuleSetting record);
@Select("select trs.GroupName,trs.ID,trs.IsDefault,trs.Name,trs.TaxBase,trs.TaxRate*100 as TaxRate,trso.OrganizationID"
+ " from TaxRuleSetting trs "
+ "left join TaxRuleSettingOrganization trso on trs.ID=trso.TaxSettingID")
@Select("select trs.group_name,trs.id,trs.is_default,trs.name,trs.tax_base,trs.tax_rate*100 as tax_rate,trso.organization_id"
+ " from tax_rule_setting trs "
+ "left join tax_rule_setting_organization trso on trs.id=trso.tax_setting_id")
@Results({
@Result(id = true, column = "ID", property = "ID"),
@Result(column = "GroupName",property="GroupName"),
@Result(column = "IsDefault",property="IsDefault"),
@Result(column = "Name",property="Name"),
@Result(column = "TaxBase",property="TaxBase"),
@Result(column = "TaxRate",property="TaxRate"),
@Result(column = "OrganizationID",property="OrganizationID"),
@Result(id = true, column = "id", property = "ID"),
@Result(column = "group_name",property="GroupName"),
@Result(column = "is_default",property="IsDefault"),
@Result(column = "name",property="Name"),
@Result(column = "tax_base",property="TaxBase"),
@Result(column = "tax_rate",property="TaxRate"),
@Result(column = "organization_id",property="OrganizationID"),
})
List<TaxRuleSettingDto> GetTaxRuleSetting();
}
\ No newline at end of file
......@@ -6,13 +6,15 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="VARCHAR" property="ID" />
<result column="IsDefault" jdbcType="INTEGER" property="isDefault" />
<result column="TaxPayerType" jdbcType="INTEGER" property="taxPayerType" />
<result column="TemplateGroupID" jdbcType="VARCHAR" property="templateGroupID" />
<result column="OrganizationID" jdbcType="VARCHAR" property="organizationID" />
<result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" />
<id column="id" jdbcType="BIGINT" property="id" />
<result column="is_default" jdbcType="INTEGER" property="isDefault" />
<result column="tax_payer_type" jdbcType="INTEGER" property="taxPayerType" />
<result column="template_group_id" jdbcType="BIGINT" property="templateGroupId" />
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -85,7 +87,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, IsDefault, TaxPayerType, TemplateGroupID, OrganizationID, CreateTime, UpdateTime
id, is_default, tax_payer_type, template_group_id, organization_id, create_time,
update_time, create_by, update_by
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRuleExample" resultMap="BaseResultMap">
<!--
......@@ -97,7 +100,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from TaxPayerReportRule
from tax_payer_report_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -105,30 +108,30 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from TaxPayerReportRule
where ID = #{ID,jdbcType=VARCHAR}
from tax_payer_report_rule
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from TaxPayerReportRule
where ID = #{ID,jdbcType=VARCHAR}
delete from tax_payer_report_rule
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRuleExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from TaxPayerReportRule
delete from tax_payer_report_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -138,45 +141,53 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into TaxPayerReportRule (ID, IsDefault, TaxPayerType,
TemplateGroupID, OrganizationID, CreateTime,
UpdateTime)
values (#{ID,jdbcType=VARCHAR}, #{isDefault,jdbcType=INTEGER}, #{taxPayerType,jdbcType=INTEGER},
#{templateGroupID,jdbcType=VARCHAR}, #{organizationID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
insert into tax_payer_report_rule (id, is_default, tax_payer_type,
template_group_id, organization_id, create_time,
update_time, create_by, update_by
)
values (#{id,jdbcType=BIGINT}, #{isDefault,jdbcType=INTEGER}, #{taxPayerType,jdbcType=INTEGER},
#{templateGroupId,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRule">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into TaxPayerReportRule
insert into tax_payer_report_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ID != null">
ID,
<if test="id != null">
id,
</if>
<if test="isDefault != null">
IsDefault,
is_default,
</if>
<if test="taxPayerType != null">
TaxPayerType,
tax_payer_type,
</if>
<if test="templateGroupID != null">
TemplateGroupID,
<if test="templateGroupId != null">
template_group_id,
</if>
<if test="organizationID != null">
OrganizationID,
<if test="organizationId != null">
organization_id,
</if>
<if test="createTime != null">
CreateTime,
create_time,
</if>
<if test="updateTime != null">
UpdateTime,
update_time,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateBy != null">
update_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ID != null">
#{ID,jdbcType=VARCHAR},
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="isDefault != null">
#{isDefault,jdbcType=INTEGER},
......@@ -184,11 +195,11 @@
<if test="taxPayerType != null">
#{taxPayerType,jdbcType=INTEGER},
</if>
<if test="templateGroupID != null">
#{templateGroupID,jdbcType=VARCHAR},
<if test="templateGroupId != null">
#{templateGroupId,jdbcType=BIGINT},
</if>
<if test="organizationID != null">
#{organizationID,jdbcType=VARCHAR},
<if test="organizationId != null">
#{organizationId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -196,6 +207,12 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRuleExample" resultType="java.lang.Long">
......@@ -203,7 +220,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from TaxPayerReportRule
select count(*) from tax_payer_report_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -213,28 +230,34 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update TaxPayerReportRule
update tax_payer_report_rule
<set>
<if test="record.ID != null">
ID = #{record.ID,jdbcType=VARCHAR},
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.isDefault != null">
IsDefault = #{record.isDefault,jdbcType=INTEGER},
is_default = #{record.isDefault,jdbcType=INTEGER},
</if>
<if test="record.taxPayerType != null">
TaxPayerType = #{record.taxPayerType,jdbcType=INTEGER},
tax_payer_type = #{record.taxPayerType,jdbcType=INTEGER},
</if>
<if test="record.templateGroupID != null">
TemplateGroupID = #{record.templateGroupID,jdbcType=VARCHAR},
<if test="record.templateGroupId != null">
template_group_id = #{record.templateGroupId,jdbcType=BIGINT},
</if>
<if test="record.organizationID != null">
OrganizationID = #{record.organizationID,jdbcType=VARCHAR},
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -246,14 +269,16 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update TaxPayerReportRule
set ID = #{record.ID,jdbcType=VARCHAR},
IsDefault = #{record.isDefault,jdbcType=INTEGER},
TaxPayerType = #{record.taxPayerType,jdbcType=INTEGER},
TemplateGroupID = #{record.templateGroupID,jdbcType=VARCHAR},
OrganizationID = #{record.organizationID,jdbcType=VARCHAR},
CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}
update tax_payer_report_rule
set id = #{record.id,jdbcType=BIGINT},
is_default = #{record.isDefault,jdbcType=INTEGER},
tax_payer_type = #{record.taxPayerType,jdbcType=INTEGER},
template_group_id = #{record.templateGroupId,jdbcType=BIGINT},
organization_id = #{record.organizationId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
create_by = #{record.createBy,jdbcType=VARCHAR},
update_by = #{record.updateBy,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -263,42 +288,50 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update TaxPayerReportRule
update tax_payer_report_rule
<set>
<if test="isDefault != null">
IsDefault = #{isDefault,jdbcType=INTEGER},
is_default = #{isDefault,jdbcType=INTEGER},
</if>
<if test="taxPayerType != null">
TaxPayerType = #{taxPayerType,jdbcType=INTEGER},
tax_payer_type = #{taxPayerType,jdbcType=INTEGER},
</if>
<if test="templateGroupID != null">
TemplateGroupID = #{templateGroupID,jdbcType=VARCHAR},
<if test="templateGroupId != null">
template_group_id = #{templateGroupId,jdbcType=BIGINT},
</if>
<if test="organizationID != null">
OrganizationID = #{organizationID,jdbcType=VARCHAR},
<if test="organizationId != null">
organization_id = #{organizationId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CreateTime = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
</set>
where ID = #{ID,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRule">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update TaxPayerReportRule
set IsDefault = #{isDefault,jdbcType=INTEGER},
TaxPayerType = #{taxPayerType,jdbcType=INTEGER},
TemplateGroupID = #{templateGroupID,jdbcType=VARCHAR},
OrganizationID = #{organizationID,jdbcType=VARCHAR},
CreateTime = #{createTime,jdbcType=TIMESTAMP},
UpdateTime = #{updateTime,jdbcType=TIMESTAMP}
where ID = #{ID,jdbcType=VARCHAR}
update tax_payer_report_rule
set is_default = #{isDefault,jdbcType=INTEGER},
tax_payer_type = #{taxPayerType,jdbcType=INTEGER},
template_group_id = #{templateGroupId,jdbcType=BIGINT},
organization_id = #{organizationId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entitiy.TaxPayerReportRuleExample" resultMap="BaseResultMap">
<!--
......@@ -310,7 +343,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from TaxPayerReportRule
from tax_payer_report_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......
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