Commit 5d0c7966 authored by neo's avatar neo

[dev] fixed some project query sql bug

parent 4f452d87
......@@ -111,7 +111,7 @@ public interface ProjectMapper extends MyMapper {
int updateByPrimaryKey(Project record);
@Select("<script>" +
"SELECT distinct " +
"SELECT DISTINCT " +
" p.CREATE_TIME AS CreateTime, " +
" p.IS_ACTIVE AS IsActive, " +
" p.ORGANIZATION_ID AS OrganizationID, " +
......@@ -123,16 +123,16 @@ public interface ProjectMapper extends MyMapper {
" p.REGION_ID AS RegionID, " +
" region.SHORT_NAME AS RegionName, " +
" p.RULE_TYPE AS RuleType, " +
" PROJECT_SERVICE_TYPE.SERVICE_TYPE_ID AS ServiceTypeID, " +
" projectServiceType.SERVICE_TYPE_ID AS ServiceTypeID, " +
" p.UPDATE_TIME AS UpdateTime, " +
" SERVICE_TYPE.Name AS ServiceTypeName, " +
" serviceType.Name AS ServiceTypeName, " +
" organization.Name AS OrganizationName, " +
" industry.Name AS IndustryName, " +
" PROJECT_SERVICE_TYPE.TemplateGroupID AS TemplateGroupID, " +
" TEMPLATE_GROUP.Name AS TemplateGroupName, " +
" projectServiceType.Template_Group_ID AS TemplateGroupID, " +
" templateGroup.Name AS TemplateGroupName, " +
" p.CLIENT_CODE AS ClientCode, " +
" p.DB_NAME AS DbName, " +
" TRUE AS HaveCreateProject, " +
" 1 AS HaveCreateProject, " +
" p.ENTERPRISE_ACCOUNT_SET_ID AS EnterpriseAccountSetID, " +
" p.START_PERIOD AS StartPeriod, " +
" p.END_PERIOD AS EndPeriod " +
......@@ -141,11 +141,11 @@ public interface ProjectMapper extends MyMapper {
" JOIN " +
" Organization org ON p.ORGANIZATION_ID = org.id " +
" JOIN " +
" PROJECT_SERVICE_TYPE PROJECT_SERVICE_TYPE ON p.id = projectServiceType.PROJECT_ID " +
" PROJECT_SERVICE_TYPE projectServiceType ON p.id = projectServiceType.PROJECT_ID " +
" JOIN " +
" Organization organization ON p.ORGANIZATION_ID = organization.id " +
" JOIN " +
" ServiceType serviceType ON projectServiceType.SERVICE_TYPE_ID = serviceType.id " +
" SERVICE_TYPE serviceType ON projectServiceType.SERVICE_TYPE_ID = serviceType.id " +
" JOIN " +
" Industry industry ON p.INDUSTRY_ID = industry.id " +
" JOIN " +
......@@ -153,7 +153,7 @@ public interface ProjectMapper extends MyMapper {
" JOIN " +
" Region region ON p.REGION_ID = region.id " +
" JOIN " +
" ENTERPRISE_ACCOUNT_SET_ORG enterOrg ON p.ENTERPRISE_ACCOUNT_SET_ID = enterOrg.ENTERPRISE_ACCOUNT_SET_ID " +
" ENTERPRISE_ACCOUNT_SET_ORG enterOrg ON p.ENTERPRISE_ACCOUNT_SET_ID = enterOrg.ENTERPRISE_ACCOUNT_SET_ID" +
" <where>" +
" p.IS_ACTIVE=1 and serviceType.IS_ACTIVE=1 and p.ORGANIZATION_ID = enterOrg.ORGANIZATION_ID" +
" <if test=\"orgId != null and orgId !='' \">AND org.id=#{orgId}</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