|
@@ -1,24 +1,32 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
-<mapper namespace="cn.com.qmth.scancloud.dao.BatchDao">
|
|
|
|
|
|
+<mapper namespace="com.qmth.ops.biz.dao.AppDao">
|
|
|
|
|
|
- <select id="findByQuery" resultType="com.qmth.biz.domain.AppDTO">
|
|
|
|
- SELECT a.id, a.code, a.name, a.master_version_id, v.name, a.create_time, a.update_time
|
|
|
|
|
|
+ <select id="findByQuery" resultType="com.qmth.ops.biz.domain.AppDTO">
|
|
|
|
+ SELECT
|
|
|
|
+ a.id,
|
|
|
|
+ a.code,
|
|
|
|
+ a.name,
|
|
|
|
+ a.master_version_id,
|
|
|
|
+ v.name master_version_name,
|
|
|
|
+ a.create_time,
|
|
|
|
+ a.update_time
|
|
FROM app a
|
|
FROM app a
|
|
left join version v on a.id=v.app_id and a.master_version_id=v.id
|
|
left join version v on a.id=v.app_id and a.master_version_id=v.id
|
|
<if test="query.userId != null">
|
|
<if test="query.userId != null">
|
|
- inner join app_user au on a.id = au.app_id and au.user_id = #{query.userId}
|
|
|
|
- </if>
|
|
|
|
- WHERE 1=1
|
|
|
|
- <if test="query.id != null">
|
|
|
|
- and a.id=#{query.id}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.code != null">
|
|
|
|
- and t.code=#{query.code}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.nameStartWith != null">
|
|
|
|
- and t.name like concat(#{query.name},'%')
|
|
|
|
|
|
+ inner join app_user au on a.id=au.app_id and au.user_id=#{query.userId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="query.id != null">
|
|
|
|
+ and a.id=#{query.id}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="query.code != null">
|
|
|
|
+ and a.code=#{query.code}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="query.nameStartWith != null">
|
|
|
|
+ and a.name like concat(#{query.nameStartWith},'%')
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|