重写任务方法,修改统一接口

This commit is contained in:
lvleigang 2024-05-07 09:26:06 +08:00
parent eb781a0db1
commit 52bc8c26ae
35 changed files with 1948 additions and 82 deletions

View File

@ -58,11 +58,17 @@
</properties>
</profile>
<profile>
<id>hclocal</id>
<id>hclocal</id> <!--何灿-->
<properties>
<profile.active>hclocal</profile.active>
</properties>
</profile>
<profile>
<id>llg</id> <!--吕磊钢-->
<properties>
<profile.active>llg</profile.active>
</properties>
</profile>
</profiles>
<build>
<finalName>kangarooDataCenterV3</finalName>

View File

@ -0,0 +1,23 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/apple/Desktop/log/local
ax:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -20,12 +20,12 @@ import java.util.List;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integrationTaskClassificationService")
//@Service(value = "integrationTaskClassificationService")
public class IntegrationTaskClassificationServiceImpl extends BaseService<IntegrationTaskClassificationEntity, String> implements IIntegrationTaskClassificationService {
protected IIntegrationTaskClassificationDao integrationtaskclassificationDao;
@Autowired
//@Autowired
public void setIntegrationTaskClassificationDao(IIntegrationTaskClassificationDao dao) {
this.integrationtaskclassificationDao = dao;
this.dao = dao;

View File

@ -37,7 +37,7 @@ public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<Integra
protected IIntegrationTaskLivingDetailsDao integrationtasklivingdetailsDao;
@Autowired
//@Autowired
private BaseDaoUtilImpl baseDaoUtilImpl;
@Autowired

View File

@ -28,14 +28,14 @@ import java.util.List;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integrationTaskLivingService")
//@Service(value = "integrationTaskLivingService")
public class IntegrationTaskLivingServiceImpl extends BaseService<IntegrationTaskLivingEntity, String> implements IIntegrationTaskLivingService {
protected IIntegrationTaskLivingDao integrationtasklivingDao;
@Autowired
//@Autowired
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
@Autowired
//@Autowired
public void setIntegrationTaskLivingDao(IIntegrationTaskLivingDao dao) {
this.integrationtasklivingDao = dao;
this.dao = dao;

View File

@ -14,12 +14,12 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integration_task_log_detailsService")
//@Service(value = "integration_task_log_detailsService")
public class IntegrationTaskLogDetailServiceImpl extends BaseService<IntegrationTaskLogDetailEntity, String> implements IIntegrationTaskLogDetailService {
protected IIntegrationTaskLogDetailDao integrationtasklogdetailDao;
@Autowired
//@Autowired
public void setIntegrationTaskLogDetailDao(IIntegrationTaskLogDetailDao dao) {
this.integrationtasklogdetailDao = dao;
this.dao = dao;

View File

@ -35,13 +35,13 @@ import java.util.List;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integrationTaskLogService")
//@Service(value = "integrationTaskLogService")
public class IntegrationTaskLogServiceImpl extends BaseService<IntegrationTaskLogEntity, String> implements IIntegrationTaskLogService {
protected IIntegrationTaskLogDao integrationtasklogDao;
@Autowired
//@Autowired
private IIntegrationTaskLogDetailDao integrationTaskLogDetailDao;
@Resource
//@Resource
private HttpServletResponse httpServletResponse;
@Autowired

View File

@ -30,17 +30,17 @@ import java.util.List;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integrationTaskMonitoringService")
//@Service(value = "integrationTaskMonitoringService")
public class IntegrationTaskMonitoringServiceImpl extends BaseService<IntegrationTaskMonitoringEntity, String> implements IIntegrationTaskMonitoringService {
protected IIntegrationTaskMonitoringDao integrationtaskmonitoringDao;
@Autowired
//@Autowired
private IIntegrationTaskDao integrationTaskDao;
@Autowired
//@Autowired
private HttpServletResponse httpServletResponse;
@Autowired
//@Autowired
public void setIntegrationTaskMonitoringDao(IIntegrationTaskMonitoringDao dao) {
this.integrationtaskmonitoringDao = dao;
this.dao = dao;

View File

@ -14,12 +14,12 @@ import com.hzya.frame.basedao.service.impl.BaseService;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integration_task_detailsService")
//@Service(value = "integration_task_detailsService")
public class IntegrationTaskDetailsServiceImpl extends BaseService<IntegrationTaskDetailsEntity, String> implements IIntegrationTaskDetailsService {
protected IIntegrationTaskDetailsDao integrationtaskdetailsDao;
@Autowired
//@Autowired
public void setIntegrationTaskDetailsDao(IIntegrationTaskDetailsDao dao) {
this.integrationtaskdetailsDao = dao;
this.dao = dao;

View File

@ -41,7 +41,7 @@ import java.util.List;
* @author: gjh
* @history: 1.0
*/
@Service(value = "integrationTaskService")
//@Service(value = "integrationTaskService")
public class IntegrationTaskServiceImpl extends BaseService<IntegrationTaskEntity, String> implements IIntegrationTaskService {
public static final String ATONCE = SysEnum.ATONCE.getValue();//执行策略 Y立即执行
public static final String TIMING = SysEnum.TIMING.getValue();//执行策略 N定时
@ -49,18 +49,18 @@ public class IntegrationTaskServiceImpl extends BaseService<IntegrationTaskEntit
public static final String SHUTDOWN = SysEnum.SHUTDOWN.getValue();//任务状态 2关闭
protected IIntegrationTaskDao integrationtaskDao;
Logger logger = LoggerFactory.getLogger(IntegrationTaskServiceImpl.class);
@Autowired
//@Autowired
private IIntegrationTaskDetailsDao integrationTaskDetailsDao;//任务明细
@Autowired
//@Autowired
private IIntegrationTaskMonitoringService integrationTaskMonitoringService;//监控
@Autowired
//@Autowired
private IIntegrationTaskLivingService integrationTaskLivingService;//实例
@Autowired
//@Autowired
private IIntegrationTaskLogService integrationTaskLogService;//日志
@Autowired
//@Autowired
private ApiHandleServiceImpl apiHandleService;
@Autowired
//@Autowired
public void setIntegrationTaskDao(IIntegrationTaskDao dao) {
this.integrationtaskDao = dao;
this.dao = dao;

View File

@ -13,12 +13,12 @@ import org.springframework.stereotype.Service;
* @author xiaoguo
* @since 2023-08-10 14:41:37
*/
@Service("integrationTaskWorkshopDetailsService")
//@Service("integrationTaskWorkshopDetailsService")
public class IntegrationTaskWorkshopDetailsServiceImpl extends BaseService<IntegrationTaskWorkshopDetailsEntity, String> implements IIntegrationTaskWorkshopDetailsService {
private IIntegrationTaskWorkshopDetailsDao integrationTaskWorkshopDetailsDao;
@Autowired
//@Autowired
public void setIntegrationTaskWorkshopDetailsDao(IIntegrationTaskWorkshopDetailsDao dao) {
this.integrationTaskWorkshopDetailsDao = dao;
this.dao = dao;

View File

@ -40,21 +40,21 @@ import java.util.List;
*/
@Service("integrationTaskWorkshopService")
public class IntegrationTaskWorkshopServiceImpl extends BaseService<IntegrationTaskWorkshopEntity, String> implements IIntegrationTaskWorkshopService {
@Resource
//@Resource
private ApiHandleServiceImpl apiHandleService;
@Resource
//@Resource
private IApiReflectionDao apiReflectionDao;
@Resource
//@Resource
private IntegrationTaskMonitoringServiceImpl integrationTaskMonitoringService;
@Resource
//@Resource
private IIntegrationTaskService integrationTaskService;
private IIntegrationTaskWorkshopDao integrationTaskWorkshopDao;
@Resource
//@Resource
private IIntegrationTaskWorkshopDetailsDao detailsDao;
@Autowired
//@Autowired
public void setIntegrationTaskWorkshopDao(IIntegrationTaskWorkshopDao dao) {
this.integrationTaskWorkshopDao = dao;
this.dao = dao;

View File

@ -1,7 +1,10 @@
package com.hzya.frame.sysnew.application.plugin.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* 插件表(SysApplicationPlugin)表服务接口
*
@ -9,4 +12,13 @@ import com.hzya.frame.basedao.service.IBaseService;
* @since 2023-09-22 16:30:03
*/
public interface ISysApplicationPluginService extends IBaseService<SysApplicationPluginEntity, String>{
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用插件列表
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntity(JSONObject jsonObject);
}

View File

@ -1,12 +1,19 @@
package com.hzya.frame.sysnew.application.plugin.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
import com.hzya.frame.sysnew.application.plugin.dao.ISysApplicationPluginDao;
import com.hzya.frame.sysnew.application.plugin.service.ISysApplicationPluginService;
import org.springframework.stereotype.Service;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* 插件表(SysApplicationPlugin)表服务实现类
*
@ -23,4 +30,22 @@ public class SysApplicationPluginServiceImpl extends BaseService<SysApplicationP
this.sysApplicationPluginDao = dao;
this.dao = dao;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用插件列表
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntity(JSONObject jsonObject) {
SysApplicationPluginEntity entity = getData("jsonStr", jsonObject, SysApplicationPluginEntity.class);
if (entity == null) {
entity = new SysApplicationPluginEntity();
}
List<SysApplicationPluginEntity> list = sysApplicationPluginDao.queryByLike(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
}

View File

@ -339,5 +339,12 @@ public interface ISysApplicationService extends IBaseService<SysApplicationEntit
* @return
**/
JsonResultEntity thirdInterfacequeryAppApi(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用列表
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntity(JSONObject jsonObject);
}

View File

@ -45,6 +45,7 @@ import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogPageVo;
import com.hzya.frame.sysnew.popedomInterface.entity.SysPopedomInterfaceEntity;
import com.hzya.frame.sysnew.sysInterface.entity.SysInterfaceEntity;
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
import com.hzya.frame.sysnew.userRoles.entity.SysUserRolesEntity;
import com.hzya.frame.util.AESUtil;
import com.hzya.frame.util.IPHelper;
@ -2136,5 +2137,20 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
List<SysApplicationApiEntity> ids = sysApplicationApiDao.queryBaseName(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", ids);
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询应用列表
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntity(JSONObject jsonObject) {
SysApplicationEntity entity = getData("jsonStr", jsonObject, SysApplicationEntity.class);
if (entity == null) {
entity = new SysApplicationEntity();
}
List<SysApplicationEntity> list = sysApplicationDao.queryByLike(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.sysnew.integtationTask.dao;
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 集成任务(integration_task: table)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:36:03
*/
public interface IIntegrationTaskDao extends IBaseDao<IntegrationTaskEntity, String> {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.sysnew.integtationTask.dao.impl;
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
import com.hzya.frame.sysnew.integtationTask.dao.IIntegrationTaskDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 集成任务(IntegrationTask)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:36:06
*/
@Repository(value = "IntegrationTaskDaoImpl")
public class IntegrationTaskDaoImpl extends MybatisGenericDao<IntegrationTaskEntity, String> implements IIntegrationTaskDao{
}

View File

@ -0,0 +1,116 @@
package com.hzya.frame.sysnew.integtationTask.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 集成任务(IntegrationTask)实体类
*
* @author makejava
* @since 2024-05-06 15:36:08
*/
public class IntegrationTaskEntity extends BaseEntity {
/** 任务编码 */
private String taskCode;
/** 任务名称 */
private String taskName;
/** 任务策略 */
private String taskCron;
/** 任务状态1、启用2、停用 */
private String taskStatus;
/** 应用 */
private String taskApp;
/** 插件 */
private String taskPlugin;
/** 功能介绍/任务描述 */
private String funInfo;
/** 备注 */
private String remark;
/** 执行策略1、立即执行2、定时 */
private String taskRun;
/** 公司id */
private String companyId;
public String getTaskCode() {
return taskCode;
}
public void setTaskCode(String taskCode) {
this.taskCode = taskCode;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public String getTaskCron() {
return taskCron;
}
public void setTaskCron(String taskCron) {
this.taskCron = taskCron;
}
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public String getTaskApp() {
return taskApp;
}
public void setTaskApp(String taskApp) {
this.taskApp = taskApp;
}
public String getTaskPlugin() {
return taskPlugin;
}
public void setTaskPlugin(String taskPlugin) {
this.taskPlugin = taskPlugin;
}
public String getFunInfo() {
return funInfo;
}
public void setFunInfo(String funInfo) {
this.funInfo = funInfo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getTaskRun() {
return taskRun;
}
public void setTaskRun(String taskRun) {
this.taskRun = taskRun;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -0,0 +1,300 @@
<?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.hzya.frame.sysnew.integtationTask.dao.impl.IntegrationTaskDaoImpl">
<resultMap id="get-IntegrationTaskEntity-result" type="com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="taskCode" column="task_code" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskCron" column="task_cron" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="taskApp" column="task_app" jdbcType="VARCHAR"/>
<result property="taskPlugin" column="task_plugin" jdbcType="VARCHAR"/>
<result property="funInfo" column="fun_info" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="taskRun" column="task_run" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "IntegrationTaskEntity_Base_Column_List">
id
,task_code
,task_name
,task_cron
,task_status
,task_app
,task_plugin
,fun_info
,remark
,task_run
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-IntegrationTaskEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity">
select
<include refid="IntegrationTaskEntity_Base_Column_List" />
from integration_task
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskCron != null and taskCron != ''"> and task_cron = #{taskCron} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="taskApp != null and taskApp != ''"> and task_app = #{taskApp} </if>
<if test="taskPlugin != null and taskPlugin != ''"> and task_plugin = #{taskPlugin} </if>
<if test="funInfo != null and funInfo != ''"> and fun_info = #{funInfo} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="taskRun != null and taskRun != ''"> and task_run = #{taskRun} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity">
select count(1) from integration_task
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskCron != null and taskCron != ''"> and task_cron = #{taskCron} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="taskApp != null and taskApp != ''"> and task_app = #{taskApp} </if>
<if test="taskPlugin != null and taskPlugin != ''"> and task_plugin = #{taskPlugin} </if>
<if test="funInfo != null and funInfo != ''"> and fun_info = #{funInfo} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="taskRun != null and taskRun != ''"> and task_run = #{taskRun} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-IntegrationTaskEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity">
select
<include refid="IntegrationTaskEntity_Base_Column_List" />
from integration_task
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="taskCode != null and taskCode != ''"> and task_code like concat('%',#{taskCode},'%') </if>
<if test="taskName != null and taskName != ''"> and task_name like concat('%',#{taskName},'%') </if>
<if test="taskCron != null and taskCron != ''"> and task_cron like concat('%',#{taskCron},'%') </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status like concat('%',#{taskStatus},'%') </if>
<if test="taskApp != null and taskApp != ''"> and task_app like concat('%',#{taskApp},'%') </if>
<if test="taskPlugin != null and taskPlugin != ''"> and task_plugin like concat('%',#{taskPlugin},'%') </if>
<if test="funInfo != null and funInfo != ''"> and fun_info like concat('%',#{funInfo},'%') </if>
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
<if test="taskRun != null and taskRun != ''"> and task_run like concat('%',#{taskRun},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="IntegrationTaskentity_list_or" resultMap="get-IntegrationTaskEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity">
select
<include refid="IntegrationTaskEntity_Base_Column_List" />
from integration_task
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="taskCode != null and taskCode != ''"> or task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> or task_name = #{taskName} </if>
<if test="taskCron != null and taskCron != ''"> or task_cron = #{taskCron} </if>
<if test="taskStatus != null and taskStatus != ''"> or task_status = #{taskStatus} </if>
<if test="taskApp != null and taskApp != ''"> or task_app = #{taskApp} </if>
<if test="taskPlugin != null and taskPlugin != ''"> or task_plugin = #{taskPlugin} </if>
<if test="funInfo != null and funInfo != ''"> or fun_info = #{funInfo} </if>
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
<if test="taskRun != null and taskRun != ''"> or task_run = #{taskRun} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity" keyProperty="id" useGeneratedKeys="true">
insert into integration_task(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="taskCode != null and taskCode != ''"> task_code , </if>
<if test="taskName != null and taskName != ''"> task_name , </if>
<if test="taskCron != null and taskCron != ''"> task_cron , </if>
<if test="taskStatus != null and taskStatus != ''"> task_status , </if>
<if test="taskApp != null and taskApp != ''"> task_app , </if>
<if test="taskPlugin != null and taskPlugin != ''"> task_plugin , </if>
<if test="funInfo != null and funInfo != ''"> fun_info , </if>
<if test="remark != null and remark != ''"> remark , </if>
<if test="taskRun != null and taskRun != ''"> task_run , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="taskCode != null and taskCode != ''"> #{taskCode} ,</if>
<if test="taskName != null and taskName != ''"> #{taskName} ,</if>
<if test="taskCron != null and taskCron != ''"> #{taskCron} ,</if>
<if test="taskStatus != null and taskStatus != ''"> #{taskStatus} ,</if>
<if test="taskApp != null and taskApp != ''"> #{taskApp} ,</if>
<if test="taskPlugin != null and taskPlugin != ''"> #{taskPlugin} ,</if>
<if test="funInfo != null and funInfo != ''"> #{funInfo} ,</if>
<if test="remark != null and remark != ''"> #{remark} ,</if>
<if test="taskRun != null and taskRun != ''"> #{taskRun} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task(task_code, task_name, task_cron, task_status, task_app, task_plugin, fun_info, remark, task_run, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskCode},#{entity.taskName},#{entity.taskCron},#{entity.taskStatus},#{entity.taskApp},#{entity.taskPlugin},#{entity.funInfo},#{entity.remark},#{entity.taskRun},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task(task_code, task_name, task_cron, task_status, task_app, task_plugin, fun_info, remark, task_run, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskCode},#{entity.taskName},#{entity.taskCron},#{entity.taskStatus},#{entity.taskApp},#{entity.taskPlugin},#{entity.funInfo},#{entity.remark},#{entity.taskRun},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
task_code = values(task_code),
task_name = values(task_name),
task_cron = values(task_cron),
task_status = values(task_status),
task_app = values(task_app),
task_plugin = values(task_plugin),
fun_info = values(fun_info),
remark = values(remark),
task_run = values(task_run),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity" >
update integration_task set
<trim suffix="" suffixOverrides=",">
<if test="taskCode != null and taskCode != ''"> task_code = #{taskCode},</if>
<if test="taskName != null and taskName != ''"> task_name = #{taskName},</if>
<if test="taskCron != null and taskCron != ''"> task_cron = #{taskCron},</if>
<if test="taskStatus != null and taskStatus != ''"> task_status = #{taskStatus},</if>
<if test="taskApp != null and taskApp != ''"> task_app = #{taskApp},</if>
<if test="taskPlugin != null and taskPlugin != ''"> task_plugin = #{taskPlugin},</if>
<if test="funInfo != null and funInfo != ''"> fun_info = #{funInfo},</if>
<if test="remark != null and remark != ''"> remark = #{remark},</if>
<if test="taskRun != null and taskRun != ''"> task_run = #{taskRun},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity" >
update integration_task set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity" >
update integration_task set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskCron != null and taskCron != ''"> and task_cron = #{taskCron} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="taskApp != null and taskApp != ''"> and task_app = #{taskApp} </if>
<if test="taskPlugin != null and taskPlugin != ''"> and task_plugin = #{taskPlugin} </if>
<if test="funInfo != null and funInfo != ''"> and fun_info = #{funInfo} </if>
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
<if test="taskRun != null and taskRun != ''"> and task_run = #{taskRun} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from integration_task where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,77 @@
package com.hzya.frame.sysnew.integtationTask.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* 集成任务(IntegrationTask)表服务接口
*
* @author makejava
* @since 2024-05-06 15:36:10
*/
public interface IIntegrationTaskService extends IBaseService<IntegrationTaskEntity, String> {
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务列表分页
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntityPage(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务列表
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 保存任务
* @Date 2:36 下午 2024/3/27
**/
JsonResultEntity saveEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取任务
* @Date 2:36 下午 2024/3/27
**/
JsonResultEntity getEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 修改任务
* @Date 2:37 下午 2024/3/27
**/
JsonResultEntity updateEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 删除任务
* @Date 2:37 下午 2024/3/27
**/
JsonResultEntity deleteEntity(JSONObject jsonObject);
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 启用停用任务
* @Date 2:37 下午 2024/3/27
**/
JsonResultEntity enableDisableEntity(JSONObject jsonObject);
}

View File

@ -0,0 +1,233 @@
package com.hzya.frame.sysnew.integtationTask.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
import com.hzya.frame.sysnew.integtationTask.dao.IIntegrationTaskDao;
import com.hzya.frame.sysnew.integtationTask.service.IIntegrationTaskService;
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
import com.hzya.frame.sysnew.userCompany.entity.SysUserCompanyEntity;
import com.hzya.frame.sysnew.userRoles.entity.SysUserRolesEntity;
import com.hzya.frame.util.AESUtil;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* 集成任务(IntegrationTask)表服务实现类
*
* @author makejava
* @since 2024-05-06 15:36:12
*/
@Service(value = "integrationTaskService")
public class IntegrationTaskServiceImpl extends BaseService<IntegrationTaskEntity, String> implements IIntegrationTaskService {
private IIntegrationTaskDao integrationTaskDao;
@Autowired
public void setIntegrationTaskDao(IIntegrationTaskDao dao) {
this.integrationTaskDao = dao;
this.dao = dao;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务列表分页
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntityPage(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
//判断分页
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
}
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<IntegrationTaskEntity> list = integrationTaskDao.queryByLike(entity);
PageInfo pageInfo = new PageInfo(list);
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务列表
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
entity = new IntegrationTaskEntity();
}
List<IntegrationTaskEntity> list = integrationTaskDao.queryByLike(entity);
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 保存任务
* @Date 2:36 下午 2024/3/27
**/
@Override
public JsonResultEntity saveEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("参数不允许为空");
}
if (entity.getTaskCode() == null || "".equals(entity.getTaskCode())) {
return BaseResult.getFailureMessageEntity("请先输入任务编码");
}
if (entity.getTaskName() == null || "".equals(entity.getTaskName())) {
return BaseResult.getFailureMessageEntity("请先输入任务名称");
}
if (entity.getTaskApp() == null || "".equals(entity.getTaskApp())) {
return BaseResult.getFailureMessageEntity("请先选择应用");
}
if (entity.getTaskPlugin() == null || "".equals(entity.getTaskPlugin())) {
return BaseResult.getFailureMessageEntity("请先选择应用插件");
}
if (!checkIsUse(entity)) {
return BaseResult.getFailureMessageEntity("当前任务编码已存在,请修改");
}
//保存
integrationTaskDao.save(entity);
return BaseResult.getSuccessMessageEntity("保存任务成功", entity);
}
/**
* @param entity
* @return boolean
* @Author lvleigang
* @Description 校验人员是否已经有配置
* @Date 10:00 上午 2024/4/1
**/
private boolean checkIsUse(IntegrationTaskEntity entity) {
IntegrationTaskEntity checkEntity = new IntegrationTaskEntity();
checkEntity.setTaskCode(entity.getTaskCode());
checkEntity.setSts("Y");//启用
if (integrationTaskDao.getCount(checkEntity) > 0) {
return false;
}
return true;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 获取任务
* @Date 2:36 下午 2024/3/27
**/
@Override
public JsonResultEntity getEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("参数不允许为空");
}
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
entity = integrationTaskDao.get(entity.getId());
if (entity == null) {
return BaseResult.getFailureMessageEntity("获取任务失败");
}
return BaseResult.getSuccessMessageEntity("获取任务成功", entity);
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 修改任务
* @Date 2:37 下午 2024/3/27
**/
@Override
public JsonResultEntity updateEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("参数不允许为空");
}
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
if (entity.getTaskCode() == null || "".equals(entity.getTaskCode())) {
return BaseResult.getFailureMessageEntity("请先输入任务编码");
}
if (entity.getTaskName() == null || "".equals(entity.getTaskName())) {
return BaseResult.getFailureMessageEntity("请先输入任务名称");
}
if (entity.getTaskApp() == null || "".equals(entity.getTaskApp())) {
return BaseResult.getFailureMessageEntity("请先选择应用");
}
if (entity.getTaskPlugin() == null || "".equals(entity.getTaskPlugin())) {
return BaseResult.getFailureMessageEntity("请先选择应用插件");
}
entity.setUpdate();
//保存
integrationTaskDao.update(entity);
return BaseResult.getSuccessMessageEntity("修改任务成功");
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 删除任务
* @Date 2:37 下午 2024/3/27
**/
@Override
public JsonResultEntity deleteEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("参数不允许为空");
}
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
entity.setUpdate();
integrationTaskDao.logicRemove(entity);
return BaseResult.getSuccessMessageEntity("删除任务成功");
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 启用停用任务
* @Date 2:37 下午 2024/3/27
**/
@Override
public JsonResultEntity enableDisableEntity(JSONObject jsonObject) {
IntegrationTaskEntity entity = getData("jsonStr", jsonObject, IntegrationTaskEntity.class);
if (entity == null) {
return BaseResult.getFailureMessageEntity("参数不允许为空");
}
if (entity.getId() == null || "".equals(entity.getId())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
if (entity.getTaskStatus() == null || "".equals(entity.getTaskStatus())) {
return BaseResult.getFailureMessageEntity("系统错误");
}
entity.setUpdate();
integrationTaskDao.update(entity);//1启用2停用
if ("1".equals(entity.getTaskStatus())) {
return BaseResult.getSuccessMessageEntity("启用任务成功");
} else {
return BaseResult.getSuccessMessageEntity("停用任务成功");
}
}
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.sysnew.integtationTaskLiving.dao;
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 集成任务-实例(integration_task_living: table)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:37:09
*/
public interface IIntegrationTaskLivingDao extends IBaseDao<IntegrationTaskLivingEntity, String> {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.sysnew.integtationTaskLiving.dao.impl;
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
import com.hzya.frame.sysnew.integtationTaskLiving.dao.IIntegrationTaskLivingDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 集成任务-实例(IntegrationTaskLiving)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:37:09
*/
@Repository(value = "IntegrationTaskLivingDaoImpl")
public class IntegrationTaskLivingDaoImpl extends MybatisGenericDao<IntegrationTaskLivingEntity, String> implements IIntegrationTaskLivingDao{
}

View File

@ -0,0 +1,116 @@
package com.hzya.frame.sysnew.integtationTaskLiving.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 集成任务-实例(IntegrationTaskLiving)实体类
*
* @author makejava
* @since 2024-05-06 15:37:09
*/
public class IntegrationTaskLivingEntity extends BaseEntity {
/** integration_task_id */
private String taskId;
/** 任务编码 */
private String taskCode;
/** 任务名称 */
private String taskName;
/** 任务状态1、执行中2、待执行3、错误 */
private String taskStatus;
/** 上次开始时间 */
private Date oldStartTime;
/** 当前任务开始时间 */
private Date startTime;
/** 结束时间 */
private Date endTime;
/** 耗时 */
private String diffTime;
/** 运行次数 */
private Integer runNum;
/** 公司id */
private String companyId;
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getTaskCode() {
return taskCode;
}
public void setTaskCode(String taskCode) {
this.taskCode = taskCode;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public Date getOldStartTime() {
return oldStartTime;
}
public void setOldStartTime(Date oldStartTime) {
this.oldStartTime = oldStartTime;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getDiffTime() {
return diffTime;
}
public void setDiffTime(String diffTime) {
this.diffTime = diffTime;
}
public Integer getRunNum() {
return runNum;
}
public void setRunNum(Integer runNum) {
this.runNum = runNum;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -0,0 +1,302 @@
<?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.hzya.frame.sysnew.integtationTaskLiving.dao.impl.IntegrationTaskLivingDaoImpl">
<resultMap id="get-IntegrationTaskLivingEntity-result" type="com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
<result property="taskCode" column="task_code" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="oldStartTime" column="old_start_time" jdbcType="TIMESTAMP"/>
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
<result property="diffTime" column="diff_time" jdbcType="VARCHAR"/>
<result property="runNum" column="run_num" jdbcType="INTEGER"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "IntegrationTaskLivingEntity_Base_Column_List">
id
,task_id
,task_code
,task_name
,task_status
,old_start_time
,start_time
,end_time
,diff_time
,run_num
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-IntegrationTaskLivingEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity">
select
<include refid="IntegrationTaskLivingEntity_Base_Column_List" />
from integration_task_living
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="oldStartTime != null"> and old_start_time = #{oldStartTime} </if>
<if test="startTime != null"> and start_time = #{startTime} </if>
<if test="endTime != null"> and end_time = #{endTime} </if>
<if test="diffTime != null and diffTime != ''"> and diff_time = #{diffTime} </if>
<if test="runNum != null"> and run_num = #{runNum} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity">
select count(1) from integration_task_living
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="oldStartTime != null"> and old_start_time = #{oldStartTime} </if>
<if test="startTime != null"> and start_time = #{startTime} </if>
<if test="endTime != null"> and end_time = #{endTime} </if>
<if test="diffTime != null and diffTime != ''"> and diff_time = #{diffTime} </if>
<if test="runNum != null"> and run_num = #{runNum} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-IntegrationTaskLivingEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity">
select
<include refid="IntegrationTaskLivingEntity_Base_Column_List" />
from integration_task_living
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="taskId != null and taskId != ''"> and task_id like concat('%',#{taskId},'%') </if>
<if test="taskCode != null and taskCode != ''"> and task_code like concat('%',#{taskCode},'%') </if>
<if test="taskName != null and taskName != ''"> and task_name like concat('%',#{taskName},'%') </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status like concat('%',#{taskStatus},'%') </if>
<if test="oldStartTime != null"> and old_start_time like concat('%',#{oldStartTime},'%') </if>
<if test="startTime != null"> and start_time like concat('%',#{startTime},'%') </if>
<if test="endTime != null"> and end_time like concat('%',#{endTime},'%') </if>
<if test="diffTime != null and diffTime != ''"> and diff_time like concat('%',#{diffTime},'%') </if>
<if test="runNum != null"> and run_num like concat('%',#{runNum},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="IntegrationTaskLivingentity_list_or" resultMap="get-IntegrationTaskLivingEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity">
select
<include refid="IntegrationTaskLivingEntity_Base_Column_List" />
from integration_task_living
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="taskId != null and taskId != ''"> or task_id = #{taskId} </if>
<if test="taskCode != null and taskCode != ''"> or task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> or task_name = #{taskName} </if>
<if test="taskStatus != null and taskStatus != ''"> or task_status = #{taskStatus} </if>
<if test="oldStartTime != null"> or old_start_time = #{oldStartTime} </if>
<if test="startTime != null"> or start_time = #{startTime} </if>
<if test="endTime != null"> or end_time = #{endTime} </if>
<if test="diffTime != null and diffTime != ''"> or diff_time = #{diffTime} </if>
<if test="runNum != null"> or run_num = #{runNum} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity" keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="taskId != null and taskId != ''"> task_id , </if>
<if test="taskCode != null and taskCode != ''"> task_code , </if>
<if test="taskName != null and taskName != ''"> task_name , </if>
<if test="taskStatus != null and taskStatus != ''"> task_status , </if>
<if test="oldStartTime != null"> old_start_time , </if>
<if test="startTime != null"> start_time , </if>
<if test="endTime != null"> end_time , </if>
<if test="diffTime != null and diffTime != ''"> diff_time , </if>
<if test="runNum != null"> run_num , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="taskId != null and taskId != ''"> #{taskId} ,</if>
<if test="taskCode != null and taskCode != ''"> #{taskCode} ,</if>
<if test="taskName != null and taskName != ''"> #{taskName} ,</if>
<if test="taskStatus != null and taskStatus != ''"> #{taskStatus} ,</if>
<if test="oldStartTime != null"> #{oldStartTime} ,</if>
<if test="startTime != null"> #{startTime} ,</if>
<if test="endTime != null"> #{endTime} ,</if>
<if test="diffTime != null and diffTime != ''"> #{diffTime} ,</if>
<if test="runNum != null"> #{runNum} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_living a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living(task_id, task_code, task_name, task_status, old_start_time, start_time, end_time, diff_time, run_num, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskId},#{entity.taskCode},#{entity.taskName},#{entity.taskStatus},#{entity.oldStartTime},#{entity.startTime},#{entity.endTime},#{entity.diffTime},#{entity.runNum},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living(task_id, task_code, task_name, task_status, old_start_time, start_time, end_time, diff_time, run_num, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskId},#{entity.taskCode},#{entity.taskName},#{entity.taskStatus},#{entity.oldStartTime},#{entity.startTime},#{entity.endTime},#{entity.diffTime},#{entity.runNum},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
task_id = values(task_id),
task_code = values(task_code),
task_name = values(task_name),
task_status = values(task_status),
old_start_time = values(old_start_time),
start_time = values(start_time),
end_time = values(end_time),
diff_time = values(diff_time),
run_num = values(run_num),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity" >
update integration_task_living set
<trim suffix="" suffixOverrides=",">
<if test="taskId != null and taskId != ''"> task_id = #{taskId},</if>
<if test="taskCode != null and taskCode != ''"> task_code = #{taskCode},</if>
<if test="taskName != null and taskName != ''"> task_name = #{taskName},</if>
<if test="taskStatus != null and taskStatus != ''"> task_status = #{taskStatus},</if>
<if test="oldStartTime != null"> old_start_time = #{oldStartTime},</if>
<if test="startTime != null"> start_time = #{startTime},</if>
<if test="endTime != null"> end_time = #{endTime},</if>
<if test="diffTime != null and diffTime != ''"> diff_time = #{diffTime},</if>
<if test="runNum != null"> run_num = #{runNum},</if>
<if test="sorts != null"> sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity" >
update integration_task_living set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity" >
update integration_task_living set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId} </if>
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode} </if>
<if test="taskName != null and taskName != ''"> and task_name = #{taskName} </if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus} </if>
<if test="oldStartTime != null"> and old_start_time = #{oldStartTime} </if>
<if test="startTime != null"> and start_time = #{startTime} </if>
<if test="endTime != null"> and end_time = #{endTime} </if>
<if test="diffTime != null and diffTime != ''"> and diff_time = #{diffTime} </if>
<if test="runNum != null"> and run_num = #{runNum} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from integration_task_living where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,26 @@
package com.hzya.frame.sysnew.integtationTaskLiving.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* 集成任务-实例(IntegrationTaskLiving)表服务接口
*
* @author makejava
* @since 2024-05-06 15:37:09
*/
public interface IIntegrationTaskLivingService extends IBaseService<IntegrationTaskLivingEntity, String>{
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务实例列表分页
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntityPage(JSONObject jsonObject);
}

View File

@ -0,0 +1,55 @@
package com.hzya.frame.sysnew.integtationTaskLiving.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
import com.hzya.frame.sysnew.integtationTaskLiving.dao.IIntegrationTaskLivingDao;
import com.hzya.frame.sysnew.integtationTaskLiving.service.IIntegrationTaskLivingService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* 集成任务-实例(IntegrationTaskLiving)表服务实现类
*
* @author makejava
* @since 2024-05-06 15:37:09
*/
@Service(value = "integrationTaskLivingService")
public class IntegrationTaskLivingServiceImpl extends BaseService<IntegrationTaskLivingEntity, String> implements IIntegrationTaskLivingService {
private IIntegrationTaskLivingDao integrationTaskLivingDao;
@Autowired
public void setIntegrationTaskLivingDao(IIntegrationTaskLivingDao dao) {
this.integrationTaskLivingDao = dao;
this.dao = dao;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务实例列表分页
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntityPage(JSONObject jsonObject) {
IntegrationTaskLivingEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLivingEntity.class);
//判断分页
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
}
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<IntegrationTaskLivingEntity> list = integrationTaskLivingDao.queryByLike(entity);
PageInfo pageInfo = new PageInfo(list);
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
}
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.dao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 集成任务-实例详情(integration_task_living_details: table)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:37:55
*/
public interface IIntegrationTaskLivingDetailsDao extends IBaseDao<IntegrationTaskLivingDetailsEntity, String> {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.impl;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)表数据库访问层
*
* @author makejava
* @since 2024-05-06 15:37:55
*/
@Repository(value = "IntegrationTaskLivingDetailsDaoImpl")
public class IntegrationTaskLivingDetailsDaoImpl extends MybatisGenericDao<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsDao{
}

View File

@ -0,0 +1,106 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)实体类
*
* @author makejava
* @since 2024-05-06 15:37:55
*/
public class IntegrationTaskLivingDetailsEntity extends BaseEntity {
/** 集成任务-实例_id */
private String taskLinvingId;
/** integration_task_id */
private String taskId;
/** 任务编码 */
private String taskCode;
/** 任务名称 */
private String taskName;
/** 任务状态1、执行中2、执行成功 3、执行失败 */
private String taskStatus;
/** 当前任务开始时间 */
private Date startTime;
/** 结束时间 */
private Date endTime;
/** 耗时 */
private String diffTime;
/** 公司id */
private String companyId;
public String getTaskLinvingId() {
return taskLinvingId;
}
public void setTaskLinvingId(String taskLinvingId) {
this.taskLinvingId = taskLinvingId;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getTaskCode() {
return taskCode;
}
public void setTaskCode(String taskCode) {
this.taskCode = taskCode;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getDiffTime() {
return diffTime;
}
public void setDiffTime(String diffTime) {
this.diffTime = diffTime;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}

View File

@ -0,0 +1,316 @@
<?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.hzya.frame.sysnew.integtationTaskLivingDetails.dao.impl.IntegrationTaskLivingDetailsDaoImpl">
<resultMap id="get-IntegrationTaskLivingDetailsEntity-result"
type="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="taskLinvingId" column="task_linving_id" jdbcType="VARCHAR"/>
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
<result property="taskCode" column="task_code" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
<result property="diffTime" column="diff_time" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id="IntegrationTaskLivingDetailsEntity_Base_Column_List">
id
,task_linving_id
,task_id
,task_code
,task_name
,task_status
,start_time
,end_time
,diff_time
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
,company_id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
select
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
from integration_task_living_details
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="taskLinvingId != null and taskLinvingId != ''">and task_linving_id = #{taskLinvingId}</if>
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
<if test="taskCode != null and taskCode != ''">and task_code = #{taskCode}</if>
<if test="taskName != null and taskName != ''">and task_name = #{taskName}</if>
<if test="taskStatus != null and taskStatus != ''">and task_status = #{taskStatus}</if>
<if test="startTime != null">and start_time = #{startTime}</if>
<if test="endTime != null">and end_time = #{endTime}</if>
<if test="diffTime != null and diffTime != ''">and diff_time = #{diffTime}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
select count(1) from integration_task_living_details
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="taskLinvingId != null and taskLinvingId != ''">and task_linving_id = #{taskLinvingId}</if>
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
<if test="taskCode != null and taskCode != ''">and task_code = #{taskCode}</if>
<if test="taskName != null and taskName != ''">and task_name = #{taskName}</if>
<if test="taskStatus != null and taskStatus != ''">and task_status = #{taskStatus}</if>
<if test="startTime != null">and start_time = #{startTime}</if>
<if test="endTime != null">and end_time = #{endTime}</if>
<if test="diffTime != null and diffTime != ''">and diff_time = #{diffTime}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="org_id != null and org_id != ''">and org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
select
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
from integration_task_living_details
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="taskLinvingId != null and taskLinvingId != ''">and task_linving_id like
concat('%',#{taskLinvingId},'%')
</if>
<if test="taskId != null and taskId != ''">and task_id like concat('%',#{taskId},'%')</if>
<if test="taskCode != null and taskCode != ''">and task_code like concat('%',#{taskCode},'%')</if>
<if test="taskName != null and taskName != ''">and task_name like concat('%',#{taskName},'%')</if>
<if test="taskStatus != null and taskStatus != ''">and task_status like concat('%',#{taskStatus},'%')</if>
<if test="startTime != null">and start_time like concat('%',#{startTime},'%')</if>
<if test="endTime != null">and end_time like concat('%',#{endTime},'%')</if>
<if test="diffTime != null and diffTime != ''">and diff_time like concat('%',#{diffTime},'%')</if>
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="org_id != null and org_id != ''">and org_id like concat('%',#{org_id},'%')</if>
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="IntegrationTaskLivingDetailsentity_list_or" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
select
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
from integration_task_living_details
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">or id = #{id}</if>
<if test="taskLinvingId != null and taskLinvingId != ''">or task_linving_id = #{taskLinvingId}</if>
<if test="taskId != null and taskId != ''">or task_id = #{taskId}</if>
<if test="taskCode != null and taskCode != ''">or task_code = #{taskCode}</if>
<if test="taskName != null and taskName != ''">or task_name = #{taskName}</if>
<if test="taskStatus != null and taskStatus != ''">or task_status = #{taskStatus}</if>
<if test="startTime != null">or start_time = #{startTime}</if>
<if test="endTime != null">or end_time = #{endTime}</if>
<if test="diffTime != null and diffTime != ''">or diff_time = #{diffTime}</if>
<if test="sorts != null">or sorts = #{sorts}</if>
<if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="org_id != null and org_id != ''">or org_id = #{org_id}</if>
<if test="companyId != null and companyId != ''">or company_id = #{companyId}</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity"
keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living_details(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
<if test="taskLinvingId != null and taskLinvingId != ''">task_linving_id ,</if>
<if test="taskId != null and taskId != ''">task_id ,</if>
<if test="taskCode != null and taskCode != ''">task_code ,</if>
<if test="taskName != null and taskName != ''">task_name ,</if>
<if test="taskStatus != null and taskStatus != ''">task_status ,</if>
<if test="startTime != null">start_time ,</if>
<if test="endTime != null">end_time ,</if>
<if test="diffTime != null and diffTime != ''">diff_time ,</if>
<if test="sorts != null">sorts ,</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="create_time != null">create_time ,</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="modify_time != null">modify_time ,</if>
<if test="sts != null and sts != ''">sts ,</if>
<if test="org_id != null and org_id != ''">org_id ,</if>
<if test="companyId != null and companyId != ''">company_id ,</if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">#{id} ,</if>
<if test="taskLinvingId != null and taskLinvingId != ''">#{taskLinvingId} ,</if>
<if test="taskId != null and taskId != ''">#{taskId} ,</if>
<if test="taskCode != null and taskCode != ''">#{taskCode} ,</if>
<if test="taskName != null and taskName != ''">#{taskName} ,</if>
<if test="taskStatus != null and taskStatus != ''">#{taskStatus} ,</if>
<if test="startTime != null">#{startTime} ,</if>
<if test="endTime != null">#{endTime} ,</if>
<if test="diffTime != null and diffTime != ''">#{diffTime} ,</if>
<if test="sorts != null">#{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from
integration_task_living_details a WHERE a.sts = 'Y' ),
</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living_details(task_linving_id, task_id, task_code, task_name, task_status,
start_time, end_time, diff_time, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
company_id, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskLinvingId},#{entity.taskId},#{entity.taskCode},#{entity.taskName},#{entity.taskStatus},#{entity.startTime},#{entity.endTime},#{entity.diffTime},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into integration_task_living_details(task_linving_id, task_id, task_code, task_name, task_status,
start_time, end_time, diff_time, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id,
company_id)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskLinvingId},#{entity.taskId},#{entity.taskCode},#{entity.taskName},#{entity.taskStatus},#{entity.startTime},#{entity.endTime},#{entity.diffTime},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
</foreach>
on duplicate key update
task_linving_id = values(task_linving_id),
task_id = values(task_id),
task_code = values(task_code),
task_name = values(task_name),
task_status = values(task_status),
start_time = values(start_time),
end_time = values(end_time),
diff_time = values(diff_time),
sorts = values(sorts),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id)
</insert>
<!--通过主键修改方法-->
<update id="entity_update"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
update integration_task_living_details set
<trim suffix="" suffixOverrides=",">
<if test="taskLinvingId != null and taskLinvingId != ''">task_linving_id = #{taskLinvingId},</if>
<if test="taskId != null and taskId != ''">task_id = #{taskId},</if>
<if test="taskCode != null and taskCode != ''">task_code = #{taskCode},</if>
<if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
<if test="taskStatus != null and taskStatus != ''">task_status = #{taskStatus},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="diffTime != null and diffTime != ''">diff_time = #{diffTime},</if>
<if test="sorts != null">sorts = #{sorts},</if>
<if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="org_id != null and org_id != ''">org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
update integration_task_living_details set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition"
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
update integration_task_living_details set sts= 'N' ,modify_time = #{modify_time},modify_user_id =
#{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<if test="taskLinvingId != null and taskLinvingId != ''">and task_linving_id = #{taskLinvingId}</if>
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
<if test="taskCode != null and taskCode != ''">and task_code = #{taskCode}</if>
<if test="taskName != null and taskName != ''">and task_name = #{taskName}</if>
<if test="taskStatus != null and taskStatus != ''">and task_status = #{taskStatus}</if>
<if test="startTime != null">and start_time = #{startTime}</if>
<if test="endTime != null">and end_time = #{endTime}</if>
<if test="diffTime != null and diffTime != ''">and diff_time = #{diffTime}</if>
<if test="sorts != null">and sorts = #{sorts}</if>
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="companyId != null and companyId != ''">and company_id = #{companyId}</if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from integration_task_living_details where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,25 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.web.entity.JsonResultEntity;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)表服务接口
*
* @author makejava
* @since 2024-05-06 15:37:55
*/
public interface IIntegrationTaskLivingDetailsService extends IBaseService<IntegrationTaskLivingDetailsEntity, String>{
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务列表分页
* @Date 11:52 上午 2024/3/27
**/
JsonResultEntity queryEntityPage(JSONObject jsonObject);
}

View File

@ -0,0 +1,55 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
import java.util.List;
/**
* 集成任务-实例详情(IntegrationTaskLivingDetails)表服务实现类
*
* @author makejava
* @since 2024-05-06 15:37:55
*/
@Service(value = "integrationTaskLivingDetailsService")
public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsService {
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
@Autowired
public void setIntegrationTaskLivingDetailsDao(IIntegrationTaskLivingDetailsDao dao) {
this.integrationTaskLivingDetailsDao = dao;
this.dao = dao;
}
/**
* @param jsonObject
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 查询任务日志列表分页
* @Date 11:52 上午 2024/3/27
**/
@Override
public JsonResultEntity queryEntityPage(JSONObject jsonObject) {
IntegrationTaskLivingDetailsEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLivingDetailsEntity.class);
//判断分页
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
}
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
List<IntegrationTaskLivingDetailsEntity> list = integrationTaskLivingDetailsDao.queryByLike(entity);
PageInfo pageInfo = new PageInfo(list);
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
}
}

View File

@ -268,57 +268,11 @@ public class EntranceServiceImpl implements IEntranceService {
logger.info("当前mnAME:" + m.getName() + " :serviceMethod = " + serviceMethod.trim());
if (null != m) {
if (m.getName().equals(serviceMethod.trim())) {
if (m.getName().startsWith("thirdInterface")) {//TODO 后续可能要加强校验规则
logger.info("第三方接口,不校验是否登陆");
}else if (!"doLogin".equals(m.getName())) {
try {
StpUtil.checkLogin();
//校验当前登陆人是否有权限
boolean flag = false;
String userId = StpUtil.getLoginIdAsString();
//获取接口
SysInterfaceEntity sysInterfaceEntity = (SysInterfaceEntity) interfaceCache.get("6","beanName"+service+"interfacName"+serviceMethod);
if(sysInterfaceEntity == null || sysInterfaceEntity.getId() == null){
//todo 接口权限验证
return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
}
//查询用户权限
if(!flag){
SysPopedomInterfaceEntity userPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("4","userId"+userId+"interfaceId"+sysInterfaceEntity.getId());
if(userPopedomInterfaceEntity != null && userPopedomInterfaceEntity.getId() != null ){
flag = true;
}
}
//查询用户角色的权限
if(!flag){
List<SysUserRolesEntity> userRoleMap = (List<SysUserRolesEntity>) interfaceCache.get("3",null);
if(userRoleMap != null && userRoleMap.size() > 0){
for (SysUserRolesEntity sysUserRolesEntity : userRoleMap) {
if(sysUserRolesEntity.getUserId().equals(userId)){
SysPopedomInterfaceEntity sysPopedomInterfaceEntity = (SysPopedomInterfaceEntity) interfaceCache.get("5","roleId"+sysUserRolesEntity.getRoleId()+"interfaceId"+sysInterfaceEntity.getId());
if(sysPopedomInterfaceEntity != null && sysPopedomInterfaceEntity.getId() != null ){
flag = true;
break;
}
}
}
}
}
if(!flag){
//todo 接口权限验证
return BaseResult.getFailureMessageEntity("用户无访问权限,请联系管理员");
}
} catch (NotLoginException e) {
logger.error("token无效");
return BaseResult.getFailureMessageEntity("token无效");
}
}
logger.info("m.getNameEquals成功");
JSONObject jsonObject = new JSONObject();
if (!ObjectUtils.isEmpty(body)) {
jsonObject.put("jsonStr", body);
}
JsonResultEntity jsonResultEntity;
try {
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
logger.info("请求的参数jsonObject" + jsonObject.toJSONString());