This commit is contained in:
chenjianxing 2020-08-25 15:25:07 +08:00
commit dfb0ed9d6d
3 changed files with 11 additions and 8 deletions

View File

@ -137,7 +137,7 @@
</select>
<select id="selectDashboardTests" resultType="io.metersphere.dto.DashboardTestDTO">
SELECT create_time AS date, count(api_test_report.id) AS count,
SELECT min(create_time) AS date, count(api_test_report.id) AS count,
date_format(from_unixtime(create_time / 1000), '%Y-%m-%d') AS x
FROM api_test_report
WHERE test_id IN (SELECT api_test.id

View File

@ -126,7 +126,7 @@
</select>
<select id="selectDashboardTests" resultType="io.metersphere.dto.DashboardTestDTO">
SELECT create_time AS date, count(load_test_report.id) AS count,
SELECT min(create_time) AS date, count(load_test_report.id) AS count,
date_format(from_unixtime(create_time / 1000), '%Y-%m-%d') AS x
FROM load_test_report
WHERE test_id IN (SELECT load_test.id

View File

@ -38,21 +38,23 @@
</select>
<select id="getMemberList" resultType="io.metersphere.base.domain.User">
SELECT distinct `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
SELECT DISTINCT * FROM (
SELECT `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
WHERE user_role.source_id = #{member.workspaceId}
<if test="member.name != null">
AND `user`.name like CONCAT('%', #{member.name},'%')
</if>
order by user_role.update_time desc
order by user_role.update_time desc) temp
</select>
<select id="getOrgMemberList" resultType="io.metersphere.base.domain.User">
SELECT distinct `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
SELECT DISTINCT * FROM (
SELECT `user`.* FROM user_role JOIN `user` ON user_role.user_id = `user`.id
WHERE user_role.source_id = #{orgMember.organizationId}
<if test="orgMember.name != null">
AND `user`.name like CONCAT('%', #{orgMember.name},'%')
</if>
order by user_role.update_time desc
order by user_role.update_time desc) temp
</select>
<select id="getOrganizationMemberDTO" resultMap="BaseOrganizationMemberDTOMap">
@ -90,11 +92,12 @@
where w.id = #{workspaceId} and ur.user_id = #{userId}
</select>
<select id="getTestManagerAndTestUserList" resultType="io.metersphere.base.domain.User">
SELECT distinct `user`.* FROM user_role INNER JOIN `user` ON user_role.user_id = `user`.id
SELECT DISTINCT * FROM (
SELECT `user`.* FROM user_role INNER JOIN `user` ON user_role.user_id = `user`.id
WHERE user_role.source_id = #{request.workspaceId} And user_role.role_id in ('test_manager', 'test_user')
<if test="request.name != null">
AND `user`.name like CONCAT('%', #{request.name},'%')
</if>
order by user_role.update_time desc
order by user_role.update_time desc) temp
</select>
</mapper>