Commit 0e617b1c authored by neo's avatar neo

[DEV] use mybaties gen Project group files

parent fc780606
......@@ -395,5 +395,9 @@
<columnOverride column="IsManualChange" javaType="Boolean"/>
<columnOverride column="Instructions" javaType="java.lang.String" jdbcType="VARCHAR"/>
</table>
<table tableName="Project" domainObjectName="Project">
<property name="useActualColumnNames" value="true"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
</context>
</generatorConfiguration>
\ 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 org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dto.taxadmin.ProjectDisplayDto;
import pwc.taxtech.atms.entitiy.Project;
import pwc.taxtech.atms.entitiy.ProjectExample;
@Mapper
public interface ProjectMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
long countByExample(ProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int deleteByExample(ProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int deleteByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int insert(Project record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int insertSelective(Project record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
List<Project> selectByExampleWithRowbounds(ProjectExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
List<Project> selectByExample(ProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
Project selectByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") Project record, @Param("example") ProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int updateByExample(@Param("record") Project record, @Param("example") ProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(Project record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table Project
*
* @mbg.generated
*/
int updateByPrimaryKey(Project record);
@Select("<script>" +
"SELECT " +
" p.CreateTime AS CreateTime, " +
" p.IsActive AS IsActive, " +
" p.OrganizationID AS OrganizationID, " +
" p.Name AS Name, " +
" p.Code AS Code, " +
" p.ID AS ID, " +
" p.IndustryID AS IndustryID, " +
" p.Year AS Year, " +
" p.RegionID AS RegionID, " +
" region.ShortName AS RegionName, " +
" p.RuleType AS RuleType, " +
" projectServiceType.ServiceTypeID AS ServiceTypeID, " +
" p.UpdateTime AS UpdateTime, " +
" serviceType.Name AS ServiceTypeName, " +
" organization.Name AS OrganizationName, " +
" industry.Name AS IndustryName, " +
" projectServiceType.TemplateGroupID AS TemplateGroupID, " +
" templateGroup.Name AS TemplateGroupName, " +
" p.ClientCode AS ClientCode, " +
" p.DbName AS DbName, " +
" TRUE AS HaveCreateProject, " +
" p.EnterpriseAccountSetID AS EnterpriseAccountSetID, " +
" p.StartPeriod AS StartPeriod, " +
" p.EndPeriod AS EndPeriod " +
"FROM " +
" Project p " +
" JOIN " +
" Organization org ON p.OrganizationID = org.ID " +
" JOIN " +
" ProjectServiceType projectServiceType ON p.ID = projectServiceType.ProjectID " +
" JOIN " +
" Organization organization ON p.OrganizationID = organization.ID " +
" JOIN " +
" ServiceType serviceType ON projectServiceType.ServiceTypeID = serviceType.ID " +
" JOIN " +
" Industry industry ON p.IndustryID = industry.ID " +
" JOIN " +
" TemplateGroup templateGroup ON projectServiceType.TemplateGroupID = templateGroup.ID " +
" JOIN " +
" Region region ON p.RegionID = region.ID " +
" JOIN " +
" EnterpriseAccountSetOrg enterOrg ON p.EnterpriseAccountSetID = enterOrg.EnterpriseAccountSetID " +
" <where>" +
" p.IsActive=1 and serviceType.isActive=1 and p.OrganizationID = enterOrg.OrganizationID" +
" <if test=\"orgID != null and orgID !='' \">AND org.ID=#{orgID}</if>" +
" <if test=\"serverID != null and serverID !='' \">AND p.serviceType=#{serverID}</if>" +
" <if test=\"projectYear != null\">AND p.Year=#{projectYear}</if>" +
" </where>" +
"</script>")
List<ProjectDisplayDto> getProjectList(@Param("orgID") String orgID, @Param("serverID") String serviceID,
@Param("projectYear") Integer projectYear);
}
\ No newline at end of file
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