Commit 91a4b126 authored by eddie.woo's avatar eddie.woo

mybatis generator

parent 1957abfc
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.WfRecordDetail;
import pwc.taxtech.atms.entity.WfRecordDetailExample;
@Mapper
public interface WfRecordDetailMapper extends MyMapper {
long countByExample(WfRecordDetailExample example);
int deleteByExample(WfRecordDetailExample example);
int deleteByPrimaryKey(Long id);
int insert(WfRecordDetail record);
int insertSelective(WfRecordDetail record);
List<WfRecordDetail> selectByExample(WfRecordDetailExample example);
WfRecordDetail selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WfRecordDetail record, @Param("example") WfRecordDetailExample example);
int updateByExample(@Param("record") WfRecordDetail record, @Param("example") WfRecordDetailExample example);
int updateByPrimaryKeySelective(WfRecordDetail record);
int updateByPrimaryKey(WfRecordDetail record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.WfRecord;
import pwc.taxtech.atms.entity.WfRecordExample;
@Mapper
public interface WfRecordMapper extends MyMapper {
long countByExample(WfRecordExample example);
int deleteByExample(WfRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(WfRecord record);
int insertSelective(WfRecord record);
List<WfRecord> selectByExample(WfRecordExample example);
WfRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WfRecord record, @Param("example") WfRecordExample example);
int updateByExample(@Param("record") WfRecord record, @Param("example") WfRecordExample example);
int updateByPrimaryKeySelective(WfRecord record);
int updateByPrimaryKey(WfRecord record);
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import java.io.Serializable;
public class WfRecord extends BaseEntity implements Serializable {
/**
*
*/
private Long id;
/**
* 机构ID
*/
private String orgId;
/**
* 项目ID
*/
private Long projectId;
/**
* 年
*/
private Integer year;
/**
* 期间
*/
private Integer period;
/**
* 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
private Integer type;
/**
* ACT实例ID
*/
private String actInstId;
/**
* 状态 0:审批中 1:通过 2:驳回
*/
private Integer status;
/**
* 流程发起人ID
*/
private String uid;
/**
* 备注
*/
private String comment;
/**
* wf_record
*/
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return org_id 机构ID
*/
public String getOrgId() {
return orgId;
}
/**
* @param orgId 机构ID
*/
public void setOrgId(String orgId) {
this.orgId = orgId == null ? null : orgId.trim();
}
/**
* @return project_id 项目ID
*/
public Long getProjectId() {
return projectId;
}
/**
* @param projectId 项目ID
*/
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
/**
* @return year 年
*/
public Integer getYear() {
return year;
}
/**
* @param year 年
*/
public void setYear(Integer year) {
this.year = year;
}
/**
* @return period 期间
*/
public Integer getPeriod() {
return period;
}
/**
* @param period 期间
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* @return type 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
public Integer getType() {
return type;
}
/**
* @param type 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
public void setType(Integer type) {
this.type = type;
}
/**
* @return act_inst_id ACT实例ID
*/
public String getActInstId() {
return actInstId;
}
/**
* @param actInstId ACT实例ID
*/
public void setActInstId(String actInstId) {
this.actInstId = actInstId == null ? null : actInstId.trim();
}
/**
* @return status 状态 0:审批中 1:通过 2:驳回
*/
public Integer getStatus() {
return status;
}
/**
* @param status 状态 0:审批中 1:通过 2:驳回
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* @return uid 流程发起人ID
*/
public String getUid() {
return uid;
}
/**
* @param uid 流程发起人ID
*/
public void setUid(String uid) {
this.uid = uid == null ? null : uid.trim();
}
/**
* @return comment 备注
*/
public String getComment() {
return comment;
}
/**
* @param comment 备注
*/
public void setComment(String comment) {
this.comment = comment == null ? null : comment.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orgId=").append(orgId);
sb.append(", projectId=").append(projectId);
sb.append(", year=").append(year);
sb.append(", period=").append(period);
sb.append(", type=").append(type);
sb.append(", actInstId=").append(actInstId);
sb.append(", status=").append(status);
sb.append(", uid=").append(uid);
sb.append(", comment=").append(comment);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import java.io.Serializable;
public class WfRecordDetail extends BaseEntity implements Serializable {
/**
*
*/
private Long id;
/**
* 工作流主表ID
*/
private Long recordId;
/**
* ACT实例ID
*/
private String actInstId;
/**
* ACT任务ID
*/
private String actTaskId;
/**
* UID
*/
private String uid;
/**
* 状态 0:审批中 1:通过 2:驳回
*/
private Integer status;
/**
* 备注
*/
private String comment;
/**
* wf_record_detail
*/
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return record_id 工作流主表ID
*/
public Long getRecordId() {
return recordId;
}
/**
* @param recordId 工作流主表ID
*/
public void setRecordId(Long recordId) {
this.recordId = recordId;
}
/**
* @return act_inst_id ACT实例ID
*/
public String getActInstId() {
return actInstId;
}
/**
* @param actInstId ACT实例ID
*/
public void setActInstId(String actInstId) {
this.actInstId = actInstId == null ? null : actInstId.trim();
}
/**
* @return act_task_id ACT任务ID
*/
public String getActTaskId() {
return actTaskId;
}
/**
* @param actTaskId ACT任务ID
*/
public void setActTaskId(String actTaskId) {
this.actTaskId = actTaskId == null ? null : actTaskId.trim();
}
/**
* @return uid UID
*/
public String getUid() {
return uid;
}
/**
* @param uid UID
*/
public void setUid(String uid) {
this.uid = uid == null ? null : uid.trim();
}
/**
* @return status 状态 0:审批中 1:通过 2:驳回
*/
public Integer getStatus() {
return status;
}
/**
* @param status 状态 0:审批中 1:通过 2:驳回
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* @return comment 备注
*/
public String getComment() {
return comment;
}
/**
* @param comment 备注
*/
public void setComment(String comment) {
this.comment = comment == null ? null : comment.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", recordId=").append(recordId);
sb.append(", actInstId=").append(actInstId);
sb.append(", actTaskId=").append(actTaskId);
sb.append(", uid=").append(uid);
sb.append(", status=").append(status);
sb.append(", comment=").append(comment);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public class MyBatisGeneratorTest {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
//配置文件
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("vatGeneratorConfig.xml").getPath());
File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
......
......@@ -201,9 +201,9 @@ public class SimpleCommentGenerator implements CommentGenerator {
method.addJavaDocLine("/**");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(introspectedColumn.getRemarks());
method.addJavaDocLine(sb.toString());
// sb.append(" * ");
// sb.append(introspectedColumn.getRemarks());
// method.addJavaDocLine(sb.toString());
sb.setLength(0);
sb.append(" * @return ");
......@@ -226,9 +226,9 @@ public class SimpleCommentGenerator implements CommentGenerator {
method.addJavaDocLine("/**");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(introspectedColumn.getRemarks());
method.addJavaDocLine(sb.toString());
// sb.append(" * ");
// sb.append(introspectedColumn.getRemarks());
// method.addJavaDocLine(sb.toString());
Parameter parm = method.getParameters().get(0);
sb.setLength(0);
......
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.connectionURL=jdbc:mysql://10.158.230.16:3306/tax_admin_didi?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true&amp;useSSL=false
jdbc.userId=root
jdbc.password=taxadmin2018
This diff is collapsed.
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