增加导出数量
continuous-integration/drone/push Build is passing Details

飞书小程序
YXY 1 year ago
parent 4f7b812d08
commit cabc1e5023

@ -23,6 +23,9 @@ public class LarkActiveCountVo {
@ExcelProperty("总用户量")
private Integer totalUserQty = 0;
@ColumnWidth(20)
@ExcelProperty("总活跃用户量")
private Integer totalUserActiveQty = 0;
@ColumnWidth(20)
@ExcelProperty("MOOC 课程")
private Integer moccQty = 0;
@ColumnWidth(20)

@ -29,6 +29,7 @@ public interface LarkLoginLogMapper
*/
public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog);
public Integer count(LarkLoginLog larkLoginLog);
public Integer distinctCount(LarkLoginLog larkLoginLog);
/**
*

@ -78,12 +78,14 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
larkLoginLog.setFlag(FlagStatus.OK.getCode());
Integer totalClickQty = larkLoginLogMapper.count(larkLoginLog);
larkActiveCountVo.setTotalClickQty(totalClickQty);
Integer totalUserQty = larkLoginLogMapper.distinctCount(larkLoginLog);
larkActiveCountVo.setTotalUserQty(totalUserQty);
//总用户量
LarkUserActiveRelatoin larkUserActiveRelatoin = new LarkUserActiveRelatoin();
larkUserActiveRelatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode());
larkUserActiveRelatoin.setFlag(FlagStatus.OK.getCode());
int userCount = larkUserActiveRelatoinMapper.queryUserCount(larkUserActiveRelatoin);
larkActiveCountVo.setTotalUserQty(userCount);
larkActiveCountVo.setTotalUserActiveQty(userCount);
//每个活动的数量
LarkActive query = new LarkActive();
query.setFlag(FlagStatus.OK.getCode());

@ -20,14 +20,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectLarkLoginLogVo">
select id, open_id, company_name, user_name, image_url, type, create_by, create_time, update_by, update_time, flag, remark from lark_login_log
select id,
open_id,
company_name,
user_name,
image_url,
type,
create_by,
create_time,
update_by,
update_time,
flag,
remark
from lark_login_log
</sql>
<select id="selectLarkLoginLogList" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultMap="LarkLoginLogResult">
<select id="selectLarkLoginLogList" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog"
resultMap="LarkLoginLogResult">
<include refid="selectLarkLoginLogVo"/>
<where>
<if test="openId != null ">and open_id = #{openId}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName},
'%')
</if>
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
<if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
<if test="type != null and type != ''">and type = #{type}</if>
@ -39,20 +54,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(id) from lark_login_log
<where>
<if test="openId != null ">and open_id = #{openId}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="companyName != null and companyName != ''">and company_name like concat('%', #{companyName},
'%')
</if>
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
<if test="imageUrl != null and imageUrl != ''">and image_url = #{imageUrl}</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="flag != null ">and flag = #{flag}</if>
</where>
</select>
<select id="distinctCount" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
SELECT COUNT(temp.id) AS total_count
FROM(
select DISTINCT log.id from lark_login_log log
<where>
<if test="openId != null ">
and log.open_id = #{openId}
</if>
<if test="companyName != null and companyName != ''">and log.company_name likeconcat('%', #{companyName},
'%')
</if>
<if
test="userName != null and userName != ''">and log.user_name likeconcat('%', #{userName}, '%')
</if>
<if test="type != null and type != ''">and log.type = #{type}</if>
<if test="flag != null ">and log.flag = #{flag}</if>
</where>
) as temp
</select>
<select id="selectLarkLoginLogById" parameterType="Long" resultMap="LarkLoginLogResult">
<include refid="selectLarkLoginLogVo"/>
where id = #{id}
</select>
<insert id="insertLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" useGeneratedKeys="true" keyProperty="id">
<insert id="insertLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" useGeneratedKeys="true"
keyProperty="id">
insert into lark_login_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="openId != null">open_id,</if>
@ -101,7 +138,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteLarkLoginLogById" parameterType="Long">
delete from lark_login_log where id = #{id}
delete
from lark_login_log
where id = #{id}
</delete>
<delete id="deleteLarkLoginLogByIds" parameterType="String">

Loading…
Cancel
Save