Commit 5b63aecb authored by neo's avatar neo

[BUGFIX] mybaties gen can deal keyword and userid for insert peroidinfo

parent d3164547
/
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.connectionURL=jdbc:mysql://10.157.107.89:3306/a1100000?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
jdbc.userId=root
......
......@@ -8,7 +8,7 @@
<!-- <classPathEntry location="../hsqldb/hsqldb-2.3.5.jar" /> -->
<context id="contextId" targetRuntime="MyBatis3">
<!-- 考虑需要兼容DB2与ORCAL数据库, 大部份字段不需要加双引号,autoDelimitKeywords设置为false -->
<property name="autoDelimitKeywords" value="false" />
<property name="autoDelimitKeywords" value="true" />
<property name="javaFileEncoding" value="UTF-8" />
<plugin type="org.mybatis.generator.plugins.MapperAnnotationPlugin" />
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin" />
......
......@@ -53,6 +53,6 @@ public class ProjectInfoController {
@RequestMapping(value = "getImportType/{projectID}/{periodID}/{serviceType}", method = RequestMethod.GET)
public ResponseEntity getImportType(@PathVariable String projectID, @PathVariable Integer periodID,
@PathVariable Integer serviceType) {
return ResponseEntity.ok().body(projectInfoService.getImportType(projectID,periodID,serviceType));
return ResponseEntity.ok().body(projectInfoService.getImportType(projectID,periodID,identityService.getIdentityUser().getID(),serviceType));
}
}
\ No newline at end of file
......@@ -12,5 +12,5 @@ public interface ProjectInfoService {
OperationResultDto<List<PeriodInfoDto>> getProjectImportType(String projectId, List<Integer> periods, Integer serviceTypeId, String id);
Integer getImportType(String projectID, Integer periodID, Integer serviceType);
Integer getImportType(String projectID, Integer periodID, String id, Integer serviceType);
}
......@@ -57,7 +57,7 @@ public class ProjectInfoServiceImpl implements ProjectInfoService {
}
@Override
public Integer getImportType(String projectID, Integer periodID, Integer serviceType) {
public Integer getImportType(String projectID, Integer periodID, String userID, Integer serviceType) {
PeriodInfoExample example = new PeriodInfoExample();
example.createCriteria().andProjectIDEqualTo(projectID).andProjectIDEqualTo(projectID).andServiceTypeEqualTo(serviceType);
......@@ -68,6 +68,7 @@ public class ProjectInfoServiceImpl implements ProjectInfoService {
periodInfo.setProjectID(projectID);
periodInfo.setPeriod(periodID);
periodInfo.setStatus(0);
periodInfo.setCreatorID(userID);
periodInfo.setImportType(TbImportType.UnImported.getCode());
periodInfo.setServiceType(serviceType);
periodInfo.setCreateTime(new Date());
......
......@@ -364,132 +364,132 @@ public class VoucherExample {
}
public Criteria andDateIsNull() {
addCriterion("Date is null");
addCriterion("\"Date\" is null");
return (Criteria) this;
}
public Criteria andDateIsNotNull() {
addCriterion("Date is not null");
addCriterion("\"Date\" is not null");
return (Criteria) this;
}
public Criteria andDateEqualTo(Date value) {
addCriterionForJDBCDate("Date =", value, "date");
addCriterionForJDBCDate("\"Date\" =", value, "date");
return (Criteria) this;
}
public Criteria andDateNotEqualTo(Date value) {
addCriterionForJDBCDate("Date <>", value, "date");
addCriterionForJDBCDate("\"Date\" <>", value, "date");
return (Criteria) this;
}
public Criteria andDateGreaterThan(Date value) {
addCriterionForJDBCDate("Date >", value, "date");
addCriterionForJDBCDate("\"Date\" >", value, "date");
return (Criteria) this;
}
public Criteria andDateGreaterThanOrEqualTo(Date value) {
addCriterionForJDBCDate("Date >=", value, "date");
addCriterionForJDBCDate("\"Date\" >=", value, "date");
return (Criteria) this;
}
public Criteria andDateLessThan(Date value) {
addCriterionForJDBCDate("Date <", value, "date");
addCriterionForJDBCDate("\"Date\" <", value, "date");
return (Criteria) this;
}
public Criteria andDateLessThanOrEqualTo(Date value) {
addCriterionForJDBCDate("Date <=", value, "date");
addCriterionForJDBCDate("\"Date\" <=", value, "date");
return (Criteria) this;
}
public Criteria andDateIn(List<Date> values) {
addCriterionForJDBCDate("Date in", values, "date");
addCriterionForJDBCDate("\"Date\" in", values, "date");
return (Criteria) this;
}
public Criteria andDateNotIn(List<Date> values) {
addCriterionForJDBCDate("Date not in", values, "date");
addCriterionForJDBCDate("\"Date\" not in", values, "date");
return (Criteria) this;
}
public Criteria andDateBetween(Date value1, Date value2) {
addCriterionForJDBCDate("Date between", value1, value2, "date");
addCriterionForJDBCDate("\"Date\" between", value1, value2, "date");
return (Criteria) this;
}
public Criteria andDateNotBetween(Date value1, Date value2) {
addCriterionForJDBCDate("Date not between", value1, value2, "date");
addCriterionForJDBCDate("\"Date\" not between", value1, value2, "date");
return (Criteria) this;
}
public Criteria andGroupIsNull() {
addCriterion("Group is null");
addCriterion("\"Group\" is null");
return (Criteria) this;
}
public Criteria andGroupIsNotNull() {
addCriterion("Group is not null");
addCriterion("\"Group\" is not null");
return (Criteria) this;
}
public Criteria andGroupEqualTo(String value) {
addCriterion("Group =", value, "group");
addCriterion("\"Group\" =", value, "group");
return (Criteria) this;
}
public Criteria andGroupNotEqualTo(String value) {
addCriterion("Group <>", value, "group");
addCriterion("\"Group\" <>", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThan(String value) {
addCriterion("Group >", value, "group");
addCriterion("\"Group\" >", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThanOrEqualTo(String value) {
addCriterion("Group >=", value, "group");
addCriterion("\"Group\" >=", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThan(String value) {
addCriterion("Group <", value, "group");
addCriterion("\"Group\" <", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThanOrEqualTo(String value) {
addCriterion("Group <=", value, "group");
addCriterion("\"Group\" <=", value, "group");
return (Criteria) this;
}
public Criteria andGroupLike(String value) {
addCriterion("Group like", value, "group");
addCriterion("\"Group\" like", value, "group");
return (Criteria) this;
}
public Criteria andGroupNotLike(String value) {
addCriterion("Group not like", value, "group");
addCriterion("\"Group\" not like", value, "group");
return (Criteria) this;
}
public Criteria andGroupIn(List<String> values) {
addCriterion("Group in", values, "group");
addCriterion("\"Group\" in", values, "group");
return (Criteria) this;
}
public Criteria andGroupNotIn(List<String> values) {
addCriterion("Group not in", values, "group");
addCriterion("\"Group\" not in", values, "group");
return (Criteria) this;
}
public Criteria andGroupBetween(String value1, String value2) {
addCriterion("Group between", value1, value2, "group");
addCriterion("\"Group\" between", value1, value2, "group");
return (Criteria) this;
}
public Criteria andGroupNotBetween(String value1, String value2) {
addCriterion("Group not between", value1, value2, "group");
addCriterion("\"Group\" not between", value1, value2, "group");
return (Criteria) this;
}
......@@ -1394,62 +1394,62 @@ public class VoucherExample {
}
public Criteria andStatusIsNull() {
addCriterion("Status is null");
addCriterion("\"Status\" is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("Status is not null");
addCriterion("\"Status\" is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("Status =", value, "status");
addCriterion("\"Status\" =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("Status <>", value, "status");
addCriterion("\"Status\" <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("Status >", value, "status");
addCriterion("\"Status\" >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("Status >=", value, "status");
addCriterion("\"Status\" >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("Status <", value, "status");
addCriterion("\"Status\" <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("Status <=", value, "status");
addCriterion("\"Status\" <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("Status in", values, "status");
addCriterion("\"Status\" in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("Status not in", values, "status");
addCriterion("\"Status\" not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("Status between", value1, value2, "status");
addCriterion("\"Status\" between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("Status not between", value1, value2, "status");
addCriterion("\"Status\" not between", value1, value2, "status");
return (Criteria) this;
}
......
......@@ -104,9 +104,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
VoucherID, VID, Date, `Group`, Period, CustomerCode, CustomerName, Summary, AcctCode,
VoucherID, VID, "Date", "Group", Period, CustomerCode, CustomerName, Summary, AcctCode,
Debit, Credit, Attach, ItemID, CreateTime, ImportType, CreatorID, MonthID, OriginalPeriod,
Status, PartBilledPeriod, BilledPeriod, StdCode, MappingReason, MappingUser, MappingTime,
"Status", PartBilledPeriod, BilledPeriod, StdCode, MappingReason, MappingUser, MappingTime,
RemapId
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultMap="BaseResultMap">
......@@ -160,13 +160,13 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into Voucher (VoucherID, VID, Date,
Group, Period, CustomerCode,
insert into Voucher (VoucherID, VID, "Date",
"Group", Period, CustomerCode,
CustomerName, Summary, AcctCode,
Debit, Credit, Attach,
ItemID, CreateTime, ImportType,
CreatorID, MonthID, OriginalPeriod,
Status, PartBilledPeriod, BilledPeriod,
"Status", PartBilledPeriod, BilledPeriod,
StdCode, MappingReason, MappingUser,
MappingTime, RemapId)
values (#{voucherID,jdbcType=VARCHAR}, #{VID,jdbcType=VARCHAR}, #{date,jdbcType=DATE},
......@@ -193,10 +193,10 @@
VID,
</if>
<if test="date != null">
Date,
"Date",
</if>
<if test="group != null">
Group,
"Group",
</if>
<if test="period != null">
Period,
......@@ -241,7 +241,7 @@
OriginalPeriod,
</if>
<if test="status != null">
Status,
"Status",
</if>
<if test="partBilledPeriod != null">
PartBilledPeriod,
......@@ -370,10 +370,10 @@
VID = #{record.VID,jdbcType=VARCHAR},
</if>
<if test="record.date != null">
Date = #{record.date,jdbcType=DATE},
"Date" = #{record.date,jdbcType=DATE},
</if>
<if test="record.group != null">
Group = #{record.group,jdbcType=VARCHAR},
"Group" = #{record.group,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
Period = #{record.period,jdbcType=INTEGER},
......@@ -418,7 +418,7 @@
OriginalPeriod = #{record.originalPeriod,jdbcType=INTEGER},
</if>
<if test="record.status != null">
Status = #{record.status,jdbcType=INTEGER},
"Status" = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.partBilledPeriod != null">
PartBilledPeriod = #{record.partBilledPeriod,jdbcType=INTEGER},
......@@ -454,8 +454,8 @@
update Voucher
set VoucherID = #{record.voucherID,jdbcType=VARCHAR},
VID = #{record.VID,jdbcType=VARCHAR},
Date = #{record.date,jdbcType=DATE},
Group = #{record.group,jdbcType=VARCHAR},
"Date" = #{record.date,jdbcType=DATE},
"Group" = #{record.group,jdbcType=VARCHAR},
Period = #{record.period,jdbcType=INTEGER},
CustomerCode = #{record.customerCode,jdbcType=VARCHAR},
CustomerName = #{record.customerName,jdbcType=VARCHAR},
......@@ -470,7 +470,7 @@
CreatorID = #{record.creatorID,jdbcType=VARCHAR},
MonthID = #{record.monthID,jdbcType=INTEGER},
OriginalPeriod = #{record.originalPeriod,jdbcType=INTEGER},
Status = #{record.status,jdbcType=INTEGER},
"Status" = #{record.status,jdbcType=INTEGER},
PartBilledPeriod = #{record.partBilledPeriod,jdbcType=INTEGER},
BilledPeriod = #{record.billedPeriod,jdbcType=INTEGER},
StdCode = #{record.stdCode,jdbcType=VARCHAR},
......@@ -493,10 +493,10 @@
VID = #{VID,jdbcType=VARCHAR},
</if>
<if test="date != null">
Date = #{date,jdbcType=DATE},
"Date" = #{date,jdbcType=DATE},
</if>
<if test="group != null">
Group = #{group,jdbcType=VARCHAR},
"Group" = #{group,jdbcType=VARCHAR},
</if>
<if test="period != null">
Period = #{period,jdbcType=INTEGER},
......@@ -541,7 +541,7 @@
OriginalPeriod = #{originalPeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
Status = #{status,jdbcType=INTEGER},
"Status" = #{status,jdbcType=INTEGER},
</if>
<if test="partBilledPeriod != null">
PartBilledPeriod = #{partBilledPeriod,jdbcType=INTEGER},
......@@ -574,8 +574,8 @@
-->
update Voucher
set VID = #{VID,jdbcType=VARCHAR},
Date = #{date,jdbcType=DATE},
Group = #{group,jdbcType=VARCHAR},
"Date" = #{date,jdbcType=DATE},
"Group" = #{group,jdbcType=VARCHAR},
Period = #{period,jdbcType=INTEGER},
CustomerCode = #{customerCode,jdbcType=VARCHAR},
CustomerName = #{customerName,jdbcType=VARCHAR},
......@@ -590,7 +590,7 @@
CreatorID = #{creatorID,jdbcType=VARCHAR},
MonthID = #{monthID,jdbcType=INTEGER},
OriginalPeriod = #{originalPeriod,jdbcType=INTEGER},
Status = #{status,jdbcType=INTEGER},
"Status" = #{status,jdbcType=INTEGER},
PartBilledPeriod = #{partBilledPeriod,jdbcType=INTEGER},
BilledPeriod = #{billedPeriod,jdbcType=INTEGER},
StdCode = #{stdCode,jdbcType=VARCHAR},
......
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