parent
1785e1238b
commit
04bca1e9a1
@ -0,0 +1,20 @@
|
|||||||
|
package com.ruoyi.docking.component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业或者政务自定义定时提醒组件
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/19 9:50
|
||||||
|
*/
|
||||||
|
public interface TimingRemindService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业端要定时新增数据
|
||||||
|
*/
|
||||||
|
void enterpriseTiming(String t, Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政务端要定时新增数据
|
||||||
|
*/
|
||||||
|
void chiefTiming(String t, Long id, String pid);
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.ruoyi.docking.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 智能提醒关联表(SmartDeclaration)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2025-03-31 14:57:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("smart_declaration")
|
||||||
|
@ApiModel(value="智能提醒关联表",description = "智能提醒")
|
||||||
|
public class SmartDeclaration {
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
@ApiModelProperty("Id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="智能提醒id" )
|
||||||
|
private Long smartRemindersId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="1未读 2已读" )
|
||||||
|
private Integer isRead;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="统一社会信用代码" )
|
||||||
|
private String tyshxydm;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="项目id" )
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="提醒时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime alertTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value ="政务用户id" )
|
||||||
|
private Long zwId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.docking.entity.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务和定时提醒关联新增
|
||||||
|
*
|
||||||
|
* @author du
|
||||||
|
* @since 2024/7/18 17:14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class JAddJobSmart {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时提醒id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("定时提醒id")
|
||||||
|
private Long smartId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("定时任务id")
|
||||||
|
private Long jobId;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.ruoyi.docking.entity.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增定期提醒数据
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/31 11:01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SREnterRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒名称")
|
||||||
|
private String rulesName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒对象 1.企业用户 2政务用户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒对象 1.企业用户 2政务用户")
|
||||||
|
private Integer alertRecipients;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime alertTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒分类 1.全局自定义通知 2.申报任务即将结束(企业) 3.项目即将建设完成(政务) 4.项目自定义通知
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒分类 1.全局自定义通知 2.申报任务即将结束(企业) 3.项目即将建设完成(政务) 4.项目自定义通知")
|
||||||
|
private Integer alertType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id 非必传
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("项目id 非必传")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒内容")
|
||||||
|
private String alertContent;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ruoyi.docking.entity.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 智能提醒分页请求类
|
||||||
|
* @author du
|
||||||
|
* @since 2025/3/31 10:33
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SmartRemindersPageRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒名称")
|
||||||
|
private String rulesName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒分类 1.全局自定义通知 2.项目即将结束(企业) 3.项目即将建设完成(政务) 4.项目自定义通知
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("提醒分类 1.全局自定义通知 2.项目即将结束(企业) 3.项目即将建设完成(政务) 4.项目自定义通知")
|
||||||
|
private Integer alertType;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.ruoyi.docking.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.docking.entity.SmartDeclaration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 智能提醒关联表(SmartDeclaration)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2025-03-31 14:57:53
|
||||||
|
*/
|
||||||
|
public interface SmartDeclarationMapper extends BaseMapper<SmartDeclaration> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.ruoyi.docking.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.docking.entity.SmartDeclaration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 智能提醒关联表(SmartDeclaration)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2025-03-31 14:57:57
|
||||||
|
*/
|
||||||
|
public interface SmartDeclarationService extends IService<SmartDeclaration> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.docking.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.docking.mapper.SmartDeclarationMapper;
|
||||||
|
import com.ruoyi.docking.entity.SmartDeclaration;
|
||||||
|
import com.ruoyi.docking.service.SmartDeclarationService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 智能提醒关联表(SmartDeclaration)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2025-03-31 14:57:57
|
||||||
|
*/
|
||||||
|
@Service("smartDeclarationService")
|
||||||
|
public class SmartDeclarationServiceImpl extends ServiceImpl<SmartDeclarationMapper, SmartDeclaration> implements SmartDeclarationService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
<?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.gysl.mapper.EnterpriseMapper">
|
||||||
|
<select id="page" resultType="com.ruoyi.gysl.entity.Enterprise">
|
||||||
|
select * from enterprise
|
||||||
|
<where>
|
||||||
|
<if test="req.xmId != null and req.xmId != ''">
|
||||||
|
AND xm_id = #{req.xmId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
<?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.docking.mapper.SmartDeclarationMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.docking.entity.SmartDeclaration" id="SmartDeclarationMap">
|
||||||
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="smartRemindersId" column="smart_reminders_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="isRead" column="is_read" jdbcType="INTEGER"/>
|
||||||
|
<result property="tyshxydm" column="tyshxydm" jdbcType="VARCHAR"/>
|
||||||
|
<result property="projectId" column="project_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="alertTime" column="alert_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="zwId" column="zw_id" jdbcType="INTEGER"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 批量插入 -->
|
||||||
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into gysl.smart_declaration(smart_reminders_idis_readtyshxydmproject_idalert_timezw_id)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.smartRemindersId}#{entity.isRead}#{entity.tyshxydm}#{entity.projectId}#{entity.alertTime}#{entity.zwId})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<!-- 批量插入或按主键更新 -->
|
||||||
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into gysl.smart_declaration(smart_reminders_idis_readtyshxydmproject_idalert_timezw_id)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.smartRemindersId}#{entity.isRead}#{entity.tyshxydm}#{entity.projectId}#{entity.alertTime}#{entity.zwId})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
smart_reminders_id = values(smart_reminders_id) is_read = values(is_read) tyshxydm = values(tyshxydm) project_id = values(project_id) alert_time = values(alert_time) zw_id = values(zw_id) </insert>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
<?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.docking.mapper.SmartRemindersMapper">
|
||||||
|
<select id="page" resultType="com.ruoyi.docking.entity.SmartReminders">
|
||||||
|
select a.*
|
||||||
|
from smart_reminders a
|
||||||
|
<where>
|
||||||
|
<if test="req.rulesName != null and req.rulesName != '' ">
|
||||||
|
and a.rules_name = #{req.rulesName}
|
||||||
|
</if>
|
||||||
|
<if test="req.alertType != null and req.alertType != '' ">
|
||||||
|
and a.alert_type = #{req.alertType}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by a.create_time desc
|
||||||
|
</select>
|
||||||
|
<insert id="addJobSmart">
|
||||||
|
insert into job_smart (smart_id,job_id) values (#{req.smartId},#{req.jobId})
|
||||||
|
</insert>
|
||||||
|
<select id="selectJobSmart" resultType="com.ruoyi.docking.entity.request.JAddJobSmart">
|
||||||
|
select * from job_smart where smart_id = #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue