联调
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6a014a19d0
commit
a22ea3bcf7
@ -0,0 +1,44 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 飞书活动类型
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum LarkActiveEnum {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
MOOC("MOOC", "MOOC"),
|
||||
FUN_KNOWLEDGE("FunKnowledge", "知识竞赛"),
|
||||
NITPICK("Nitpick", "信息安全找茬活动"),
|
||||
VIDEO("Video", "看信息安全通识视频"),
|
||||
AI("AI", "AI应用创意畅想"),
|
||||
INFORMATION_SECURITY("InformationSecurity", "信息安全风险提报");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
LarkActiveEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public static LarkActiveEnum getByCode(String code){
|
||||
for (LarkActiveEnum value : LarkActiveEnum.values()) {
|
||||
if (value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 飞书活动类型
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum LarkUserTypeEnum {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
LARK_APP("LARK_APP", "飞书小程序");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
LarkUserTypeEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
@Slf4j
|
||||
public class ExportUtils {
|
||||
|
||||
@SneakyThrows(UnsupportedEncodingException.class)
|
||||
public static void writeFile(HttpServletResponse response, String fileName) {
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8' '" + fileName + ".xlsx");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.flyingbook.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 lark_login_log
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-08-20
|
||||
*/
|
||||
@Data
|
||||
public class LarkLoginLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 用户唯一id */
|
||||
private String openId;
|
||||
|
||||
/** 公司名称 */
|
||||
private String companyName;
|
||||
|
||||
/** 用户名称 */
|
||||
private String userName;
|
||||
|
||||
/** 用户头像 */
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 登陆人类型
|
||||
* @see com.ruoyi.common.enums.LarkUserTypeEnum
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* @see com.ruoyi.common.enums.FlagStatus
|
||||
*/
|
||||
private Long flag;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.flyingbook.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkLoginLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-08-20
|
||||
*/
|
||||
public interface LarkLoginLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkLoginLog selectLarkLoginLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog);
|
||||
public Integer count(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkLoginLog(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkLoginLog(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkLoginLogById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkLoginLogByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.flyingbook.service;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkLoginLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-08-20
|
||||
*/
|
||||
public interface ILarkLoginLogService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkLoginLog selectLarkLoginLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkLoginLog(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkLoginLog(LarkLoginLog larkLoginLog);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkLoginLogByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkLoginLogById(Long id);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.flyingbook.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.flyingbook.domain.LarkLoginLog;
|
||||
import com.ruoyi.flyingbook.mapper.LarkLoginLogMapper;
|
||||
import com.ruoyi.flyingbook.service.ILarkLoginLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-08-20
|
||||
*/
|
||||
@Service
|
||||
public class LarkLoginLogServiceImpl implements ILarkLoginLogService
|
||||
{
|
||||
@Autowired
|
||||
private LarkLoginLogMapper larkLoginLogMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public LarkLoginLog selectLarkLoginLogById(Long id)
|
||||
{
|
||||
return larkLoginLogMapper.selectLarkLoginLogById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<LarkLoginLog> selectLarkLoginLogList(LarkLoginLog larkLoginLog)
|
||||
{
|
||||
return larkLoginLogMapper.selectLarkLoginLogList(larkLoginLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertLarkLoginLog(LarkLoginLog larkLoginLog)
|
||||
{
|
||||
larkLoginLog.setCreateTime(DateUtils.getNowDate());
|
||||
return larkLoginLogMapper.insertLarkLoginLog(larkLoginLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkLoginLog 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateLarkLoginLog(LarkLoginLog larkLoginLog)
|
||||
{
|
||||
larkLoginLog.setUpdateTime(DateUtils.getNowDate());
|
||||
return larkLoginLogMapper.updateLarkLoginLog(larkLoginLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkLoginLogByIds(Long[] ids)
|
||||
{
|
||||
return larkLoginLogMapper.deleteLarkLoginLogByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkLoginLogById(Long id)
|
||||
{
|
||||
return larkLoginLogMapper.deleteLarkLoginLogById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
<?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.flyingbook.mapper.LarkLoginLogMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.flyingbook.domain.LarkLoginLog" id="LarkLoginLogResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="openId" column="open_id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="imageUrl" column="image_url" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="remark" column="remark" />
|
||||
</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
|
||||
</sql>
|
||||
|
||||
<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="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="count" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog" resultType="java.lang.Integer">
|
||||
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="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="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 into lark_login_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="openId != null">open_id,</if>
|
||||
<if test="companyName != null">company_name,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="imageUrl != null">image_url,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="flag != null">flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="openId != null">#{openId},</if>
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="imageUrl != null">#{imageUrl},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="flag != null">#{flag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateLarkLoginLog" parameterType="com.ruoyi.flyingbook.domain.LarkLoginLog">
|
||||
update lark_login_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="openId != null">open_id = #{openId},</if>
|
||||
<if test="companyName != null">company_name = #{companyName},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="flag != null">flag = #{flag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteLarkLoginLogById" parameterType="Long">
|
||||
delete from lark_login_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteLarkLoginLogByIds" parameterType="String">
|
||||
delete from lark_login_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue