parent
0f9b8f03f9
commit
76024840b2
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 机器人模板
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum ConfigurationSubTypeEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
REMINDER_BEFORE("REMINDER_BEFORE", "发生前提醒"),
|
||||
REMINDER_AFTER("REMINDER_AFTER", "发生后提醒"),
|
||||
REMINDER_AROUND("REMINDER_AROUND", "发生前后提醒");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
ConfigurationSubTypeEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public static ConfigurationSubTypeEnum getByCode(String code){
|
||||
for (ConfigurationSubTypeEnum value : ConfigurationSubTypeEnum.values()) {
|
||||
if (value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 机器人模板
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum ConfigurationTypeEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SCHEDULE_REMINDER("SCHEDULE_REMINDER", "定时提醒配置");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
ConfigurationTypeEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 机器人模板
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum TemplateSubTypeEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
TEXT("text", "文本文档");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
TemplateSubTypeEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public static TemplateSubTypeEnum getByCode(String code){
|
||||
for (TemplateSubTypeEnum value : TemplateSubTypeEnum.values()) {
|
||||
if (value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 机器人模板
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum TemplateTypeEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
SCHEDULED_REMINDER("SCHEDULED_REMINDER", "定时提醒");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
TemplateTypeEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
/**
|
||||
* 时间单位
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum TimeUnitEnum {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
YEAR("YEAR", "年"),
|
||||
MONTH("MONTH", "月"),
|
||||
DAY("DAY", "日"),
|
||||
HOUR("HOUR", "时"),
|
||||
MINUTE("MINUTE", "分"),
|
||||
SECOND("SECOND", "秒");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
TimeUnitEnum(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public static TimeUnitEnum getByCode(String code){
|
||||
for (TimeUnitEnum value : TimeUnitEnum.values()) {
|
||||
if (value.getCode().equals(code)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.ruoyi.flyingbook.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Data
|
||||
public class LarkTableConfiguration extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
/**
|
||||
* 飞书多维表的id
|
||||
*/
|
||||
private Long larkTableId;
|
||||
|
||||
/**
|
||||
* 配置类型
|
||||
* @see com.ruoyi.common.enums.ConfigurationTypeEnum
|
||||
*/
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置类型子类
|
||||
* @see com.ruoyi.common.enums.ConfigurationSubTypeEnum
|
||||
*/
|
||||
private String subConfigType;
|
||||
|
||||
private String param1;
|
||||
private String param2;
|
||||
private String param3;
|
||||
private String param4;
|
||||
private Long flag;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.ruoyi.flyingbook.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Data
|
||||
public class LarkTemplate extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 飞书多维表的id
|
||||
*/
|
||||
private Long larkTableId;
|
||||
|
||||
/**
|
||||
* 模板类型
|
||||
* @see com.ruoyi.common.enums.TemplateTypeEnum
|
||||
*/
|
||||
private String templateType;
|
||||
|
||||
/**
|
||||
* 模板类型子类
|
||||
* @see com.ruoyi.common.enums.TemplateSubTypeEnum
|
||||
*/
|
||||
private String subTemplateType;
|
||||
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String templateContent;
|
||||
|
||||
private Long flag;
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.flyingbook.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkTableConfiguration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface LarkTableConfigurationMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkTableConfiguration selectLarkTableConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkTableConfiguration> selectLarkTableConfigurationList(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTableConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTableConfigurationByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.flyingbook.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface LarkTemplateMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkTemplate selectLarkTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkTemplate> selectLarkTemplateList(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkTemplate(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkTemplate(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTemplateByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.flyingbook.service;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkTableConfiguration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface ILarkTableConfigurationService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkTableConfiguration selectLarkTableConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkTableConfiguration> selectLarkTableConfigurationList(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTableConfigurationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTableConfigurationById(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.flyingbook.service;
|
||||
|
||||
|
||||
import com.ruoyi.flyingbook.domain.LarkTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
public interface ILarkTemplateService {
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LarkTemplate selectLarkTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LarkTemplate> selectLarkTemplateList(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLarkTemplate(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLarkTemplate(LarkTemplate larkTemplate);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTemplateByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLarkTemplateById(Long id);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.flyingbook.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.flyingbook.domain.LarkTableConfiguration;
|
||||
import com.ruoyi.flyingbook.mapper.LarkTableConfigurationMapper;
|
||||
import com.ruoyi.flyingbook.service.ILarkTableConfigurationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
public class LarkTableConfigurationServiceImpl implements ILarkTableConfigurationService
|
||||
{
|
||||
@Autowired
|
||||
private LarkTableConfigurationMapper larkTableConfigurationMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public LarkTableConfiguration selectLarkTableConfigurationById(Long id)
|
||||
{
|
||||
return larkTableConfigurationMapper.selectLarkTableConfigurationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<LarkTableConfiguration> selectLarkTableConfigurationList(LarkTableConfiguration larkTableConfiguration)
|
||||
{
|
||||
return larkTableConfigurationMapper.selectLarkTableConfigurationList(larkTableConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration)
|
||||
{
|
||||
larkTableConfiguration.setCreateTime(DateUtils.getNowDate());
|
||||
return larkTableConfigurationMapper.insertLarkTableConfiguration(larkTableConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTableConfiguration 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateLarkTableConfiguration(LarkTableConfiguration larkTableConfiguration)
|
||||
{
|
||||
larkTableConfiguration.setUpdateTime(DateUtils.getNowDate());
|
||||
return larkTableConfigurationMapper.updateLarkTableConfiguration(larkTableConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkTableConfigurationByIds(Long[] ids)
|
||||
{
|
||||
return larkTableConfigurationMapper.deleteLarkTableConfigurationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkTableConfigurationById(Long id)
|
||||
{
|
||||
return larkTableConfigurationMapper.deleteLarkTableConfigurationById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.flyingbook.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.flyingbook.domain.LarkTemplate;
|
||||
import com.ruoyi.flyingbook.mapper.LarkTemplateMapper;
|
||||
import com.ruoyi.flyingbook.service.ILarkTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-20
|
||||
*/
|
||||
@Service
|
||||
public class LarkTemplateServiceImpl implements ILarkTemplateService
|
||||
{
|
||||
@Autowired
|
||||
private LarkTemplateMapper larkTemplateMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public LarkTemplate selectLarkTemplateById(Long id)
|
||||
{
|
||||
return larkTemplateMapper.selectLarkTemplateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<LarkTemplate> selectLarkTemplateList(LarkTemplate larkTemplate)
|
||||
{
|
||||
return larkTemplateMapper.selectLarkTemplateList(larkTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertLarkTemplate(LarkTemplate larkTemplate)
|
||||
{
|
||||
larkTemplate.setCreateTime(DateUtils.getNowDate());
|
||||
return larkTemplateMapper.insertLarkTemplate(larkTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param larkTemplate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateLarkTemplate(LarkTemplate larkTemplate)
|
||||
{
|
||||
larkTemplate.setUpdateTime(DateUtils.getNowDate());
|
||||
return larkTemplateMapper.updateLarkTemplate(larkTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkTemplateByIds(Long[] ids)
|
||||
{
|
||||
return larkTemplateMapper.deleteLarkTemplateByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLarkTemplateById(Long id)
|
||||
{
|
||||
return larkTemplateMapper.deleteLarkTemplateById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<?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.LarkTableConfigurationMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.flyingbook.domain.LarkTableConfiguration" id="LarkTableConfigurationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="larkTableId" column="lark_table_id" />
|
||||
<result property="configType" column="config_type" />
|
||||
<result property="subConfigType" column="sub_config_type" />
|
||||
<result property="param1" column="param1" />
|
||||
<result property="param2" column="param2" />
|
||||
<result property="param3" column="param3" />
|
||||
<result property="param4" column="param4" />
|
||||
<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="selectLarkTableConfigurationVo">
|
||||
select id, lark_table_id, config_type, sub_config_type, param1, param2, param3, param4, create_by, create_time, update_by, update_time, flag, remark from lark_table_configuration
|
||||
</sql>
|
||||
|
||||
<select id="selectLarkTableConfigurationList" parameterType="com.ruoyi.flyingbook.domain.LarkTableConfiguration" resultMap="LarkTableConfigurationResult">
|
||||
<include refid="selectLarkTableConfigurationVo"/>
|
||||
<where>
|
||||
<if test="larkTableId != null "> and lark_table_id = #{larkTableId}</if>
|
||||
<if test="configType != null and configType != ''"> and config_type = #{configType}</if>
|
||||
<if test="subConfigType != null and subConfigType != ''"> and sub_config_type = #{subConfigType}</if>
|
||||
<if test="param1 != null and param1 != ''"> and param1 = #{param1}</if>
|
||||
<if test="param2 != null and param2 != ''"> and param2 = #{param2}</if>
|
||||
<if test="param3 != null and param3 != ''"> and param3 = #{param3}</if>
|
||||
<if test="param4 != null and param4 != ''"> and param4 = #{param4}</if>
|
||||
<if test="flag != null "> and flag = #{flag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLarkTableConfigurationById" parameterType="Long" resultMap="LarkTableConfigurationResult">
|
||||
<include refid="selectLarkTableConfigurationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLarkTableConfiguration" parameterType="com.ruoyi.flyingbook.domain.LarkTableConfiguration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into lark_table_configuration
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="larkTableId != null">lark_table_id,</if>
|
||||
<if test="configType != null and configType != ''">config_type,</if>
|
||||
<if test="subConfigType != null and subConfigType != ''">sub_config_type,</if>
|
||||
<if test="param1 != null">param1,</if>
|
||||
<if test="param2 != null">param2,</if>
|
||||
<if test="param3 != null">param3,</if>
|
||||
<if test="param4 != null">param4,</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="larkTableId != null">#{larkTableId},</if>
|
||||
<if test="configType != null and configType != ''">#{configType},</if>
|
||||
<if test="subConfigType != null and subConfigType != ''">#{subConfigType},</if>
|
||||
<if test="param1 != null">#{param1},</if>
|
||||
<if test="param2 != null">#{param2},</if>
|
||||
<if test="param3 != null">#{param3},</if>
|
||||
<if test="param4 != null">#{param4},</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="updateLarkTableConfiguration" parameterType="com.ruoyi.flyingbook.domain.LarkTableConfiguration">
|
||||
update lark_table_configuration
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="larkTableId != null">lark_table_id = #{larkTableId},</if>
|
||||
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
||||
<if test="subConfigType != null and subConfigType != ''">sub_config_type = #{subConfigType},</if>
|
||||
<if test="param1 != null">param1 = #{param1},</if>
|
||||
<if test="param2 != null">param2 = #{param2},</if>
|
||||
<if test="param3 != null">param3 = #{param3},</if>
|
||||
<if test="param4 != null">param4 = #{param4},</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="deleteLarkTableConfigurationById" parameterType="Long">
|
||||
delete from lark_table_configuration where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteLarkTableConfigurationByIds" parameterType="String">
|
||||
delete from lark_table_configuration where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,96 @@
|
||||
<?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.LarkTemplateMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.flyingbook.domain.LarkTemplate" id="LarkTemplateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="larkTableId" column="lark_table_id" />
|
||||
<result property="templateTypeEnum" column="template_type" />
|
||||
<result property="subTemplateType" column="sub_template_type" />
|
||||
<result property="templateContent" column="template_content" />
|
||||
<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="selectLarkTemplateVo">
|
||||
select id, lark_table_id, template_type, sub_template_type, template_content, create_by, create_time, update_by, update_time, flag, remark from lark_template
|
||||
</sql>
|
||||
|
||||
<select id="selectLarkTemplateList" parameterType="com.ruoyi.flyingbook.domain.LarkTemplate" resultMap="LarkTemplateResult">
|
||||
<include refid="selectLarkTemplateVo"/>
|
||||
<where>
|
||||
<if test="larkTableId != null "> and lark_table_id = #{larkTableId}</if>
|
||||
<if test="templateTypeEnum != null and templateTypeEnum != ''"> and template_type = #{templateTypeEnum}</if>
|
||||
<if test="subTemplateType != null and subTemplateType != ''"> and sub_template_type = #{subTemplateType}</if>
|
||||
<if test="templateContent != null and templateContent != ''"> and template_content = #{templateContent}</if>
|
||||
<if test="flag != null "> and flag = #{flag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLarkTemplateById" parameterType="Long" resultMap="LarkTemplateResult">
|
||||
<include refid="selectLarkTemplateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLarkTemplate" parameterType="com.ruoyi.flyingbook.domain.LarkTemplate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into lark_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="larkTableId != null">lark_table_id,</if>
|
||||
<if test="templateTypeEnum != null and templateTypeEnum != ''">template_type,</if>
|
||||
<if test="subTemplateType != null and subTemplateType != ''">sub_template_type,</if>
|
||||
<if test="templateContent != null">template_content,</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="larkTableId != null">#{larkTableId},</if>
|
||||
<if test="templateTypeEnum != null and templateTypeEnum != ''">#{templateTypeEnum},</if>
|
||||
<if test="subTemplateType != null and subTemplateType != ''">#{subTemplateType},</if>
|
||||
<if test="templateContent != null">#{templateContent},</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="updateLarkTemplate" parameterType="com.ruoyi.flyingbook.domain.LarkTemplate">
|
||||
update lark_template
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="larkTableId != null">lark_table_id = #{larkTableId},</if>
|
||||
<if test="templateTypeEnum != null and templateTypeEnum != ''">template_type = #{templateTypeEnum},</if>
|
||||
<if test="subTemplateType != null and subTemplateType != ''">sub_template_type = #{subTemplateType},</if>
|
||||
<if test="templateContent != null">template_content = #{templateContent},</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="deleteLarkTemplateById" parameterType="Long">
|
||||
delete from lark_template where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteLarkTemplateByIds" parameterType="String">
|
||||
delete from lark_template where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue