<?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.ruoyi.other.mapper.ShareMapper">
|
|
<select id="authmanagelist" resultType="com.ruoyi.other.api.domain.Share">
|
select * from t_share where del_flag = 0 and audit_status != 1
|
<if test="null != name and '' != name">
|
and name like CONCAT('%', #{name}, '%')
|
</if>
|
<if test="null != addType">
|
and add_type = #{addType}
|
</if>
|
<if test="null != auditStatus">
|
and audit_status = #{auditStatus}
|
</if>
|
<if test="null != userIds and userIds.size() > 0 and null != shopIds and shopIds.size() > 0">
|
and (
|
(add_type = 2 and object_id in
|
<foreach collection="userIds" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
) or (add_type = 3 and object_id in
|
<foreach collection="shopIds" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
)
|
)
|
</if>
|
<if test="null != userIds and userIds.size() > 0 and (null == shopIds or shopIds.size() == 0)">
|
and add_type = 2 and object_id in
|
<foreach collection="userIds" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
<if test="(null == userIds or userIds.size() == 0) and null != shopIds and shopIds.size() > 0">
|
and add_type = 3 and object_id in
|
<foreach collection="shopIds" item="item" index="index" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
order by create_time desc
|
</select>
|
</mapper>
|