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

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

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

@ -29,6 +29,7 @@ public interface LarkLoginLogMapper
*/ */
public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog); public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog);
public Integer count(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()); larkLoginLog.setFlag(FlagStatus.OK.getCode());
Integer totalClickQty = larkLoginLogMapper.count(larkLoginLog); Integer totalClickQty = larkLoginLogMapper.count(larkLoginLog);
larkActiveCountVo.setTotalClickQty(totalClickQty); larkActiveCountVo.setTotalClickQty(totalClickQty);
Integer totalUserQty = larkLoginLogMapper.distinctCount(larkLoginLog);
larkActiveCountVo.setTotalUserQty(totalUserQty);
//总用户量 //总用户量
LarkUserActiveRelatoin larkUserActiveRelatoin = new LarkUserActiveRelatoin(); LarkUserActiveRelatoin larkUserActiveRelatoin = new LarkUserActiveRelatoin();
larkUserActiveRelatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode()); larkUserActiveRelatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode());
larkUserActiveRelatoin.setFlag(FlagStatus.OK.getCode()); larkUserActiveRelatoin.setFlag(FlagStatus.OK.getCode());
int userCount = larkUserActiveRelatoinMapper.queryUserCount(larkUserActiveRelatoin); int userCount = larkUserActiveRelatoinMapper.queryUserCount(larkUserActiveRelatoin);
larkActiveCountVo.setTotalUserQty(userCount); larkActiveCountVo.setTotalUserActiveQty(userCount);
//每个活动的数量 //每个活动的数量
LarkActive query = new LarkActive(); LarkActive query = new LarkActive();
query.setFlag(FlagStatus.OK.getCode()); query.setFlag(FlagStatus.OK.getCode());

@ -1,58 +1,95 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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.ruoyi.flyingbook.mapper.LarkLoginLogMapper"> <mapper namespace="com.ruoyi.flyingbook.mapper.LarkLoginLogMapper">
<resultMap type="com.ruoyi.flyingbook.domain.LarkLoginLog" id="LarkLoginLogResult"> <resultMap type="com.ruoyi.flyingbook.domain.LarkLoginLog" id="LarkLoginLogResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="openId" column="open_id" /> <result property="openId" column="open_id"/>
<result property="companyName" column="company_name" /> <result property="companyName" column="company_name"/>
<result property="userName" column="user_name" /> <result property="userName" column="user_name"/>
<result property="imageUrl" column="image_url" /> <result property="imageUrl" column="image_url"/>
<result property="type" column="type" /> <result property="type" column="type"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
<result property="flag" column="flag" /> <result property="flag" column="flag"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
</resultMap> </resultMap>
<sql id="selectLarkLoginLogVo"> <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> </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"/> <include refid="selectLarkLoginLogVo"/>
<where> <where>
<if test="openId != null "> and open_id = #{openId}</if> <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 test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if> '%')
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if> </if>
<if test="type != null and type != ''"> and type = #{type}</if> <if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
<if test="flag != null "> and flag = #{flag}</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> </where>
</select> </select>
<select id="count" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer"> <select id="count" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
select count(id) from lark_login_log select count(id) from lark_login_log
<where> <where>
<if test="openId != null "> and open_id = #{openId}</if> <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 test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if> '%')
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if> </if>
<if test="type != null and type != ''"> and type = #{type}</if> <if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
<if test="flag != null "> and flag = #{flag}</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> </where>
) as temp
</select> </select>
<select id="selectLarkLoginLogById" parameterType="Long" resultMap="LarkLoginLogResult"> <select id="selectLarkLoginLogById" parameterType="Long" resultMap="LarkLoginLogResult">
<include refid="selectLarkLoginLogVo"/> <include refid="selectLarkLoginLogVo"/>
where id = #{id} where id = #{id}
</select> </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 insert into lark_login_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="openId != null">open_id,</if> <if test="openId != null">open_id,</if>
@ -66,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="flag != null">flag,</if> <if test="flag != null">flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="openId != null">#{openId},</if> <if test="openId != null">#{openId},</if>
<if test="companyName != null">#{companyName},</if> <if test="companyName != null">#{companyName},</if>
@ -79,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="flag != null">#{flag},</if> <if test="flag != null">#{flag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
</trim> </trim>
</insert> </insert>
<update id="updateLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog"> <update id="updateLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog">
@ -101,11 +138,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteLarkLoginLogById" parameterType="Long"> <delete id="deleteLarkLoginLogById" parameterType="Long">
delete from lark_login_log where id = #{id} delete
from lark_login_log
where id = #{id}
</delete> </delete>
<delete id="deleteLarkLoginLogByIds" parameterType="String"> <delete id="deleteLarkLoginLogByIds" parameterType="String">
delete from lark_login_log where id in delete from lark_login_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

Loading…
Cancel
Save