bug修改+资源开发
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sa.zentao.mapper.ZtComputerSourceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtComputerSource">
|
||||
<result column="id" property="id" />
|
||||
<result column="source_type" property="sourceType" />
|
||||
<result column="inner_ip" property="innerIp" />
|
||||
<result column="bread" property="bread" />
|
||||
<result column="cpu_core" property="cpuCore" />
|
||||
<result column="memory" property="memory" />
|
||||
<result column="disk" property="disk" />
|
||||
<result column="system_type" property="systemType" />
|
||||
<result column="purpose" property="purpose" />
|
||||
<result column="server_name" property="serverName" />
|
||||
<result column="house" property="house" />
|
||||
<result column="id_no" property="idNo" />
|
||||
<result column="address" property="address" />
|
||||
<result column="buy_date" property="buyDate" />
|
||||
<result column="status" property="status" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_user" property="updateUser" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtComputerSourceDTO">
|
||||
|
||||
SELECT * from zt_computer_source WHERE 1=1
|
||||
<if test="qo.yearSearch != null and qo.yearSearch != ''">
|
||||
-- 1年内、3年内、3~5年、5~7年,7年以上
|
||||
<if test="qo.yearSearch == 1">
|
||||
and DATE_ADD(buy_date, INTERVAL 1 YEAR) <![CDATA[>=]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 2">
|
||||
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 3">
|
||||
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[<]]> now()
|
||||
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 4">
|
||||
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[<]]> now()
|
||||
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 5">
|
||||
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[<]]> now()
|
||||
</if>
|
||||
</if>
|
||||
<if test=" qo.sourceType != null and qo.sourceType != ''">
|
||||
and source_type = #{qo.sourceType}
|
||||
</if>
|
||||
<if test=" qo.systemType != null and qo.systemType != ''">
|
||||
and system_type = #{qo.systemType}
|
||||
</if>
|
||||
<if test=" qo.idNo != null and qo.idNo != ''">
|
||||
and id_no = #{qo.idNo}
|
||||
</if>
|
||||
<if test=" qo.status != null and qo.status != ''">
|
||||
and status = #{qo.status}
|
||||
</if>
|
||||
<if test=" qo.house != null and qo.house != ''">
|
||||
and house = #{qo.house}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user