...
|
...
|
@@ -4,7 +4,7 @@ |
|
|
<resultMap id="BaseResultMap" type="com.model.DockerProjectModel" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="projectname" property="projectName" jdbcType="VARCHAR" />
|
|
|
<result column="projecttype" property="projectType" jdbcType="VARCHAR" />
|
|
|
<result column="projectjobtype" property="projectJobType" jdbcType="VARCHAR" />
|
|
|
<result column="dockerprojectname" property="dockerProjectName" jdbcType="VARCHAR" />
|
|
|
<result column="dockergrayclusterid" property="dockerGrayClusterId" jdbcType="VARCHAR" />
|
|
|
<result column="dockergraynamespace" property="dockerGrayNameSpace" jdbcType="VARCHAR" />
|
...
|
...
|
@@ -14,7 +14,7 @@ |
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, projectname,projecttype,dockerprojectName,dockergrayclusterid,dockergraynamespace,dockeronlineclusterid,dockeronlinenamespace
|
|
|
id, projectname,projectjobtype,dockerprojectName,dockergrayclusterid,dockergraynamespace,dockeronlineclusterid,dockeronlinenamespace
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
...
|
...
|
@@ -28,8 +28,8 @@ |
|
|
<include refid="Base_Column_List" />
|
|
|
from docker_project
|
|
|
where 1=1
|
|
|
<if test="params.projectType != null" >
|
|
|
and projecttype = #{params.projectType}
|
|
|
<if test="params.projectJobType != null" >
|
|
|
and projectjobtype = #{params.projectJobType}
|
|
|
</if>
|
|
|
order by id desc
|
|
|
limit #{startIndex},#{pageSize}
|
...
|
...
|
@@ -43,14 +43,14 @@ |
|
|
id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByProjectType" resultMap="BaseResultMap">
|
|
|
<select id="selectByProjectJobType" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from docker_project
|
|
|
where 1=1
|
|
|
<choose>
|
|
|
<when test="projectType != null && projectType !='' " >
|
|
|
and projecttype = #{projectType}
|
|
|
<when test="projectJobType != null && projectJobType !='' " >
|
|
|
and projectjobtype = #{projectJobType}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
and 1=2
|
...
|
...
|
|