|
@@ -4,12 +4,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.qw.mapper.QwRestrictionPushRecordMapper">
|
|
<mapper namespace="com.fs.qw.mapper.QwRestrictionPushRecordMapper">
|
|
|
<insert id="insertPushTokenTotal">
|
|
<insert id="insertPushTokenTotal">
|
|
|
- insert into fastgpt_push_token_total(type,qw_user_id,company_id,status,stat_time,count)
|
|
|
|
|
- values(#{type},#{qwUserId},#{companyId},#{status},#{statTime},#{count})
|
|
|
|
|
|
|
+ insert into fastgpt_push_token_total(type,qw_user_id,company_id,status,stat_time,count,amount)
|
|
|
|
|
+ values(#{type},#{qwUserId},#{companyId},#{status},#{statTime},#{count},#{amount})
|
|
|
</insert>
|
|
</insert>
|
|
|
<update id="updatePushTokenTotal">
|
|
<update id="updatePushTokenTotal">
|
|
|
update fastgpt_push_token_total
|
|
update fastgpt_push_token_total
|
|
|
- set count=#{count}
|
|
|
|
|
|
|
+ set count=#{count},amount=#{amount}
|
|
|
where id=#{id}
|
|
where id=#{id}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
@@ -22,12 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectFastGptPushTokenTotalByInfo" resultType="com.fs.fastGpt.domain.FastGptPushTokenTotal">
|
|
<select id="selectFastGptPushTokenTotalByInfo" resultType="com.fs.fastGpt.domain.FastGptPushTokenTotal">
|
|
|
- select id,type,qw_user_id as qwUserId,company_id as companyId,status,stat_time statTime,count
|
|
|
|
|
|
|
+ select id,type,qw_user_id as qwUserId,company_id as companyId,status,stat_time statTime,count,amount
|
|
|
from fastgpt_push_token_total
|
|
from fastgpt_push_token_total
|
|
|
where type=#{type} and qw_user_id=#{qwUserId} and company_id=#{companyId} and status=#{status} and stat_time=#{statTime}
|
|
where type=#{type} and qw_user_id=#{qwUserId} and company_id=#{companyId} and status=#{status} and stat_time=#{statTime}
|
|
|
</select>
|
|
</select>
|
|
|
<select id="selectFastGptPushTokenTotalList" resultType="com.fs.fastGpt.domain.FastGptPushTokenTotal">
|
|
<select id="selectFastGptPushTokenTotalList" resultType="com.fs.fastGpt.domain.FastGptPushTokenTotal">
|
|
|
- select ft.id,ft.type,ft.qw_user_id as qwUserId,ft.company_id as companyId,com.company_name as companyName,ft.status,ft.stat_time statTime,sum(ft.count) count
|
|
|
|
|
|
|
+ select ft.id,ft.type,ft.qw_user_id as qwUserId,ft.company_id as companyId,com.company_name as companyName,ft.status,ft.stat_time statTime,sum(ft.count) count,sum(ft.amount) amount
|
|
|
from fastgpt_push_token_total ft left join company com on ft.company_id= com.company_id
|
|
from fastgpt_push_token_total ft left join company com on ft.company_id= com.company_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="type != null" >and `ft.type` = #{type} </if>
|
|
<if test="type != null" >and `ft.type` = #{type} </if>
|
|
@@ -40,5 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
group by ft.company_id,ft.stat_time
|
|
group by ft.company_id,ft.stat_time
|
|
|
|
|
+ order by ft.stat_time desc
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|