邀请记录
This commit is contained in:
@@ -92,6 +92,45 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="statisticsRecord" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
SUM(CASE WHEN (`method` = 'get' AND `status`= 2 ) OR ( `method` = 'use' AND `status`= 3 ) THEN 1 ELSE 0 END) AS isSuccess,
|
||||
SUM(CASE WHEN (`method` = 'get' AND `status`!= 2 ) OR ( `method` = 'use' AND `status`!= 3 ) THEN 1 ELSE 0 END) AS isFail
|
||||
FROM
|
||||
tb_shop_share_record
|
||||
WHERE
|
||||
share_id = #{shareId}
|
||||
AND invited_id = #{invitedId}
|
||||
ORDER BY
|
||||
create_time DESC;
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryIsSuccess" resultMap="TbShopShareRecordMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_share_record
|
||||
where
|
||||
share_id = #{shareId}
|
||||
and invited_id = #{invitedId}
|
||||
and (`method` = 'get' and status = 2 )
|
||||
or (`method` = 'use' and status = 3 )
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="queryIsNoSuccess" resultMap="TbShopShareRecordMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
|
||||
from tb_shop_share_record
|
||||
where
|
||||
share_id = #{shareId}
|
||||
and invited_id = #{invitedId}
|
||||
and (`method` = 'get' and status != 2 )
|
||||
or (`method` = 'use' and status != 3 )
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
|
||||
Reference in New Issue
Block a user