Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
c7939ead
Commit
c7939ead
authored
Jun 23, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fixed issue] change the database to new style
parent
ef2478a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
88 deletions
+122
-88
TaxRuleSettingMapper.java
.../main/java/pwc/taxtech/atms/dao/TaxRuleSettingMapper.java
+11
-10
TaxPayerReportRuleMapper.xml
...sources/pwc/taxtech/atms/dao/TaxPayerReportRuleMapper.xml
+111
-78
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dao/TaxRuleSettingMapper.java
View file @
c7939ead
...
...
@@ -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
TaxRuleS
etting 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_s
etting 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
=
"
GroupN
ame"
,
property
=
"GroupName"
),
@Result
(
column
=
"
IsD
efault"
,
property
=
"IsDefault"
),
@Result
(
column
=
"
N
ame"
,
property
=
"Name"
),
@Result
(
column
=
"
TaxB
ase"
,
property
=
"TaxBase"
),
@Result
(
column
=
"
TaxR
ate"
,
property
=
"TaxRate"
),
@Result
(
column
=
"
OrganizationID
"
,
property
=
"OrganizationID"
),
@Result
(
id
=
true
,
column
=
"
id
"
,
property
=
"ID"
),
@Result
(
column
=
"
group_n
ame"
,
property
=
"GroupName"
),
@Result
(
column
=
"
is_d
efault"
,
property
=
"IsDefault"
),
@Result
(
column
=
"
n
ame"
,
property
=
"Name"
),
@Result
(
column
=
"
tax_b
ase"
,
property
=
"TaxBase"
),
@Result
(
column
=
"
tax_r
ate"
,
property
=
"TaxRate"
),
@Result
(
column
=
"
organization_id
"
,
property
=
"OrganizationID"
),
})
List
<
TaxRuleSettingDto
>
GetTaxRuleSetting
();
}
\ No newline at end of file
atms-api/src/main/resources/pwc/taxtech/atms/dao/TaxPayerReportRuleMapper.xml
View file @
c7939ead
...
...
@@ -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
TaxPayerReportR
ule
from
tax_payer_report_r
ule
<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.
Stri
ng"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Lo
ng"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from
TaxPayerReportR
ule
where
ID = #{ID,jdbcType=VARCHAR
}
from
tax_payer_report_r
ule
where
id = #{id,jdbcType=BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Stri
ng"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Lo
ng"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from
TaxPayerReportR
ule
where
ID = #{ID,jdbcType=VARCHAR
}
delete from
tax_payer_report_r
ule
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
TaxPayerReportR
ule
delete from
tax_payer_report_r
ule
<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
TaxPayerReportR
ule
insert into
tax_payer_report_r
ule
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"
ID
!= null"
>
ID
,
<if
test=
"
id
!= null"
>
id
,
</if>
<if
test=
"isDefault != null"
>
IsD
efault,
is_d
efault,
</if>
<if
test=
"taxPayerType != null"
>
TaxPayerT
ype,
tax_payer_t
ype,
</if>
<if
test=
"templateGroupI
D
!= null"
>
TemplateGroupID
,
<if
test=
"templateGroupI
d
!= null"
>
template_group_id
,
</if>
<if
test=
"organizationI
D
!= null"
>
OrganizationID
,
<if
test=
"organizationI
d
!= null"
>
organization_id
,
</if>
<if
test=
"createTime != null"
>
CreateT
ime,
create_t
ime,
</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=
"templateGroupI
D
!= null"
>
#{templateGroupI
D,jdbcType=VARCHAR
},
<if
test=
"templateGroupI
d
!= null"
>
#{templateGroupI
d,jdbcType=BIGINT
},
</if>
<if
test=
"organizationI
D
!= null"
>
#{organizationI
D
,jdbcType=VARCHAR},
<if
test=
"organizationI
d
!= null"
>
#{organizationI
d
,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
TaxPayerReportR
ule
select count(*) from
tax_payer_report_r
ule
<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
TaxPayerReportR
ule
update
tax_payer_report_r
ule
<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"
>
IsD
efault = #{record.isDefault,jdbcType=INTEGER},
is_d
efault = #{record.isDefault,jdbcType=INTEGER},
</if>
<if
test=
"record.taxPayerType != null"
>
TaxPayerT
ype = #{record.taxPayerType,jdbcType=INTEGER},
tax_payer_t
ype = #{record.taxPayerType,jdbcType=INTEGER},
</if>
<if
test=
"record.templateGroupI
D
!= null"
>
TemplateGroupID = #{record.templateGroupID,jdbcType=VARCHAR
},
<if
test=
"record.templateGroupI
d
!= null"
>
template_group_id = #{record.templateGroupId,jdbcType=BIGINT
},
</if>
<if
test=
"record.organizationI
D
!= null"
>
OrganizationID = #{record.organizationID
,jdbcType=VARCHAR},
<if
test=
"record.organizationI
d
!= null"
>
organization_id = #{record.organizationId
,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
CreateT
ime = #{record.createTime,jdbcType=TIMESTAMP},
create_t
ime = #{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
TaxPayerReportR
ule
update
tax_payer_report_r
ule
<set>
<if
test=
"isDefault != null"
>
IsD
efault = #{isDefault,jdbcType=INTEGER},
is_d
efault = #{isDefault,jdbcType=INTEGER},
</if>
<if
test=
"taxPayerType != null"
>
TaxPayerT
ype = #{taxPayerType,jdbcType=INTEGER},
tax_payer_t
ype = #{taxPayerType,jdbcType=INTEGER},
</if>
<if
test=
"templateGroupI
D
!= null"
>
TemplateGroupID = #{templateGroupID,jdbcType=VARCHAR
},
<if
test=
"templateGroupI
d
!= null"
>
template_group_id = #{templateGroupId,jdbcType=BIGINT
},
</if>
<if
test=
"organizationI
D
!= null"
>
OrganizationID = #{organizationID
,jdbcType=VARCHAR},
<if
test=
"organizationI
d
!= null"
>
organization_id = #{organizationId
,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
CreateT
ime = #{createTime,jdbcType=TIMESTAMP},
create_t
ime = #{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
TaxPayerReportR
ule
from
tax_payer_report_r
ule
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment