Merge branch 'dev' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into yingdesai
This commit is contained in:
commit
6b50b8295c
|
@ -54,3 +54,9 @@ $RECYCLE.BIN/
|
|||
*.lnk
|
||||
|
||||
/buildpackage/src/main/resources/banner.txt
|
||||
/webapp/target/
|
||||
/service/target/
|
||||
/core/target/
|
||||
/common/target/
|
||||
/buildpackage/target/
|
||||
/webapp/target/
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
root: error
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
datasource:
|
||||
|
@ -16,6 +17,5 @@ spring:
|
|||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /home/webservice/zt/file
|
||||
ax:
|
||||
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -0,0 +1,24 @@
|
|||
package com.hzya.frame.home.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IHomeDao extends IBaseDao<HomeEntity, String> {
|
||||
|
||||
|
||||
List<HomeEntity> getAppErrorNum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> appApiNum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> useApiNum(HomeEntity homeEntity);
|
||||
|
||||
HomeEntity taskNumRun(HomeEntity homeEntity);
|
||||
HomeEntity taskNumStop(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> sevenerrornum(HomeEntity homeEntity);
|
||||
|
||||
List<HomeEntity> sevensuccessnum(HomeEntity homeEntity);
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.hzya.frame.home.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.home.dao.IHomeDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository(value = "HomeDaoImpl")
|
||||
public class HomeDaoImpl extends MybatisGenericDao<HomeEntity, String> implements IHomeDao {
|
||||
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> getAppErrorNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "getAppErrorNum", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> appApiNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "appApiNum", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HomeEntity> useApiNum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "useApiNum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<HomeEntity> sevenerrornum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "sevenerrornum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public List<HomeEntity> sevensuccessnum(HomeEntity entity) {
|
||||
List<HomeEntity> o = (List<HomeEntity>) super.selectList(getSqlIdPrifx() + "sevensuccessnum", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public HomeEntity taskNumRun(HomeEntity entity) {
|
||||
HomeEntity o = (HomeEntity) super.selectOne(getSqlIdPrifx() + "taskNumRun", entity);
|
||||
return o;
|
||||
}
|
||||
@Override
|
||||
public HomeEntity taskNumStop(HomeEntity entity) {
|
||||
HomeEntity o = (HomeEntity) super.selectOne(getSqlIdPrifx() + "taskNumStop", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.hzya.frame.home.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
|
||||
public class HomeEntity extends BaseEntity {
|
||||
//应用id
|
||||
private String appId;
|
||||
|
||||
//应用图标
|
||||
private String path;
|
||||
//
|
||||
private String name;
|
||||
|
||||
//数量
|
||||
private Integer num;
|
||||
//正常数量
|
||||
private Integer normalNum;
|
||||
//异常数量
|
||||
private Integer abnormalNum;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public Integer getNormalNum() {
|
||||
return normalNum;
|
||||
}
|
||||
|
||||
public void setNormalNum(Integer normalNum) {
|
||||
this.normalNum = normalNum;
|
||||
}
|
||||
|
||||
public Integer getAbnormalNum() {
|
||||
return abnormalNum;
|
||||
}
|
||||
|
||||
public void setAbnormalNum(Integer abnormalNum) {
|
||||
this.abnormalNum = abnormalNum;
|
||||
}
|
||||
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<?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.home.dao.impl.HomeDaoImpl">
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="getAppErrorNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
receive_app as appId,
|
||||
count( 1 ) as num
|
||||
FROM
|
||||
sys_message_manage_log
|
||||
WHERE sts = 'Y' and status = '4'
|
||||
GROUP BY
|
||||
receive_app
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="appApiNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
api.app_id as appId,
|
||||
app.app_logo as path,
|
||||
count( 1 ) as num
|
||||
FROM
|
||||
sys_application_api api
|
||||
left join sys_application app on app.id = api.app_id and app.sts = 'Y'
|
||||
WHERE api.sts = 'Y' and api.app_id is not null
|
||||
GROUP BY
|
||||
api.app_id
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="useApiNum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
a.app_id as appId,
|
||||
COUNT( a.api_id ) as normalNum
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
app_id,
|
||||
api_id
|
||||
FROM
|
||||
sys_application_api_auth_detail
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
GROUP BY
|
||||
api_id
|
||||
) a
|
||||
left join sys_application_api api on api.id = a.api_id and api.sts = 'Y'
|
||||
WHERE api.id is not null
|
||||
GROUP BY
|
||||
a.app_id
|
||||
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="taskNumRun" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( 1 ) as normalNum
|
||||
FROM
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND task_status = '1'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="taskNumStop" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( 1 ) as abnormalNum
|
||||
FROM
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND task_status = '2'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="sevenerrornum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( id ) as abnormalNum,
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' ) as name
|
||||
FROM
|
||||
sys_message_manage_log
|
||||
WHERE sts = 'Y' and status = '4' and
|
||||
create_time BETWEEN DATE_SUB( NOW(), INTERVAL 6 DAY ) AND NOW()
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, '%Y%m%d' )
|
||||
ORDER BY
|
||||
DATE_FORMAT(
|
||||
create_time,
|
||||
'%Y%m%d')
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="sevensuccessnum" resultType="com.hzya.frame.home.entity.HomeEntity" parameterType="com.hzya.frame.home.entity.HomeEntity">
|
||||
SELECT
|
||||
count( id ) as normalNum,
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' ) as name
|
||||
FROM
|
||||
sys_message_manage_log_success
|
||||
WHERE sts = 'Y' and status = '3' and
|
||||
create_time BETWEEN DATE_SUB( NOW(), INTERVAL 6 DAY ) AND NOW()
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, '%Y%m%d' )
|
||||
ORDER BY
|
||||
DATE_FORMAT(
|
||||
create_time,
|
||||
'%Y%m%d')
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hzya.frame.home.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IHomeService extends IBaseService<HomeEntity, String> {
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下接口日志表失败的数量(返回应用名称、失败数)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity appErrorNum(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下面api的总数量,以及是否有授权的api数量,(返回应用名称、api总数量、启用数量、停用数量)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity appApiNum(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 查询任务监控表数据(返回任务名称、状态、总数、上次耗时、上次执行时间)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity taskNum(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 统计最近7天内api成功和失败数量
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sevenNum(JSONObject jsonObject);
|
||||
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
package com.hzya.frame.home.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.home.dao.IHomeDao;
|
||||
import com.hzya.frame.home.entity.HomeEntity;
|
||||
import com.hzya.frame.home.service.IHomeService;
|
||||
import com.hzya.frame.sysnew.application.dao.ISysApplicationDao;
|
||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "homeService")
|
||||
public class HomeServiceImpl extends BaseService<HomeEntity, String> implements IHomeService {
|
||||
|
||||
private IHomeDao homeDao;
|
||||
@Resource
|
||||
private ISysApplicationDao sysApplicationDao;
|
||||
@Autowired
|
||||
public void setSysApplicationApiDao(IHomeDao dao) {
|
||||
this.homeDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下接口日志表失败的数量(返回应用名称、失败数)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity appErrorNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> homeEntities = homeDao.getAppErrorNum(homeEntity);
|
||||
if(homeEntities != null && homeEntities.size() > 0){
|
||||
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
|
||||
sysApplicationEntity.setSts("Y");
|
||||
List<SysApplicationEntity> sysApplicationEntities = sysApplicationDao.queryByLike(sysApplicationEntity);
|
||||
if(sysApplicationEntities != null && sysApplicationEntities.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 分组统计应用下面api的总数量,以及是否有授权的api数量,(返回应用名称、api总数量、启用数量、停用数量)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity appApiNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> homeEntities = homeDao.appApiNum(homeEntity);
|
||||
if(homeEntities != null && homeEntities.size() > 0){
|
||||
List<HomeEntity> useApiNum = homeDao.useApiNum(homeEntity);
|
||||
if(useApiNum != null && useApiNum.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < useApiNum.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && useApiNum.get(a).getAppId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setNormalNum(useApiNum.get(a).getNormalNum());
|
||||
homeEntities.get(i).setAbnormalNum(homeEntities.get(i).getNum() - useApiNum.get(a).getNormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SysApplicationEntity sysApplicationEntity = new SysApplicationEntity();
|
||||
sysApplicationEntity.setSts("Y");
|
||||
List<SysApplicationEntity> sysApplicationEntities = sysApplicationDao.queryByLike(sysApplicationEntity);
|
||||
if(sysApplicationEntities != null && sysApplicationEntities.size() > 0){
|
||||
for (int i = 0; i < homeEntities.size(); i++) {
|
||||
for (int a = 0; a < sysApplicationEntities.size(); a++) {
|
||||
if(homeEntities.get(i).getAppId()!= null && sysApplicationEntities.get(a).getId().equals(homeEntities.get(i).getAppId())){
|
||||
homeEntities.get(i).setPath(sysApplicationEntities.get(a).getAppLogo());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 查询任务监控表数据(返回任务名称、状态、总数、上次耗时、上次执行时间)
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity taskNum(JSONObject jsonObject) {
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
HomeEntity runhome = homeDao.taskNumRun(homeEntity);
|
||||
HomeEntity stophome = homeDao.taskNumStop(homeEntity);
|
||||
homeEntity.setNormalNum(runhome.getNormalNum());
|
||||
homeEntity.setAbnormalNum(stophome.getAbnormalNum());
|
||||
homeEntity.setNum(runhome.getNormalNum() + stophome.getAbnormalNum());
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 统计最近7天内api成功和失败数量
|
||||
* @Date 10:17 上午 2024/5/11
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity sevenNum(JSONObject jsonObject) {
|
||||
List<HomeEntity> homeEntities = new ArrayList<>();
|
||||
HomeEntity homeEntity = new HomeEntity();
|
||||
List<HomeEntity> errornum = homeDao.sevenerrornum(homeEntity);
|
||||
List<HomeEntity> successnum = homeDao.sevensuccessnum(homeEntity);
|
||||
for (int i = 6; i >=0; i--) {
|
||||
String date = LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
HomeEntity entity = new HomeEntity();
|
||||
entity.setName(date);
|
||||
entity.setNormalNum(0);
|
||||
entity.setAbnormalNum(0);
|
||||
for (int a = 0; a < errornum.size(); a++) {
|
||||
if(date.equals(errornum.get(a).getName())){
|
||||
entity.setAbnormalNum(errornum.get(a).getAbnormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
for (int a = 0; a < successnum.size(); a++) {
|
||||
if(date.equals(successnum.get(a).getName())){
|
||||
entity.setNormalNum(successnum.get(a).getNormalNum());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
homeEntities.add(entity);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功",homeEntities);
|
||||
}
|
||||
}
|
|
@ -57,6 +57,9 @@ import com.hzya.frame.sys.roleModule.dao.IRoleModuleMapper;
|
|||
import com.hzya.frame.sys.roleModule.entity.RoleModule;
|
||||
import com.hzya.frame.sys.userRole.dao.IUserRoleMapper;
|
||||
import com.hzya.frame.sys.userRole.entity.UserRole;
|
||||
import com.hzya.frame.sysnew.buttonConfig.dao.ISysButtonConfigDao;
|
||||
import com.hzya.frame.sysnew.buttonConfig.entity.SysButtonConfigEntity;
|
||||
import com.hzya.frame.sysnew.menuConfig.dao.ISysMenuConfigDao;
|
||||
import com.hzya.frame.sysnew.menuConfig.entity.SysMenuConfigEntity;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
|
@ -110,7 +113,10 @@ public class MdmServiceImpl implements IMdmService {
|
|||
private IMdmTableCodeRuleDao mdmTableCodeRuleDao;//模版数据表编码规则表
|
||||
@Resource
|
||||
protected IUserRoleMapper userRoleMapper;
|
||||
|
||||
@Resource
|
||||
private ISysMenuConfigDao sysMenuConfigDao;
|
||||
@Resource
|
||||
private ISysButtonConfigDao sysButtonConfigDao;
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
|
@ -968,15 +974,100 @@ public class MdmServiceImpl implements IMdmService {
|
|||
//新增菜单
|
||||
SysMenuConfigEntity module = new SysMenuConfigEntity();
|
||||
module.setCreate();
|
||||
module.setFormId(entity.getId());
|
||||
module.setParentMenuId("ea22757e99c144fb9ef381dd322e233c");
|
||||
module.setMenuName(moduleEntity.getMdmName());
|
||||
module.setMenuEnglishName("integrationOptionAdmin"+moduleEntity.getMdmCode());
|
||||
module.setMenuIcon(null);//模块图标
|
||||
module.setRoute("integrationOptionAdmin/"+moduleEntity.getMdmCode());//路由地址
|
||||
module.setMenuPage("integrationOptionV2/index");//一级Layout 二级 ParntView 三级component
|
||||
|
||||
|
||||
|
||||
module.setRemark("主数据生成菜单");
|
||||
module.setVisibles("0");
|
||||
module.setShowType("1");
|
||||
JSONObject object1 = new JSONObject();
|
||||
object1.put("mdmId", moduleEntity.getId());//主数据id
|
||||
object1.put("mdmCode", moduleEntity.getMdmCode());//主数据编码
|
||||
object1.put("viewType", mdmModuleViewEntity.getViewName());//1、树 2、列表
|
||||
module.setOptions(object1.toString());//菜单mate参数
|
||||
sysMenuConfigDao.save(module);
|
||||
//todo 新增按钮
|
||||
SysButtonConfigEntity xz = new SysButtonConfigEntity();
|
||||
xz.setCode("new");
|
||||
xz.setNameCh("新建");
|
||||
xz.setNameEn("new");
|
||||
xz.setMenuId(module.getId());
|
||||
xz.setIconName("");
|
||||
xz.setStyles("");
|
||||
xz.setBtnFunction("new");
|
||||
xz.setRemark("主数据新建按钮");
|
||||
xz.setCreate();
|
||||
sysButtonConfigDao.save(xz);
|
||||
SysButtonConfigEntity cz = new SysButtonConfigEntity();
|
||||
cz.setCode("resize");
|
||||
cz.setNameCh("重置");
|
||||
cz.setNameEn("resize");
|
||||
cz.setMenuId(module.getId());
|
||||
cz.setIconName("");
|
||||
cz.setStyles("");
|
||||
cz.setBtnFunction("resize");
|
||||
cz.setRemark("主数据重置按钮");
|
||||
cz.setCreate();
|
||||
sysButtonConfigDao.save(cz);
|
||||
SysButtonConfigEntity cx = new SysButtonConfigEntity();
|
||||
cx.setCode("search");
|
||||
cx.setNameCh("查询");
|
||||
cx.setNameEn("search");
|
||||
cx.setMenuId(module.getId());
|
||||
cx.setIconName("");
|
||||
cx.setStyles("");
|
||||
cx.setBtnFunction("search");
|
||||
cx.setRemark("主数据查询按钮");
|
||||
cx.setCreate();
|
||||
sysButtonConfigDao.save(cx);
|
||||
SysButtonConfigEntity xg = new SysButtonConfigEntity();
|
||||
xg.setCode("edit");
|
||||
xg.setNameCh("修改");
|
||||
xg.setNameEn("edit");
|
||||
xg.setMenuId(module.getId());
|
||||
xg.setIconName("");
|
||||
xg.setStyles("");
|
||||
xg.setBtnFunction("edit");
|
||||
xg.setRemark("主数据修改按钮");
|
||||
xg.setCreate();
|
||||
sysButtonConfigDao.save(xg);
|
||||
SysButtonConfigEntity sc = new SysButtonConfigEntity();
|
||||
sc.setCode("dele");
|
||||
sc.setNameCh("删除");
|
||||
sc.setNameEn("dele");
|
||||
sc.setMenuId(module.getId());
|
||||
sc.setIconName("");
|
||||
sc.setStyles("");
|
||||
sc.setBtnFunction("dele");
|
||||
sc.setRemark("主数据删除按钮");
|
||||
sc.setCreate();
|
||||
sysButtonConfigDao.save(sc);
|
||||
SysButtonConfigEntity ck = new SysButtonConfigEntity();
|
||||
ck.setCode("dele");
|
||||
ck.setNameCh("查看");
|
||||
ck.setNameEn("dele");
|
||||
ck.setMenuId(module.getId());
|
||||
ck.setIconName("");
|
||||
ck.setStyles("");
|
||||
ck.setBtnFunction("dele");
|
||||
ck.setRemark("主数据查看按钮");
|
||||
ck.setCreate();
|
||||
sysButtonConfigDao.save(ck);
|
||||
SysButtonConfigEntity xf = new SysButtonConfigEntity();
|
||||
xf.setCode("send");
|
||||
xf.setNameCh("下发");
|
||||
xf.setNameEn("send");
|
||||
xf.setMenuId(module.getId());
|
||||
xf.setIconName("");
|
||||
xf.setStyles("");
|
||||
xf.setBtnFunction("send");
|
||||
xf.setRemark("主数据下发按钮");
|
||||
xf.setCreate();
|
||||
sysButtonConfigDao.save(xf);
|
||||
//module.setServiceName("mdmService");//Spring bean名称
|
||||
//module.setLvl("2");//等级
|
||||
//module.setName("integrationOptionAdmin"+moduleEntity.getMdmCode());//名称
|
||||
|
@ -999,29 +1090,25 @@ public class MdmServiceImpl implements IMdmService {
|
|||
//module.setTitle(moduleEntity.getMdmName());//标题
|
||||
//module.setNoCache(null);//nocache缓存
|
||||
//module.setLabel(moduleEntity.getMdmName());//label
|
||||
//JSONObject object1 = new JSONObject();
|
||||
//object1.put("mdmId", moduleEntity.getId());//主数据id
|
||||
//object1.put("mdmCode", moduleEntity.getMdmCode());//主数据编码
|
||||
//object1.put("viewType", mdmModuleViewEntity.getViewName());//1、树 2、列表
|
||||
//module.setOptions(object1.toString());//菜单mate参数
|
||||
|
||||
//moduleMapper.entity_insert(module);
|
||||
} else {
|
||||
//修改菜单 注意因为可能修改显示类型,所以需要修改菜单的属性
|
||||
Module module = new Module();
|
||||
SysMenuConfigEntity module = new SysMenuConfigEntity();
|
||||
module.setFormId(entity.getId());
|
||||
module.setSts("Y");
|
||||
List<Module> moduleList = moduleMapper.entity_list_base(module);
|
||||
List<SysMenuConfigEntity> moduleList = sysMenuConfigDao.queryBase(module);
|
||||
if (moduleList != null && moduleList.size() == 1) {
|
||||
module = moduleList.get(0);
|
||||
module.setUpdate();
|
||||
module.setTitle(moduleEntity.getMdmName());//标题
|
||||
module.setLabel(moduleEntity.getMdmName());//label
|
||||
module.setMenuName(moduleEntity.getMdmName());
|
||||
//module.setLabel(moduleEntity.getMdmName());//label
|
||||
JSONObject object1 = new JSONObject();
|
||||
object1.put("mdmId", moduleEntity.getId());//主数据id
|
||||
object1.put("mdmCode", moduleEntity.getMdmCode());//主数据id
|
||||
object1.put("viewType", mdmModuleViewEntity.getViewName());//1、树 2、列表
|
||||
module.setOptions(object1.toString());//菜单mate参数
|
||||
moduleMapper.entity_update(module);
|
||||
sysMenuConfigDao.update(module);
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("显示信息保存成功,菜单配置失败请检查");
|
||||
}
|
||||
|
@ -1368,14 +1455,7 @@ public class MdmServiceImpl implements IMdmService {
|
|||
if (mdmModuleEntities == null || mdmModuleEntities.size() != 1) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//获取用户角色id
|
||||
UserRole updateUser = new UserRole();
|
||||
updateUser.setUserId(StpUtil.getLoginIdAsString());
|
||||
updateUser.setSts("Y");
|
||||
List<UserRole> userRoleList = userRoleMapper.entity_list_base(updateUser);
|
||||
if (userRoleList == null || userRoleList.size() == 0) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
|
||||
MdmViewVo mdmViewVo = new MdmViewVo();
|
||||
mdmModuleEntity = mdmModuleEntities.get(0);
|
||||
mdmViewVo.setMdmModuleEntity(mdmModuleEntity);
|
||||
|
@ -1450,13 +1530,8 @@ public class MdmServiceImpl implements IMdmService {
|
|||
List<MdmViewFiledVo> listListVo = setQueryList(mdmModuleDbEntityList, mdmModuleDbFiledsEntityList, mdmModuleDbFiledsRuleEntityList, dolistList,true);
|
||||
mdmViewVo.setListList(listListVo);
|
||||
|
||||
//获取按钮
|
||||
MdmModuleRoleButtonEntity mdmModuleRoleButtonEntity = new MdmModuleRoleButtonEntity();
|
||||
mdmModuleRoleButtonEntity.setMdmId(mdmModuleEntity.getId());
|
||||
mdmModuleRoleButtonEntity.setSts("Y");
|
||||
mdmModuleRoleButtonEntity.setRoleIds(userRoleList);
|
||||
List<MdmModuleRoleButtonEntity> mdmModuleRoleButtonEntities = mdmModuleRoleButtonDao.queryBase(mdmModuleRoleButtonEntity);
|
||||
List<MdmViewButtonVo> buttonList = setButton(mdmModuleRoleButtonEntities);
|
||||
List<MdmViewButtonVo> buttonList = new ArrayList<>();
|
||||
MdmViewButtonVo mdmViewButtonVo = new MdmViewButtonVo();
|
||||
mdmViewVo.setButtonList(buttonList);
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("获取字段成功", mdmViewVo);
|
||||
|
|
|
@ -29,6 +29,14 @@ public class SysApplicationApiDto {
|
|||
private String funName;
|
||||
/** 是否扩展api */
|
||||
private String extensionApi;
|
||||
|
||||
/** 返回成功字段 */
|
||||
private String returnSuccessField;
|
||||
/** 返回成功值*/
|
||||
private String returnSuccessValue;
|
||||
|
||||
/** 返回描述字段*/
|
||||
private String returnMsg;
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
@ -116,5 +124,29 @@ public class SysApplicationApiDto {
|
|||
public void setExtensionApi(String extensionApi) {
|
||||
this.extensionApi = extensionApi;
|
||||
}
|
||||
|
||||
public String getReturnSuccessField() {
|
||||
return returnSuccessField;
|
||||
}
|
||||
|
||||
public void setReturnSuccessField(String returnSuccessField) {
|
||||
this.returnSuccessField = returnSuccessField;
|
||||
}
|
||||
|
||||
public String getReturnSuccessValue() {
|
||||
return returnSuccessValue;
|
||||
}
|
||||
|
||||
public void setReturnSuccessValue(String returnSuccessValue) {
|
||||
this.returnSuccessValue = returnSuccessValue;
|
||||
}
|
||||
|
||||
public String getReturnMsg() {
|
||||
return returnMsg;
|
||||
}
|
||||
|
||||
public void setReturnMsg(String returnMsg) {
|
||||
this.returnMsg = returnMsg;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,20 @@ public class SysApplicationApiEntity extends BaseEntity {
|
|||
/** 是否扩展api 1、启用 2、停用*/
|
||||
private String extensionApi;
|
||||
|
||||
/** 返回成功字段 */
|
||||
private String returnSuccessField;
|
||||
/** 返回成功值*/
|
||||
private String returnSuccessValue;
|
||||
/** 返回描述字段*/
|
||||
private String returnMsg;
|
||||
|
||||
public String getReturnMsg() {
|
||||
return returnMsg;
|
||||
}
|
||||
|
||||
public void setReturnMsg(String returnMsg) {
|
||||
this.returnMsg = returnMsg;
|
||||
}
|
||||
|
||||
public String getApiStatus() {
|
||||
return apiStatus;
|
||||
|
@ -261,5 +275,21 @@ public class SysApplicationApiEntity extends BaseEntity {
|
|||
public void setExtensionApi(String extensionApi) {
|
||||
this.extensionApi = extensionApi;
|
||||
}
|
||||
|
||||
public String getReturnSuccessField() {
|
||||
return returnSuccessField;
|
||||
}
|
||||
|
||||
public void setReturnSuccessField(String returnSuccessField) {
|
||||
this.returnSuccessField = returnSuccessField;
|
||||
}
|
||||
|
||||
public String getReturnSuccessValue() {
|
||||
return returnSuccessValue;
|
||||
}
|
||||
|
||||
public void setReturnSuccessValue(String returnSuccessValue) {
|
||||
this.returnSuccessValue = returnSuccessValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
<result property="bodyIn" column="body_in" jdbcType="VARCHAR"/>
|
||||
<result property="bodyOut" column="body_out" jdbcType="VARCHAR"/>
|
||||
<result property="beanName" column="bean_name" jdbcType="VARCHAR"/>
|
||||
<result property="returnSuccessField" column="return_success_field" jdbcType="VARCHAR"/>
|
||||
<result property="returnSuccessValue" column="return_success_value" jdbcType="VARCHAR"/>
|
||||
<result property="returnMsg" column="return_msg" jdbcType="VARCHAR"/>
|
||||
<result property="funName" column="fun_name" jdbcType="VARCHAR"/>
|
||||
<result property="extensionApi" column="extension_api" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
|
@ -62,6 +65,9 @@
|
|||
,body_in
|
||||
,body_out
|
||||
,bean_name
|
||||
,return_msg
|
||||
,return_success_field
|
||||
,return_success_value
|
||||
,fun_name
|
||||
,extension_api
|
||||
,sorts
|
||||
|
@ -99,6 +105,9 @@
|
|||
a.body_in,
|
||||
a.body_out,
|
||||
a.bean_name,
|
||||
a.return_msg,
|
||||
a.return_success_field,
|
||||
a.return_success_value,
|
||||
a.fun_name,
|
||||
a.extension_api,
|
||||
a.sorts,
|
||||
|
@ -153,6 +162,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">and fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
|
@ -201,6 +213,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">and fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
|
@ -260,6 +275,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in like concat('%',#{bodyIn},'%')</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out like concat('%',#{bodyOut},'%')</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name like concat('%',#{beanName},'%')</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg like concat('%',#{returnMsg},'%')</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field like concat('%',#{returnSuccessField},'%')</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value like concat('%',#{returnSuccessValue},'%')</if>
|
||||
<if test="funName != null and funName != ''">and fun_name like concat('%',#{funName},'%')</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api like concat('%',#{extensionApi},'%')</if>
|
||||
<if test="sorts != null">and sorts like concat('%',#{sorts},'%')</if>
|
||||
|
@ -314,6 +332,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">or body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">or body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">or bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">or return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">or return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">or return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">or fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">or extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">or sorts = #{sorts}</if>
|
||||
|
@ -357,6 +378,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">body_in ,</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">body_out ,</if>
|
||||
<if test="beanName != null and beanName != ''">bean_name ,</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">return_msg ,</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">return_success_field ,</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">return_success_value ,</if>
|
||||
<if test="funName != null and funName != ''">fun_name ,</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">extension_api ,</if>
|
||||
<if test="sorts != null">sorts ,</if>
|
||||
|
@ -396,6 +420,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">#{bodyIn} ,</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">#{bodyOut} ,</if>
|
||||
<if test="beanName != null and beanName != ''">#{beanName} ,</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">#{returnMsg} ,</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">#{returnSuccessField} ,</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">#{returnSuccessValue} ,</if>
|
||||
<if test="funName != null and funName != ''">#{funName} ,</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">#{extensionApi} ,</if>
|
||||
<if test="sorts != null">#{sorts} ,</if>
|
||||
|
@ -416,11 +443,11 @@ WHERE
|
|||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
|
||||
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
|
||||
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out, bean_name, fun_name, extension_api, sorts, create_user_id,
|
||||
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out, bean_name,return_msg,return_success_field,return_success_value, fun_name, extension_api, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
|
@ -428,11 +455,11 @@ WHERE
|
|||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_application_api(api_status,api_code,api_path, app_id, catalogue_id, api_name, api_remark,
|
||||
need_Login, authentication_port, parameter_passing_mode, destination_address, request_coding, request_method,
|
||||
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out,bean_name,fun_name,extension_api, sorts, create_user_id,
|
||||
timeout_period, current_limiting, header_in, query_in, body_in_type, body_in, body_out,bean_name,return_msg,return_success_field,return_success_value,fun_name,extension_api, sorts, create_user_id,
|
||||
create_time, modify_user_id, modify_time, sts, org_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
(#{entity.apiStatus},#{entity.apiCode},#{entity.apiPath},#{entity.appId},#{entity.catalogueId},#{entity.apiName},#{entity.apiRemark},#{entity.needLogin},#{entity.authenticationPort},#{entity.parameterPassingMode},#{entity.destinationAddress},#{entity.requestCoding},#{entity.requestMethod},#{entity.timeoutPeriod},#{entity.currentLimiting},#{entity.headerIn},#{entity.queryIn},#{entity.bodyInType},#{entity.bodyIn},#{entity.bodyOut},#{entity.beanName},#{entity.returnMsg},#{entity.returnSuccessField},#{entity.returnSuccessValue},#{entity.funName},#{entity.extensionApi},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
api_status = values(api_status),
|
||||
|
@ -456,6 +483,9 @@ WHERE
|
|||
body_in = values(body_in),
|
||||
body_out = values(extension_api),
|
||||
bean_name = values(bean_name),
|
||||
return_msg = values(return_msg),
|
||||
return_success_field = values(return_success_field),
|
||||
return_success_value = values(return_success_value),
|
||||
fun_name = values(fun_name),
|
||||
extension_api = values(extension_api),
|
||||
sorts = values(sorts),
|
||||
|
@ -497,6 +527,9 @@ WHERE
|
|||
<if test="bodyIn != null and bodyIn != ''">body_in = #{bodyIn},</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">body_out = #{bodyOut},</if>
|
||||
<if test="beanName != null and beanName != ''">bean_name = #{beanName},</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">return_msg = #{returnMsg},</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">return_success_field = #{returnSuccessField},</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">return_success_value = #{returnSuccessValue},</if>
|
||||
<if test="funName != null and funName != ''">fun_name = #{funName},</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">extension_api = #{extensionApi},</if>
|
||||
<if test="sorts != null">sorts = #{sorts},</if>
|
||||
|
@ -547,6 +580,9 @@ where id = #{id}
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">and fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
|
@ -746,6 +782,9 @@ where id = #{id}
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">and fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
|
@ -793,6 +832,9 @@ where id = #{id}
|
|||
<if test="bodyIn != null and bodyIn != ''">and body_in = #{bodyIn}</if>
|
||||
<if test="bodyOut != null and bodyOut != ''">and body_out = #{bodyOut}</if>
|
||||
<if test="beanName != null and beanName != ''">and bean_name = #{beanName}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''">and return_msg = #{returnMsg}</if>
|
||||
<if test="returnSuccessField != null and returnSuccessField != ''">and return_success_field = #{returnSuccessField}</if>
|
||||
<if test="returnSuccessValue != null and returnSuccessValue != ''">and return_success_value = #{returnSuccessValue}</if>
|
||||
<if test="funName != null and funName != ''">and fun_name = #{funName}</if>
|
||||
<if test="extensionApi != null and extensionApi != ''">and extension_api = #{extensionApi}</if>
|
||||
<if test="sorts != null">and sorts = #{sorts}</if>
|
||||
|
|
|
@ -39,6 +39,13 @@ public class SysApplicationApiVo {
|
|||
private String funName;
|
||||
/** 是否扩展api */
|
||||
private String extensionApi;
|
||||
/** 返回成功字段 */
|
||||
private String returnSuccessField;
|
||||
/** 返回成功值*/
|
||||
private String returnSuccessValue;
|
||||
/** 返回描述字段*/
|
||||
private String returnMsg;
|
||||
|
||||
public Long getApiCode() {
|
||||
return apiCode;
|
||||
}
|
||||
|
@ -158,5 +165,29 @@ public class SysApplicationApiVo {
|
|||
public void setExtensionApi(String extensionApi) {
|
||||
this.extensionApi = extensionApi;
|
||||
}
|
||||
|
||||
public String getReturnSuccessField() {
|
||||
return returnSuccessField;
|
||||
}
|
||||
|
||||
public void setReturnSuccessField(String returnSuccessField) {
|
||||
this.returnSuccessField = returnSuccessField;
|
||||
}
|
||||
|
||||
public String getReturnSuccessValue() {
|
||||
return returnSuccessValue;
|
||||
}
|
||||
|
||||
public void setReturnSuccessValue(String returnSuccessValue) {
|
||||
this.returnSuccessValue = returnSuccessValue;
|
||||
}
|
||||
|
||||
public String getReturnMsg() {
|
||||
return returnMsg;
|
||||
}
|
||||
|
||||
public void setReturnMsg(String returnMsg) {
|
||||
this.returnMsg = returnMsg;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.hzya.frame.sysnew.application.api.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* 应用api(SysApplicationApi)表服务接口
|
||||
*
|
||||
|
@ -10,5 +13,12 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
*/
|
||||
public interface ISysApplicationApiService extends IBaseService<SysApplicationApiEntity, String>{
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询应用api列表
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity queryEntity(JSONObject jsonObject);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
package com.hzya.frame.sysnew.application.api.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
||||
import com.hzya.frame.sysnew.application.api.dao.ISysApplicationApiDao;
|
||||
import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 应用api(SysApplicationApi)表服务实现类
|
||||
*
|
||||
|
@ -23,4 +30,22 @@ public class SysApplicationApiServiceImpl extends BaseService<SysApplicationApiE
|
|||
this.sysApplicationApiDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 查询应用api列表
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryEntity(JSONObject jsonObject) {
|
||||
SysApplicationApiEntity entity = getData("jsonStr", jsonObject, SysApplicationApiEntity.class);
|
||||
if (entity == null) {
|
||||
entity = new SysApplicationApiEntity();
|
||||
}
|
||||
List<SysApplicationApiEntity> list = sysApplicationApiDao.queryByLike(entity);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1651,21 +1651,21 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
//判断应用是否启用
|
||||
if (sendApp.getAppStatus() == null || !"1".equals(sendApp.getAppStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(sendApp.getName()+"应用未启用,请联系管理员");
|
||||
return BaseResult.getFailureMessageEntity(sendApp.getName() + "应用未启用,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
SysApplicationEntity receiveApp = getAppByAppId(appId);
|
||||
if (receiveApp == null) {
|
||||
return BaseResult.getFailureMessageEntity("根据appId:"+appId+"未匹配到应用,请联系管理员");
|
||||
return BaseResult.getFailureMessageEntity("根据appId:" + appId + "未匹配到应用,请联系管理员");
|
||||
}
|
||||
//判断应用是否启用
|
||||
if (receiveApp.getAppStatus() == null || !"1".equals(receiveApp.getAppStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName()+"应用未启用,请联系管理员");
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用未启用,请联系管理员");
|
||||
}
|
||||
//判断应用接口是否启用
|
||||
if (receiveApp.getInterfaceStatus() == null || !"1".equals(receiveApp.getInterfaceStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName()+"应用接口环境未启用,请联系管理员");
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用接口环境未启用,请联系管理员");
|
||||
}
|
||||
|
||||
SysApplicationApiEntity receiveApi = getApiByAppIdApiCode(receiveApp.getId(), apiCode);
|
||||
|
@ -1675,17 +1675,17 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
|
||||
SysApplicationApiAuthEntity sysApplicationApiAuthEntity = getApiAuthByNameAppId(sendApp.getId(), receiveApp.getId());
|
||||
if (sysApplicationApiAuthEntity == null) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName()+"应用权限配置错误");
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用权限配置错误");
|
||||
}
|
||||
if (sysApplicationApiAuthEntity.getSystemAddress() != null && !"".equals(sysApplicationApiAuthEntity.getSystemAddress())
|
||||
&& !sysApplicationApiAuthEntity.getSystemAddress().contains(ip)) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName()+"发送应用"+receiveApp.getName()+"的ip白名单配置错误");
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "发送应用" + receiveApp.getName() + "的ip白名单配置错误");
|
||||
}
|
||||
|
||||
SysApplicationApiAuthDetailEntity sysApplicationApiAuthDetailEntity = getApiAuthDetailByAppIdApiIdTripartiteSystemId(receiveApp.getId(), receiveApi.getId(), sysApplicationApiAuthEntity.getId());
|
||||
if (sysApplicationApiAuthDetailEntity == null) {
|
||||
saveLog(sendApp, receiveApp, receiveApi, oldbodys,null, oldheaderMap,null, null, oldquerys,null, null,false);
|
||||
return BaseResult.getFailureMessageEntity(receiveApi.getApiName()+"未授权给"+sendApp.getName()+",请联系管理员");
|
||||
saveLog(sendApp, receiveApp, receiveApi, oldbodys, null, oldheaderMap, null, null, oldquerys, null, null, false);
|
||||
return BaseResult.getFailureMessageEntity(receiveApi.getApiName() + "未授权给" + sendApp.getName() + ",请联系管理员");
|
||||
}
|
||||
SysExtensionApiEntity sysExtensionApiEntity = new SysExtensionApiEntity();
|
||||
sysExtensionApiEntity.setHeaders(oldheaderMap);
|
||||
|
@ -1694,7 +1694,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
Method[] methods = null;
|
||||
Object object = null;
|
||||
|
||||
//TODO 判断是否有内部api 是否扩展api 1、启用 2、停用
|
||||
// 判断是否有内部api 是否扩展api 1、启用 2、停用
|
||||
if (receiveApi.getExtensionApi() != null && "1".equals(receiveApi.getExtensionApi())
|
||||
&& receiveApi.getBeanName() != null && !"".equals(receiveApi.getBeanName())
|
||||
&& receiveApi.getFunName() != null && !"".equals(receiveApi.getFunName())
|
||||
|
@ -1726,7 +1726,6 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
|
||||
}
|
||||
//TODO 判断是否有内部api
|
||||
Map<String, String> headerMap = sysExtensionApiEntity.getHeaders();
|
||||
String querys = sysExtensionApiEntity.getQuerys();
|
||||
String bodys = sysExtensionApiEntity.getBodys();
|
||||
|
@ -1749,9 +1748,9 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
List<String> a = Arrays.asList(new String[]{"apicode", "appid", "secretkey", "publickey", "x-forwarded-for", "cookie", "x-forwarded-proto", "x-real-ip", "content-length", "accept-language", "host", "content-type", "connection", "cache-control", "accept-encoding", "pragma", "accept", "user-agent"});
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
if(receiveApi.getHeaderIn() != null && !"".equals(receiveApi.getHeaderIn())){
|
||||
if (receiveApi.getHeaderIn() != null && !"".equals(receiveApi.getHeaderIn())) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(receiveApi.getHeaderIn());
|
||||
if(jsonArray != null && jsonArray.size() > 0){
|
||||
if (jsonArray != null && jsonArray.size() > 0) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject object1 = jsonArray.getJSONObject(i);
|
||||
headers.put(object1.getString("parameterName"), object1.getString("example"));
|
||||
|
@ -1834,14 +1833,21 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("保存日志结束");
|
||||
if (flag) {
|
||||
if (JSONUtil.isTypeJSON(body.toString())) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(body.toString());
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||
|
@ -1910,7 +1916,20 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
logger.info("保存日志结束");
|
||||
if (flag) {
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||
if (JSONUtil.isTypeJSON(body.toString())) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(body.toString());
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", jsonObject);
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", jsonObject);
|
||||
}
|
||||
} else {
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("转发成功", body);
|
||||
}else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("转发失败", body);
|
||||
}
|
||||
|
@ -1980,8 +1999,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
String oldbodys,String bodys,
|
||||
Map<String, String> oldheaderMap,Map<String, String> headerMap,
|
||||
Map<String, String> headers,
|
||||
String oldquerys,String querys,
|
||||
String body,boolean flag) {
|
||||
String oldquerys, String querys,
|
||||
String body, boolean flag) {
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = new SysMessageManageLogEntity();
|
||||
//messageManageId 消息主表主键
|
||||
//theme 消息主题
|
||||
|
@ -2003,74 +2022,53 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
send.put("querys", querys);
|
||||
sysMessageManageLogEntity.setTargetData(send.toString());//目标data
|
||||
sysMessageManageLogEntity.setReturnData(body);//返回信息
|
||||
//status 状态(1、待发送 2、发送中3、发送成功 4、发送失败,5、系统异常(根据三个参数查出来多个))
|
||||
//{"ResCode":0,"Success":true,"ResMsg":"登录成功,token有效时间为10分钟","Data":"123123"}
|
||||
List<String> st = Arrays.asList(new String[]{"8000060000"});
|
||||
//{"traceId":"E-O.hzhhsp88.1008-20240429175201-54231d","errorDescription":"success","dataId":"662f6dc22cf56a00010643c7","extraData":"662f6dc22cf56a00010643ce","errorMessage":"OK","errorCode":0}
|
||||
List<String> fx = Arrays.asList(new String[]{"800009"});
|
||||
//{"orderNo":"DB1003108862178","ErrorCode":"","ResultString":"success","ResultInt":0}
|
||||
List<String> rs = Arrays.asList(new String[]{"8000080005", "8000080000", "8000080002", "8000080004"});
|
||||
//{"status":"success","data":"[{\\"pk_corp\\":\\"1015\\",\\"unitcode\\":\\"3401\\",\\"unitname\\":\\"hjx建设银行有限公司\\",\\"createdate\\":\\"2023-01-01\\",\\"deptattr\\":\\"1\\",\\"deptname\\":\\"API新增部门02\\",\\"deptcode\\":\\"DEV02\\",\\"pk_deptdoc\\":\\"1015A210000000001QJ7\\"}]","taskNumber":"202309110119"}
|
||||
List<String> ss = Arrays.asList(new String[]{"8000160014", "8000160015", "8000160016", "8000160017", "8000160021", "8000160022", "8000160023", "8000160018", "8000160019", "8000160020", "8000160025", "8000160026", "8000160027", "8000160029", "8000160030"});
|
||||
if(!flag){
|
||||
|
||||
|
||||
//校验返回
|
||||
if (!flag) {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("API未授权,请联系管理员");//返回信息
|
||||
}else if (st.contains(receiveApi.getApiCode().toString())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString("Success");
|
||||
if(checkdata != null && "true".equals(checkdata)){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("成功");//返回信息
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark(cheackdatas.getString("ResMsg"));//返回信息
|
||||
|
||||
}
|
||||
}
|
||||
} else if (rs.contains(receiveApi.getApiCode().toString())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString("ResultInt");
|
||||
if(checkdata != null && "0".equals(checkdata)){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("成功");//返回信息
|
||||
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark(cheackdatas.getString("ResultString"));//返回信息
|
||||
}
|
||||
}
|
||||
} else if (fx.contains(receiveApp.getAppId())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString("errorMessage");
|
||||
if(checkdata != null && ("success".equals(checkdata) || "OK".equals(checkdata))){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("成功");//返回信息
|
||||
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark(cheackdatas.getString("errorMessage"));//返回信息
|
||||
}
|
||||
}
|
||||
} else if (ss.contains(receiveApi.getApiCode().toString())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString("status");
|
||||
if(checkdata != null && "success".equals(checkdata)){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("成功");//返回信息
|
||||
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark(cheackdatas.getString("errormsg"));//返回信息
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("成功");//返回信息
|
||||
|
||||
if (receiveApi.getReturnSuccessField() != null && !"".equals(receiveApi.getReturnSuccessField())
|
||||
&& receiveApi.getReturnSuccessValue() != null && !"".equals(receiveApi.getReturnSuccessValue())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString(receiveApi.getReturnSuccessField());
|
||||
if (checkdata != null && receiveApi.getReturnSuccessValue().equals(checkdata)) {
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功");//返回信息
|
||||
}
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,api返回信息字段未配置,返回信息如下:" + checkdata);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败");//返回信息
|
||||
}
|
||||
}
|
||||
}
|
||||
//remark 备注
|
||||
sysMessageManageLogEntity.setErrorStatus("2");//返回信息
|
||||
|
@ -2178,6 +2176,7 @@ 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
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sysnew.integrationTaskLogDetails.dao;
|
||||
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 集成任务-日志详情(integration_task_log_details: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-15 10:14:46
|
||||
*/
|
||||
public interface IIntegrationTaskLogDetailsDao extends IBaseDao<IntegrationTaskLogDetailsEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sysnew.integrationTaskLogDetails.dao.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.dao.IIntegrationTaskLogDetailsDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 集成任务-日志详情(IntegrationTaskLogDetails)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-15 10:14:46
|
||||
*/
|
||||
@Repository(value = "IntegrationTaskLogDetailsDaoImpl")
|
||||
public class IntegrationTaskLogDetailsDaoImpl extends MybatisGenericDao<IntegrationTaskLogDetailsEntity, String> implements IIntegrationTaskLogDetailsDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,246 @@
|
|||
package com.hzya.frame.sysnew.integrationTaskLogDetails.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 集成任务-日志详情(IntegrationTaskLogDetails)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-15 10:14:46
|
||||
*/
|
||||
public class IntegrationTaskLogDetailsEntity extends BaseEntity {
|
||||
|
||||
/** 集成任务-实例_id */
|
||||
private String taskLinvingId;
|
||||
/** 返回结果 */
|
||||
private String result;
|
||||
/** 原始查询条件 */
|
||||
private String queryCondition;
|
||||
/** 源系统主键 */
|
||||
private String rootAppPk;
|
||||
/** 原系统单据 */
|
||||
private String rootAppBill;
|
||||
/** 最新源系统数据详情 */
|
||||
private String rootAppNewData;
|
||||
/** 最新传输信息 */
|
||||
private String newTransmitInfo;
|
||||
/** 最新推送时间 */
|
||||
private Date newPushDate;
|
||||
/** 源系统编码 */
|
||||
private String rootAppCode;
|
||||
/** 业务日期 */
|
||||
private String businessTime;
|
||||
/** 最新推送状态 */
|
||||
private String newPushState;
|
||||
/** 处理人 */
|
||||
private String processor;
|
||||
/** 处理时间 */
|
||||
private String processorTime;
|
||||
/** 处理备注 */
|
||||
private String processorRemark;
|
||||
/** 最新元数据 */
|
||||
private String newMetadata;
|
||||
/** 是否补推(Y是N不是) */
|
||||
private String repairPust;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 扩展1 */
|
||||
private String def1;
|
||||
/** 扩展2 */
|
||||
private String def2;
|
||||
/** 扩展3 */
|
||||
private String def3;
|
||||
/** 扩展4 */
|
||||
private String def4;
|
||||
/** 扩展5 */
|
||||
private String def5;
|
||||
|
||||
|
||||
public String getTaskLinvingId() {
|
||||
return taskLinvingId;
|
||||
}
|
||||
|
||||
public void setTaskLinvingId(String taskLinvingId) {
|
||||
this.taskLinvingId = taskLinvingId;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getQueryCondition() {
|
||||
return queryCondition;
|
||||
}
|
||||
|
||||
public void setQueryCondition(String queryCondition) {
|
||||
this.queryCondition = queryCondition;
|
||||
}
|
||||
|
||||
public String getRootAppPk() {
|
||||
return rootAppPk;
|
||||
}
|
||||
|
||||
public void setRootAppPk(String rootAppPk) {
|
||||
this.rootAppPk = rootAppPk;
|
||||
}
|
||||
|
||||
public String getRootAppBill() {
|
||||
return rootAppBill;
|
||||
}
|
||||
|
||||
public void setRootAppBill(String rootAppBill) {
|
||||
this.rootAppBill = rootAppBill;
|
||||
}
|
||||
|
||||
public String getRootAppNewData() {
|
||||
return rootAppNewData;
|
||||
}
|
||||
|
||||
public void setRootAppNewData(String rootAppNewData) {
|
||||
this.rootAppNewData = rootAppNewData;
|
||||
}
|
||||
|
||||
public String getNewTransmitInfo() {
|
||||
return newTransmitInfo;
|
||||
}
|
||||
|
||||
public void setNewTransmitInfo(String newTransmitInfo) {
|
||||
this.newTransmitInfo = newTransmitInfo;
|
||||
}
|
||||
|
||||
public Date getNewPushDate() {
|
||||
return newPushDate;
|
||||
}
|
||||
|
||||
public void setNewPushDate(Date newPushDate) {
|
||||
this.newPushDate = newPushDate;
|
||||
}
|
||||
|
||||
public String getRootAppCode() {
|
||||
return rootAppCode;
|
||||
}
|
||||
|
||||
public void setRootAppCode(String rootAppCode) {
|
||||
this.rootAppCode = rootAppCode;
|
||||
}
|
||||
|
||||
public String getBusinessTime() {
|
||||
return businessTime;
|
||||
}
|
||||
|
||||
public void setBusinessTime(String businessTime) {
|
||||
this.businessTime = businessTime;
|
||||
}
|
||||
|
||||
public String getNewPushState() {
|
||||
return newPushState;
|
||||
}
|
||||
|
||||
public void setNewPushState(String newPushState) {
|
||||
this.newPushState = newPushState;
|
||||
}
|
||||
|
||||
public String getProcessor() {
|
||||
return processor;
|
||||
}
|
||||
|
||||
public void setProcessor(String processor) {
|
||||
this.processor = processor;
|
||||
}
|
||||
|
||||
public String getProcessorTime() {
|
||||
return processorTime;
|
||||
}
|
||||
|
||||
public void setProcessorTime(String processorTime) {
|
||||
this.processorTime = processorTime;
|
||||
}
|
||||
|
||||
public String getProcessorRemark() {
|
||||
return processorRemark;
|
||||
}
|
||||
|
||||
public void setProcessorRemark(String processorRemark) {
|
||||
this.processorRemark = processorRemark;
|
||||
}
|
||||
|
||||
public String getNewMetadata() {
|
||||
return newMetadata;
|
||||
}
|
||||
|
||||
public void setNewMetadata(String newMetadata) {
|
||||
this.newMetadata = newMetadata;
|
||||
}
|
||||
|
||||
public String getRepairPust() {
|
||||
return repairPust;
|
||||
}
|
||||
|
||||
public void setRepairPust(String repairPust) {
|
||||
this.repairPust = repairPust;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDef1() {
|
||||
return def1;
|
||||
}
|
||||
|
||||
public void setDef1(String def1) {
|
||||
this.def1 = def1;
|
||||
}
|
||||
|
||||
public String getDef2() {
|
||||
return def2;
|
||||
}
|
||||
|
||||
public void setDef2(String def2) {
|
||||
this.def2 = def2;
|
||||
}
|
||||
|
||||
public String getDef3() {
|
||||
return def3;
|
||||
}
|
||||
|
||||
public void setDef3(String def3) {
|
||||
this.def3 = def3;
|
||||
}
|
||||
|
||||
public String getDef4() {
|
||||
return def4;
|
||||
}
|
||||
|
||||
public void setDef4(String def4) {
|
||||
this.def4 = def4;
|
||||
}
|
||||
|
||||
public String getDef5() {
|
||||
return def5;
|
||||
}
|
||||
|
||||
public void setDef5(String def5) {
|
||||
this.def5 = def5;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,443 @@
|
|||
<?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.integrationTaskLogDetails.dao.impl.IntegrationTaskLogDetailsDaoImpl">
|
||||
|
||||
<resultMap id="get-IntegrationTaskLogDetailsEntity-result" type="com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="taskLinvingId" column="task_linving_id" jdbcType="VARCHAR"/>
|
||||
<result property="result" column="result" jdbcType="VARCHAR"/>
|
||||
<result property="queryCondition" column="query_condition" jdbcType="VARCHAR"/>
|
||||
<result property="rootAppPk" column="root_app_pk" jdbcType="VARCHAR"/>
|
||||
<result property="rootAppBill" column="root_app_bill" jdbcType="VARCHAR"/>
|
||||
<result property="rootAppNewData" column="root_app_new_data" jdbcType="VARCHAR"/>
|
||||
<result property="newTransmitInfo" column="new_transmit_info" jdbcType="VARCHAR"/>
|
||||
<result property="newPushDate" column="new_push_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="rootAppCode" column="root_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="businessTime" column="business_time" jdbcType="VARCHAR"/>
|
||||
<result property="newPushState" column="new_push_state" jdbcType="VARCHAR"/>
|
||||
<result property="processor" column="processor" jdbcType="VARCHAR"/>
|
||||
<result property="processorTime" column="processor_time" jdbcType="VARCHAR"/>
|
||||
<result property="processorRemark" column="processor_remark" jdbcType="VARCHAR"/>
|
||||
<result property="newMetadata" column="new_metadata" jdbcType="VARCHAR"/>
|
||||
<result property="repairPust" column="repair_pust" 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"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="def1" column="def1" jdbcType="VARCHAR"/>
|
||||
<result property="def2" column="def2" jdbcType="VARCHAR"/>
|
||||
<result property="def3" column="def3" jdbcType="VARCHAR"/>
|
||||
<result property="def4" column="def4" jdbcType="VARCHAR"/>
|
||||
<result property="def5" column="def5" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "IntegrationTaskLogDetailsEntity_Base_Column_List">
|
||||
id
|
||||
,task_linving_id
|
||||
,result
|
||||
,query_condition
|
||||
,root_app_pk
|
||||
,root_app_bill
|
||||
,root_app_new_data
|
||||
,new_transmit_info
|
||||
,new_push_date
|
||||
,root_app_code
|
||||
,business_time
|
||||
,new_push_state
|
||||
,processor
|
||||
,processor_time
|
||||
,processor_remark
|
||||
,new_metadata
|
||||
,repair_pust
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,remark
|
||||
,def1
|
||||
,def2
|
||||
,def3
|
||||
,def4
|
||||
,def5
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-IntegrationTaskLogDetailsEntity-result" parameterType = "com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLogDetailsEntity_Base_Column_List" />
|
||||
from integration_task_log_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="result != null and result != ''"> and result = #{result} </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> and query_condition = #{queryCondition} </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> and root_app_pk = #{rootAppPk} </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> and root_app_bill = #{rootAppBill} </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> and root_app_new_data = #{rootAppNewData} </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and new_transmit_info = #{newTransmitInfo} </if>
|
||||
<if test="newPushDate != null"> and new_push_date = #{newPushDate} </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> and root_app_code = #{rootAppCode} </if>
|
||||
<if test="businessTime != null and businessTime != ''"> and business_time = #{businessTime} </if>
|
||||
<if test="newPushState != null and newPushState != ''"> and new_push_state = #{newPushState} </if>
|
||||
<if test="processor != null and processor != ''"> and processor = #{processor} </if>
|
||||
<if test="processorTime != null and processorTime != ''"> and processor_time = #{processorTime} </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> and processor_remark = #{processorRemark} </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> and new_metadata = #{newMetadata} </if>
|
||||
<if test="repairPust != null and repairPust != ''"> and repair_pust = #{repairPust} </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>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </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.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity">
|
||||
select count(1) from integration_task_log_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="result != null and result != ''"> and result = #{result} </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> and query_condition = #{queryCondition} </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> and root_app_pk = #{rootAppPk} </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> and root_app_bill = #{rootAppBill} </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> and root_app_new_data = #{rootAppNewData} </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and new_transmit_info = #{newTransmitInfo} </if>
|
||||
<if test="newPushDate != null"> and new_push_date = #{newPushDate} </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> and root_app_code = #{rootAppCode} </if>
|
||||
<if test="businessTime != null and businessTime != ''"> and business_time = #{businessTime} </if>
|
||||
<if test="newPushState != null and newPushState != ''"> and new_push_state = #{newPushState} </if>
|
||||
<if test="processor != null and processor != ''"> and processor = #{processor} </if>
|
||||
<if test="processorTime != null and processorTime != ''"> and processor_time = #{processorTime} </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> and processor_remark = #{processorRemark} </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> and new_metadata = #{newMetadata} </if>
|
||||
<if test="repairPust != null and repairPust != ''"> and repair_pust = #{repairPust} </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>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </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-IntegrationTaskLogDetailsEntity-result" parameterType = "com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLogDetailsEntity_Base_Column_List" />
|
||||
from integration_task_log_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="result != null and result != ''"> and result like concat('%',#{result},'%') </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> and query_condition like concat('%',#{queryCondition},'%') </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> and root_app_pk like concat('%',#{rootAppPk},'%') </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> and root_app_bill like concat('%',#{rootAppBill},'%') </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> and root_app_new_data like concat('%',#{rootAppNewData},'%') </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and new_transmit_info like concat('%',#{newTransmitInfo},'%') </if>
|
||||
<if test="newPushDate != null"> and new_push_date like concat('%',#{newPushDate},'%') </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> and root_app_code like concat('%',#{rootAppCode},'%') </if>
|
||||
<if test="businessTime != null and businessTime != ''"> and business_time like concat('%',#{businessTime},'%') </if>
|
||||
<if test="newPushState != null and newPushState != ''"> and new_push_state like concat('%',#{newPushState},'%') </if>
|
||||
<if test="processor != null and processor != ''"> and processor like concat('%',#{processor},'%') </if>
|
||||
<if test="processorTime != null and processorTime != ''"> and processor_time like concat('%',#{processorTime},'%') </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> and processor_remark like concat('%',#{processorRemark},'%') </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> and new_metadata like concat('%',#{newMetadata},'%') </if>
|
||||
<if test="repairPust != null and repairPust != ''"> and repair_pust like concat('%',#{repairPust},'%') </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>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </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="IntegrationTaskLogDetailsentity_list_or" resultMap="get-IntegrationTaskLogDetailsEntity-result" parameterType = "com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLogDetailsEntity_Base_Column_List" />
|
||||
from integration_task_log_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="result != null and result != ''"> or result = #{result} </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> or query_condition = #{queryCondition} </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> or root_app_pk = #{rootAppPk} </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> or root_app_bill = #{rootAppBill} </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> or root_app_new_data = #{rootAppNewData} </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> or new_transmit_info = #{newTransmitInfo} </if>
|
||||
<if test="newPushDate != null"> or new_push_date = #{newPushDate} </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> or root_app_code = #{rootAppCode} </if>
|
||||
<if test="businessTime != null and businessTime != ''"> or business_time = #{businessTime} </if>
|
||||
<if test="newPushState != null and newPushState != ''"> or new_push_state = #{newPushState} </if>
|
||||
<if test="processor != null and processor != ''"> or processor = #{processor} </if>
|
||||
<if test="processorTime != null and processorTime != ''"> or processor_time = #{processorTime} </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> or processor_remark = #{processorRemark} </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> or new_metadata = #{newMetadata} </if>
|
||||
<if test="repairPust != null and repairPust != ''"> or repair_pust = #{repairPust} </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>
|
||||
<if test="remark != null and remark != ''"> or remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> or def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> or def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> or def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> or def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> or def5 = #{def5} </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.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity" >
|
||||
insert into integration_task_log_details(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="taskLinvingId != null and taskLinvingId != ''"> task_linving_id , </if>
|
||||
<if test="result != null and result != ''"> result , </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> query_condition , </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> root_app_pk , </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> root_app_bill , </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> root_app_new_data , </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> new_transmit_info , </if>
|
||||
<if test="newPushDate != null"> new_push_date , </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> root_app_code , </if>
|
||||
<if test="businessTime != null and businessTime != ''"> business_time , </if>
|
||||
<if test="newPushState != null and newPushState != ''"> new_push_state , </if>
|
||||
<if test="processor != null and processor != ''"> processor , </if>
|
||||
<if test="processorTime != null and processorTime != ''"> processor_time , </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> processor_remark , </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> new_metadata , </if>
|
||||
<if test="repairPust != null and repairPust != ''"> repair_pust , </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="remark != null and remark != ''"> remark , </if>
|
||||
<if test="def1 != null and def1 != ''"> def1 , </if>
|
||||
<if test="def2 != null and def2 != ''"> def2 , </if>
|
||||
<if test="def3 != null and def3 != ''"> def3 , </if>
|
||||
<if test="def4 != null and def4 != ''"> def4 , </if>
|
||||
<if test="def5 != null and def5 != ''"> def5 , </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="result != null and result != ''"> #{result} ,</if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> #{queryCondition} ,</if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> #{rootAppPk} ,</if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> #{rootAppBill} ,</if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> #{rootAppNewData} ,</if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> #{newTransmitInfo} ,</if>
|
||||
<if test="newPushDate != null"> #{newPushDate} ,</if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> #{rootAppCode} ,</if>
|
||||
<if test="businessTime != null and businessTime != ''"> #{businessTime} ,</if>
|
||||
<if test="newPushState != null and newPushState != ''"> #{newPushState} ,</if>
|
||||
<if test="processor != null and processor != ''"> #{processor} ,</if>
|
||||
<if test="processorTime != null and processorTime != ''"> #{processorTime} ,</if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> #{processorRemark} ,</if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> #{newMetadata} ,</if>
|
||||
<if test="repairPust != null and repairPust != ''"> #{repairPust} ,</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="remark != null and remark != ''"> #{remark} ,</if>
|
||||
<if test="def1 != null and def1 != ''"> #{def1} ,</if>
|
||||
<if test="def2 != null and def2 != ''"> #{def2} ,</if>
|
||||
<if test="def3 != null and def3 != ''"> #{def3} ,</if>
|
||||
<if test="def4 != null and def4 != ''"> #{def4} ,</if>
|
||||
<if test="def5 != null and def5 != ''"> #{def5} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from integration_task_log_details a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into integration_task_log_details(task_linving_id, result, query_condition, root_app_pk, root_app_bill, root_app_new_data, new_transmit_info, new_push_date, root_app_code, business_time, new_push_state, processor, processor_time, processor_remark, new_metadata, repair_pust, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, remark, def1, def2, def3, def4, def5, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskLinvingId},#{entity.result},#{entity.queryCondition},#{entity.rootAppPk},#{entity.rootAppBill},#{entity.rootAppNewData},#{entity.newTransmitInfo},#{entity.newPushDate},#{entity.rootAppCode},#{entity.businessTime},#{entity.newPushState},#{entity.processor},#{entity.processorTime},#{entity.processorRemark},#{entity.newMetadata},#{entity.repairPust},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into integration_task_log_details(task_linving_id, result, query_condition, root_app_pk, root_app_bill, root_app_new_data, new_transmit_info, new_push_date, root_app_code, business_time, new_push_state, processor, processor_time, processor_remark, new_metadata, repair_pust, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, remark, def1, def2, def3, def4, def5)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskLinvingId},#{entity.result},#{entity.queryCondition},#{entity.rootAppPk},#{entity.rootAppBill},#{entity.rootAppNewData},#{entity.newTransmitInfo},#{entity.newPushDate},#{entity.rootAppCode},#{entity.businessTime},#{entity.newPushState},#{entity.processor},#{entity.processorTime},#{entity.processorRemark},#{entity.newMetadata},#{entity.repairPust},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.remark},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
task_linving_id = values(task_linving_id),
|
||||
result = values(result),
|
||||
query_condition = values(query_condition),
|
||||
root_app_pk = values(root_app_pk),
|
||||
root_app_bill = values(root_app_bill),
|
||||
root_app_new_data = values(root_app_new_data),
|
||||
new_transmit_info = values(new_transmit_info),
|
||||
new_push_date = values(new_push_date),
|
||||
root_app_code = values(root_app_code),
|
||||
business_time = values(business_time),
|
||||
new_push_state = values(new_push_state),
|
||||
processor = values(processor),
|
||||
processor_time = values(processor_time),
|
||||
processor_remark = values(processor_remark),
|
||||
new_metadata = values(new_metadata),
|
||||
repair_pust = values(repair_pust),
|
||||
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),
|
||||
remark = values(remark),
|
||||
def1 = values(def1),
|
||||
def2 = values(def2),
|
||||
def3 = values(def3),
|
||||
def4 = values(def4),
|
||||
def5 = values(def5)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity" >
|
||||
update integration_task_log_details set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="taskLinvingId != null and taskLinvingId != ''"> task_linving_id = #{taskLinvingId},</if>
|
||||
<if test="result != null and result != ''"> result = #{result},</if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> query_condition = #{queryCondition},</if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> root_app_pk = #{rootAppPk},</if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> root_app_bill = #{rootAppBill},</if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> root_app_new_data = #{rootAppNewData},</if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> new_transmit_info = #{newTransmitInfo},</if>
|
||||
<if test="newPushDate != null"> new_push_date = #{newPushDate},</if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> root_app_code = #{rootAppCode},</if>
|
||||
<if test="businessTime != null and businessTime != ''"> business_time = #{businessTime},</if>
|
||||
<if test="newPushState != null and newPushState != ''"> new_push_state = #{newPushState},</if>
|
||||
<if test="processor != null and processor != ''"> processor = #{processor},</if>
|
||||
<if test="processorTime != null and processorTime != ''"> processor_time = #{processorTime},</if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> processor_remark = #{processorRemark},</if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> new_metadata = #{newMetadata},</if>
|
||||
<if test="repairPust != null and repairPust != ''"> repair_pust = #{repairPust},</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>
|
||||
<if test="remark != null and remark != ''"> remark = #{remark},</if>
|
||||
<if test="def1 != null and def1 != ''"> def1 = #{def1},</if>
|
||||
<if test="def2 != null and def2 != ''"> def2 = #{def2},</if>
|
||||
<if test="def3 != null and def3 != ''"> def3 = #{def3},</if>
|
||||
<if test="def4 != null and def4 != ''"> def4 = #{def4},</if>
|
||||
<if test="def5 != null and def5 != ''"> def5 = #{def5},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity" >
|
||||
update integration_task_log_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.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity" >
|
||||
update integration_task_log_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="result != null and result != ''"> and result = #{result} </if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> and query_condition = #{queryCondition} </if>
|
||||
<if test="rootAppPk != null and rootAppPk != ''"> and root_app_pk = #{rootAppPk} </if>
|
||||
<if test="rootAppBill != null and rootAppBill != ''"> and root_app_bill = #{rootAppBill} </if>
|
||||
<if test="rootAppNewData != null and rootAppNewData != ''"> and root_app_new_data = #{rootAppNewData} </if>
|
||||
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and new_transmit_info = #{newTransmitInfo} </if>
|
||||
<if test="newPushDate != null"> and new_push_date = #{newPushDate} </if>
|
||||
<if test="rootAppCode != null and rootAppCode != ''"> and root_app_code = #{rootAppCode} </if>
|
||||
<if test="businessTime != null and businessTime != ''"> and business_time = #{businessTime} </if>
|
||||
<if test="newPushState != null and newPushState != ''"> and new_push_state = #{newPushState} </if>
|
||||
<if test="processor != null and processor != ''"> and processor = #{processor} </if>
|
||||
<if test="processorTime != null and processorTime != ''"> and processor_time = #{processorTime} </if>
|
||||
<if test="processorRemark != null and processorRemark != ''"> and processor_remark = #{processorRemark} </if>
|
||||
<if test="newMetadata != null and newMetadata != ''"> and new_metadata = #{newMetadata} </if>
|
||||
<if test="repairPust != null and repairPust != ''"> and repair_pust = #{repairPust} </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>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark} </if>
|
||||
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from integration_task_log_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.sysnew.integrationTaskLogDetails.service;
|
||||
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 集成任务-日志详情(IntegrationTaskLogDetails)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-15 10:14:46
|
||||
*/
|
||||
public interface IIntegrationTaskLogDetailsService extends IBaseService<IntegrationTaskLogDetailsEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.sysnew.integrationTaskLogDetails.service.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.entity.IntegrationTaskLogDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.dao.IIntegrationTaskLogDetailsDao;
|
||||
import com.hzya.frame.sysnew.integrationTaskLogDetails.service.IIntegrationTaskLogDetailsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 集成任务-日志详情(IntegrationTaskLogDetails)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-15 10:14:46
|
||||
*/
|
||||
@Service(value = "integrationTaskLogDetailsService")
|
||||
public class IntegrationTaskLogDetailsServiceImpl extends BaseService<IntegrationTaskLogDetailsEntity, String> implements IIntegrationTaskLogDetailsService {
|
||||
|
||||
private IIntegrationTaskLogDetailsDao integrationTaskLogDetailsDao;
|
||||
|
||||
@Autowired
|
||||
public void setIntegrationTaskLogDetailsDao(IIntegrationTaskLogDetailsDao dao) {
|
||||
this.integrationTaskLogDetailsDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
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> {
|
||||
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
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{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sysnew.integtationTaskLog.dao;
|
||||
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 集成任务-实例详情(integration_task_log: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-06 15:37:55
|
||||
*/
|
||||
public interface IIntegrationTaskLogDao extends IBaseDao<IntegrationTaskLogEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sysnew.integtationTaskLog.dao.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.dao.IIntegrationTaskLogDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 集成任务-实例详情(IntegrationTaskLog)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-06 15:37:55
|
||||
*/
|
||||
@Repository(value = "IntegrationTaskLogDaoImpl")
|
||||
public class IntegrationTaskLogDaoImpl extends MybatisGenericDao<IntegrationTaskLogEntity, String> implements IIntegrationTaskLogDao {
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
package com.hzya.frame.sysnew.integtationTaskLivingDetails.entity;
|
||||
package com.hzya.frame.sysnew.integtationTaskLog.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 集成任务-实例详情(IntegrationTaskLivingDetails)实体类
|
||||
* 集成任务-实例详情(IntegrationTaskLog)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-06 15:37:55
|
||||
*/
|
||||
public class IntegrationTaskLivingDetailsEntity extends BaseEntity {
|
||||
public class IntegrationTaskLogEntity extends BaseEntity {
|
||||
|
||||
/** 集成任务-实例_id */
|
||||
private String taskLinvingId;
|
|
@ -1,9 +1,9 @@
|
|||
<?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">
|
||||
<mapper namespace="com.hzya.frame.sysnew.integtationTaskLog.dao.impl.IntegrationTaskLogDaoImpl">
|
||||
|
||||
<resultMap id="get-IntegrationTaskLivingDetailsEntity-result"
|
||||
type="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
<resultMap id="get-IntegrationTaskLogEntity-result"
|
||||
type="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="taskLinvingId" column="task_linving_id" jdbcType="VARCHAR"/>
|
||||
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="IntegrationTaskLivingDetailsEntity_Base_Column_List">
|
||||
<sql id="IntegrationTaskLogEntity_Base_Column_List">
|
||||
id
|
||||
,task_linving_id
|
||||
,task_id
|
||||
|
@ -45,17 +45,17 @@
|
|||
,company_id
|
||||
</sql>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">
|
||||
<select id="entity_get" resultMap="get-IntegrationTaskLogEntity-result">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
|
||||
from integration_task_living_details where id = #{id} and sts = 'Y'
|
||||
<include refid="IntegrationTaskLogEntity_Base_Column_List"/>
|
||||
from integration_task_log where id = #{id} and sts = 'Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
<select id="entity_list_base" resultMap="get-IntegrationTaskLogEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
|
||||
from integration_task_living_details
|
||||
<include refid="IntegrationTaskLogEntity_Base_Column_List"/>
|
||||
from integration_task_log
|
||||
<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>
|
||||
|
@ -83,8 +83,8 @@
|
|||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
select count(1) from integration_task_living_details
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
select count(1) from integration_task_log
|
||||
<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>
|
||||
|
@ -111,11 +111,11 @@
|
|||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
<select id="entity_list_like" resultMap="get-IntegrationTaskLogEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
|
||||
from integration_task_living_details
|
||||
<include refid="IntegrationTaskLogEntity_Base_Column_List"/>
|
||||
from integration_task_log
|
||||
<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
|
||||
|
@ -148,11 +148,11 @@
|
|||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="IntegrationTaskLivingDetailsentity_list_or" resultMap="get-IntegrationTaskLivingDetailsEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
<select id="IntegrationTaskLogentity_list_or" resultMap="get-IntegrationTaskLogEntity-result"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List"/>
|
||||
from integration_task_living_details
|
||||
<include refid="IntegrationTaskLogEntity_Base_Column_List"/>
|
||||
from integration_task_log
|
||||
<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>
|
||||
|
@ -180,8 +180,8 @@
|
|||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
insert into integration_task_living_details(
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
insert into integration_task_log(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="taskLinvingId != null and taskLinvingId != ''">task_linving_id ,</if>
|
||||
|
@ -230,7 +230,7 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into integration_task_living_details(task_linving_id, task_id, task_code, task_name, remark, task_status,
|
||||
insert into integration_task_log(task_linving_id, task_id, task_code, task_name, remark, 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
|
||||
|
@ -241,7 +241,7 @@
|
|||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into integration_task_living_details(task_linving_id, task_id, task_code, task_name, remark, task_status,
|
||||
insert into integration_task_log(task_linving_id, task_id, task_code, task_name, remark, 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
|
||||
|
@ -269,8 +269,8 @@
|
|||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update"
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
update integration_task_living_details set
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
update integration_task_log 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>
|
||||
|
@ -294,14 +294,14 @@
|
|||
</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}
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
update integration_task_log 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 =
|
||||
parameterType="com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity">
|
||||
update integration_task_log 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>
|
||||
|
@ -322,7 +322,7 @@ where id = #{id}
|
|||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from integration_task_living_details where id = #{id}
|
||||
delete from integration_task_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -1,17 +1,17 @@
|
|||
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service;
|
||||
package com.hzya.frame.sysnew.integtationTaskLog.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* 集成任务-实例详情(IntegrationTaskLivingDetails)表服务接口
|
||||
* 集成任务-实例详情(IntegrationTaskLog)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-06 15:37:55
|
||||
*/
|
||||
public interface IIntegrationTaskLivingDetailsService extends IBaseService<IntegrationTaskLivingDetailsEntity, String>{
|
||||
public interface IIntegrationTaskLogService extends IBaseService<IntegrationTaskLogEntity, String>{
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
|
@ -1,35 +1,33 @@
|
|||
package com.hzya.frame.sysnew.integtationTaskLivingDetails.service.impl;
|
||||
package com.hzya.frame.sysnew.integtationTaskLog.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.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.dao.IIntegrationTaskLogDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.service.IIntegrationTaskLogService;
|
||||
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)表服务实现类
|
||||
* 集成任务-实例详情(IntegrationTaskLog)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-06 15:37:55
|
||||
*/
|
||||
@Service(value = "integrationTaskLivingDetailsService")
|
||||
public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<IntegrationTaskLivingDetailsEntity, String> implements IIntegrationTaskLivingDetailsService {
|
||||
@Service(value = "integrationTaskLogService")
|
||||
public class IntegrationTaskLogServiceImpl extends BaseService<IntegrationTaskLogEntity, String> implements IIntegrationTaskLogService {
|
||||
|
||||
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
|
||||
private IIntegrationTaskLogDao integrationTaskLogDao;
|
||||
|
||||
@Autowired
|
||||
public void setIntegrationTaskLivingDetailsDao(IIntegrationTaskLivingDetailsDao dao) {
|
||||
this.integrationTaskLivingDetailsDao = dao;
|
||||
public void setIntegrationTaskLogDao(IIntegrationTaskLogDao dao) {
|
||||
this.integrationTaskLogDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
|
@ -42,13 +40,13 @@ public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<Integra
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryEntityPage(JSONObject jsonObject) {
|
||||
IntegrationTaskLivingDetailsEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLivingDetailsEntity.class);
|
||||
IntegrationTaskLogEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLogEntity.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);
|
||||
List<IntegrationTaskLogEntity> list = integrationTaskLogDao.queryByLike(entity);
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
@ -63,14 +61,14 @@ public class IntegrationTaskLivingDetailsServiceImpl extends BaseService<Integra
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity getEntity(JSONObject jsonObject) {
|
||||
IntegrationTaskLivingDetailsEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLivingDetailsEntity.class);
|
||||
IntegrationTaskLogEntity entity = getData("jsonStr", jsonObject, IntegrationTaskLogEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity = integrationTaskLivingDetailsDao.get(entity.getId());
|
||||
entity = integrationTaskLogDao.get(entity.getId());
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("获取任务日志失败");
|
||||
}
|
|
@ -66,7 +66,10 @@ public class SysMenuConfigEntity extends BaseEntity {
|
|||
*/
|
||||
private boolean check;
|
||||
private String label;
|
||||
|
||||
/** 表单ID */
|
||||
private String formId;
|
||||
/** options */
|
||||
private String options;
|
||||
//子级
|
||||
private List<SysMenuConfigEntity> children;
|
||||
public String getParentMenuId() {
|
||||
|
@ -189,5 +192,21 @@ public class SysMenuConfigEntity extends BaseEntity {
|
|||
public void setParentMenuName(String parentMenuName) {
|
||||
this.parentMenuName = parentMenuName;
|
||||
}
|
||||
|
||||
public String getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void setOptions(String options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public String getFormId() {
|
||||
return formId;
|
||||
}
|
||||
|
||||
public void setFormId(String formId) {
|
||||
this.formId = formId;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
<result property="menuName" column="menu_name" jdbcType="VARCHAR"/>
|
||||
<result property="menuEnglishName" column="menu_english_name" jdbcType="VARCHAR"/>
|
||||
<result property="menuIcon" column="menu_icon" jdbcType="VARCHAR"/>
|
||||
<result property="formId" column="form_id" jdbcType="VARCHAR"/>
|
||||
<result property="route" column="route" jdbcType="VARCHAR"/>
|
||||
<result property="options" column="options" jdbcType="VARCHAR"/>
|
||||
<result property="menuPage" column="menu_page" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="visibles" column="visibles" jdbcType="VARCHAR"/>
|
||||
|
@ -30,8 +32,10 @@
|
|||
,menu_name
|
||||
,menu_english_name
|
||||
,menu_icon
|
||||
,route
|
||||
,menu_page
|
||||
,form_id
|
||||
,route
|
||||
,options
|
||||
,menu_page
|
||||
,remark
|
||||
,visibles
|
||||
,show_type
|
||||
|
@ -53,7 +57,9 @@
|
|||
,a.menu_name
|
||||
,a.menu_english_name
|
||||
,a.menu_icon
|
||||
,a.form_id
|
||||
,a.route
|
||||
,a.options
|
||||
,a.menu_page
|
||||
,a.remark
|
||||
,a.visibles
|
||||
|
@ -82,7 +88,9 @@
|
|||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="formId != null and formId != ''">and form_id = #{formId}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="options != null and options != ''">and options = #{options}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
|
@ -111,7 +119,9 @@
|
|||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="formId != null and formId != ''">and form_id = #{formId}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="options != null and options != ''">and options = #{options}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
|
@ -144,7 +154,9 @@
|
|||
concat('%',#{menuEnglishName},'%')
|
||||
</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon like concat('%',#{menuIcon},'%')</if>
|
||||
<if test="formId != null and formId != ''">and form_id like concat('%',#{formId},'%')</if>
|
||||
<if test="route != null and route != ''">and route like concat('%',#{route},'%')</if>
|
||||
<if test="options != null and options != ''">and options like concat('%',#{options},'%')</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page like concat('%',#{menuPage},'%')</if>
|
||||
<if test="remark != null and remark != ''">and remark like concat('%',#{remark},'%')</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles like concat('%',#{visibles},'%')</if>
|
||||
|
@ -179,7 +191,9 @@
|
|||
<if test="menuName != null and menuName != ''">or menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">or menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">or menu_icon = #{menuIcon}</if>
|
||||
<if test="formId != null and formId != ''">or form_id = #{formId}</if>
|
||||
<if test="route != null and route != ''">or route = #{route}</if>
|
||||
<if test="options != null and options != ''">or options = #{options}</if>
|
||||
<if test="menuPage != null and menuPage != ''">or menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">or remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">or visibles = #{visibles}</if>
|
||||
|
@ -208,7 +222,9 @@
|
|||
<if test="menuName != null and menuName != ''">menu_name ,</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">menu_english_name ,</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">menu_icon ,</if>
|
||||
<if test="formId != null and formId != ''">form_id ,</if>
|
||||
<if test="route != null and route != ''">route ,</if>
|
||||
<if test="options != null and options != ''">options ,</if>
|
||||
<if test="menuPage != null and menuPage != ''">menu_page ,</if>
|
||||
<if test="remark != null and remark != ''">remark ,</if>
|
||||
<if test="visibles != null and visibles != ''">visibles ,</if>
|
||||
|
@ -230,7 +246,9 @@
|
|||
<if test="menuName != null and menuName != ''">#{menuName} ,</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">#{menuEnglishName} ,</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">#{menuIcon} ,</if>
|
||||
<if test="formId != null and formId != ''">#{formId} ,</if>
|
||||
<if test="route != null and route != ''">#{route} ,</if>
|
||||
<if test="options != null and options != ''">#{options} ,</if>
|
||||
<if test="menuPage != null and menuPage != ''">#{menuPage} ,</if>
|
||||
<if test="remark != null and remark != ''">#{remark} ,</if>
|
||||
<if test="visibles != null and visibles != ''">#{visibles} ,</if>
|
||||
|
@ -249,30 +267,32 @@
|
|||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch">
|
||||
insert into sys_menu_config(parent_menu_id, menu_name, menu_english_name, menu_icon, route,
|
||||
insert into sys_menu_config(parent_menu_id, menu_name, menu_english_name, menu_icon, form_id, route,options,
|
||||
menu_page, remark, visibles, show_type, 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.parentMenuId},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.route},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},
|
||||
(#{entity.parentMenuId},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.formId},#{entity.route},#{entity.options},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{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">
|
||||
insert into sys_menu_config(parent_menu_id, menu_name, menu_english_name, menu_icon, route,
|
||||
insert into sys_menu_config(parent_menu_id, menu_name, menu_english_name, menu_icon,form_id, route,options,
|
||||
menu_page, remark, visibles, show_type, sorts, create_user_id, create_time, modify_user_id, modify_time, sts,
|
||||
org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.parentMenuId},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.route},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
(#{entity.parentMenuId},#{entity.menuName},#{entity.menuEnglishName},#{entity.menuIcon},#{entity.formId},#{entity.route},#{entity.options},#{entity.menuPage},#{entity.remark},#{entity.visibles},#{entity.showType},#{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
|
||||
parent_menu_id = values(parent_menu_id),
|
||||
menu_name = values(menu_name),
|
||||
menu_english_name = values(menu_english_name),
|
||||
menu_icon = values(menu_icon),
|
||||
form_id = values(form_id),
|
||||
route = values(route),
|
||||
options = values(options),
|
||||
menu_page = values(menu_page),
|
||||
remark = values(remark),
|
||||
visibles = values(visibles),
|
||||
|
@ -294,7 +314,9 @@
|
|||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">menu_english_name = #{menuEnglishName},</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">menu_icon = #{menuIcon},</if>
|
||||
<if test="formId != null and formId != ''">form_id = #{formId},</if>
|
||||
<if test="route != null and route != ''">route = #{route},</if>
|
||||
<if test="options != null and options != ''">options = #{options},</if>
|
||||
<if test="menuPage != null and menuPage != ''">menu_page = #{menuPage},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="visibles != null and visibles != ''">visibles = #{visibles},</if>
|
||||
|
@ -325,7 +347,9 @@ where id = #{id}
|
|||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="formId != null and formId != ''">and form_id = #{formId}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="options != null and options != ''">and options = #{options}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
|
@ -352,7 +376,9 @@ where id = #{id}
|
|||
<if test="menuName != null and menuName != ''">and menu_name = #{menuName}</if>
|
||||
<if test="menuEnglishName != null and menuEnglishName != ''">and menu_english_name = #{menuEnglishName}</if>
|
||||
<if test="menuIcon != null and menuIcon != ''">and menu_icon = #{menuIcon}</if>
|
||||
<if test="formId != null and formId != ''">and form_id = #{formId}</if>
|
||||
<if test="route != null and route != ''">and route = #{route}</if>
|
||||
<if test="options != null and options != ''">and options = #{options}</if>
|
||||
<if test="menuPage != null and menuPage != ''">and menu_page = #{menuPage}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="visibles != null and visibles != ''">and visibles = #{visibles}</if>
|
||||
|
|
|
@ -106,6 +106,12 @@ public class SysMenuConfigServiceImpl extends BaseService<SysMenuConfigEntity, S
|
|||
}else {
|
||||
meta.put("hidden", true);
|
||||
}
|
||||
if(sysMenuConfigEntity.getOptions() != null && !"".equals(sysMenuConfigEntity.getOptions())){
|
||||
Map<String, Object> map = JSONObject.parseObject(sysMenuConfigEntity.getOptions(), new TypeReference<Map<String, Object>>(){});
|
||||
if(map != null && map.size() > 0){
|
||||
meta.putAll(map);
|
||||
}
|
||||
}
|
||||
moduleVo.setMeta(meta);
|
||||
List<ModuleVo> children = new ArrayList<>();
|
||||
for (int i = 0; i < sysMenuConfigEntities.size(); i++) {
|
||||
|
|
|
@ -291,7 +291,16 @@
|
|||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity"
|
||||
keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message_manage_log(
|
||||
insert into
|
||||
<choose>
|
||||
<when test=" status != null and status.trim() != '' and status == 3">
|
||||
sys_message_manage_log_success
|
||||
</when>
|
||||
<otherwise>
|
||||
sys_message_manage_log
|
||||
</otherwise>
|
||||
</choose>
|
||||
(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id ,</if>
|
||||
<if test="messageManageId != null and messageManageId != ''">message_manage_id ,</if>
|
||||
|
@ -551,7 +560,14 @@ where id = #{id}
|
|||
a.create_time AS createTime,
|
||||
a.modify_time AS modifyTime
|
||||
FROM
|
||||
sys_message_manage_log a
|
||||
<choose>
|
||||
<when test=" status != null and status.trim() != '' and status == 3">
|
||||
sys_message_manage_log_success a
|
||||
</when>
|
||||
<otherwise>
|
||||
sys_message_manage_log a
|
||||
</otherwise>
|
||||
</choose>
|
||||
LEFT JOIN sys_application sendApp ON a.send_app = sendApp.id AND sendApp.sts = 'Y'
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="ids != null and ids.size>0">
|
||||
|
@ -593,7 +609,14 @@ where id = #{id}
|
|||
SELECT
|
||||
id
|
||||
FROM
|
||||
sys_message_manage_log
|
||||
<choose>
|
||||
<when test=" status != null and status.trim() != '' and status == 3">
|
||||
sys_message_manage_log_success
|
||||
</when>
|
||||
<otherwise>
|
||||
sys_message_manage_log
|
||||
</otherwise>
|
||||
</choose>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
sts = 'Y'
|
||||
<if test="messageCode != null and messageCode != ''">and message_code = #{messageCode}
|
||||
|
|
|
@ -2,18 +2,14 @@ package com.hzya.frame.web.quartz;
|
|||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.sys.apireflection.service.impl.ApiHandleServiceImpl;
|
||||
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||
import com.hzya.frame.sysnew.integtationTask.IIntegrationTaskCacheableService;
|
||||
import com.hzya.frame.sysnew.integtationTask.entity.IntegrationTaskEntity;
|
||||
import com.hzya.frame.sysnew.integtationTask.service.impl.IntegrationTaskServiceImpl;
|
||||
import com.hzya.frame.sysnew.integtationTaskLiving.entity.IntegrationTaskLivingEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLiving.service.impl.IntegrationTaskLivingServiceImpl;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.dao.IIntegrationTaskLogDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLog.entity.IntegrationTaskLogEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
@ -22,11 +18,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +30,7 @@ public class QuartzJobFactory implements Job {
|
|||
@Resource
|
||||
private IIntegrationTaskCacheableService iIntegrationTaskCacheableService;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsDao integrationTaskLivingDetailsDao;
|
||||
private IIntegrationTaskLogDao integrationTaskLogDao;
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
//当前开始时间
|
||||
|
@ -82,23 +74,23 @@ public class QuartzJobFactory implements Job {
|
|||
return;
|
||||
}
|
||||
//任务日志
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setId(UUIDUtils.getUUID());
|
||||
integrationTaskLivingDetailsEntity.setTaskLinvingId(integrationTaskLivingEntity.getId());
|
||||
integrationTaskLivingDetailsEntity.setTaskId(integrationTaskEntity.getId());
|
||||
integrationTaskLivingDetailsEntity.setTaskCode(integrationTaskEntity.getTaskCode());
|
||||
integrationTaskLivingDetailsEntity.setTaskName(integrationTaskEntity.getTaskName());
|
||||
integrationTaskLivingDetailsEntity.setTaskStatus("1");
|
||||
integrationTaskLivingDetailsEntity.setStartTime(startTime);//当前任务开始时间
|
||||
integrationTaskLivingDetailsEntity.setCompanyId(integrationTaskEntity.getCompanyId());
|
||||
integrationTaskLivingDetailsEntity.setOrg_id(integrationTaskEntity.getOrg_id());
|
||||
integrationTaskLivingDetailsEntity.setCreate_user_id(integrationTaskEntity.getCreate_user_id());
|
||||
integrationTaskLivingDetailsEntity.setModify_user_id(integrationTaskEntity.getModify_user_id());
|
||||
integrationTaskLivingDetailsEntity.setCreate_time(new Date());
|
||||
integrationTaskLivingDetailsEntity.setModify_time(new Date());
|
||||
integrationTaskLivingDetailsEntity.setSts("Y");
|
||||
integrationTaskLivingDetailsEntity.setRemark("任务执行中,请等待");
|
||||
integrationTaskLivingDetailsDao.save(integrationTaskLivingDetailsEntity);
|
||||
IntegrationTaskLogEntity integrationTaskLogEntity = new IntegrationTaskLogEntity();
|
||||
integrationTaskLogEntity.setId(UUIDUtils.getUUID());
|
||||
integrationTaskLogEntity.setTaskLinvingId(integrationTaskLivingEntity.getId());
|
||||
integrationTaskLogEntity.setTaskId(integrationTaskEntity.getId());
|
||||
integrationTaskLogEntity.setTaskCode(integrationTaskEntity.getTaskCode());
|
||||
integrationTaskLogEntity.setTaskName(integrationTaskEntity.getTaskName());
|
||||
integrationTaskLogEntity.setTaskStatus("1");
|
||||
integrationTaskLogEntity.setStartTime(startTime);//当前任务开始时间
|
||||
integrationTaskLogEntity.setCompanyId(integrationTaskEntity.getCompanyId());
|
||||
integrationTaskLogEntity.setOrg_id(integrationTaskEntity.getOrg_id());
|
||||
integrationTaskLogEntity.setCreate_user_id(integrationTaskEntity.getCreate_user_id());
|
||||
integrationTaskLogEntity.setModify_user_id(integrationTaskEntity.getModify_user_id());
|
||||
integrationTaskLogEntity.setCreate_time(new Date());
|
||||
integrationTaskLogEntity.setModify_time(new Date());
|
||||
integrationTaskLogEntity.setSts("Y");
|
||||
integrationTaskLogEntity.setRemark("任务执行中,请等待");
|
||||
integrationTaskLogDao.save(integrationTaskLogEntity);
|
||||
integrationTaskLivingEntity.setTaskStatus("1");//执行中
|
||||
integrationTaskLivingEntity.setStartTime(startTime);
|
||||
integrationTaskLivingEntity.setModify_time(new Date());
|
||||
|
@ -106,14 +98,14 @@ public class QuartzJobFactory implements Job {
|
|||
//判断插件是否启用
|
||||
SysApplicationPluginEntity sysApplicationPluginEntity = iIntegrationTaskCacheableService.getSysApplicationPluginEntity(integrationTaskEntity.getTaskPlugin());
|
||||
if(sysApplicationPluginEntity == null || sysApplicationPluginEntity.getPluginCode() == null || !"1".equals(sysApplicationPluginEntity.getPluginStatus())){
|
||||
saveLivingAndDetail(integrationTaskLivingEntity,integrationTaskLivingDetailsEntity,
|
||||
saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity,
|
||||
"2","3","插件未启用,不执行任务",integrationTaskLivingEntity.getOldStartTime(),startTime,new Date());
|
||||
return;
|
||||
}
|
||||
//查找插件
|
||||
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(sysApplicationPluginEntity.getPluginCode());
|
||||
if(pluginBaseEntity == null ){
|
||||
saveLivingAndDetail(integrationTaskLivingEntity,integrationTaskLivingDetailsEntity,
|
||||
saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity,
|
||||
"2","3","插件未找到,不执行任务",integrationTaskLivingEntity.getOldStartTime(),startTime,new Date());
|
||||
return;
|
||||
}
|
||||
|
@ -125,15 +117,15 @@ public class QuartzJobFactory implements Job {
|
|||
JsonResultEntity jsonResultEntity = pluginBaseEntity.executeBusiness(req);
|
||||
if(jsonResultEntity.isFlag()){
|
||||
//写日志,修改任务实例
|
||||
saveLivingAndDetail(integrationTaskLivingEntity,integrationTaskLivingDetailsEntity,
|
||||
saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity,
|
||||
"2","2",jsonResultEntity.getMsg(),startTime,startTime,new Date());
|
||||
}else {
|
||||
//写日志,修改任务实例
|
||||
saveLivingAndDetail(integrationTaskLivingEntity,integrationTaskLivingDetailsEntity,
|
||||
saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity,
|
||||
"3","3",jsonResultEntity.getMsg(),startTime,startTime,new Date());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
saveLivingAndDetail(integrationTaskLivingEntity,integrationTaskLivingDetailsEntity,
|
||||
saveLivingAndDetail(integrationTaskLivingEntity, integrationTaskLogEntity,
|
||||
"3","3","插件执行失败,请联系管理员",startTime,startTime,new Date());
|
||||
logger.error("插件执行失败:"+e.getMessage());
|
||||
}
|
||||
|
@ -150,7 +142,7 @@ public class QuartzJobFactory implements Job {
|
|||
* @return void
|
||||
**/
|
||||
private void saveLivingAndDetail(IntegrationTaskLivingEntity integrationTaskLivingEntity,
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity,
|
||||
IntegrationTaskLogEntity integrationTaskLogEntity,
|
||||
String livingtype,String detailtype, String msg,Date oldStartTime,Date startTime,Date endTime) {
|
||||
Long interval = (endTime.getTime() - startTime.getTime()) / (1000); // 计算间隔天数
|
||||
integrationTaskLivingEntity.setTaskStatus(livingtype);//待执行
|
||||
|
@ -161,12 +153,12 @@ public class QuartzJobFactory implements Job {
|
|||
integrationTaskLivingEntity.setRunNum(integrationTaskLivingEntity.getRunNum()+1);
|
||||
integrationTaskLivingEntity.setModify_time(new Date());
|
||||
iIntegrationTaskCacheableService.updateIntegrationTaskLivingEntity(integrationTaskLivingEntity);
|
||||
if(integrationTaskLivingDetailsEntity != null ){
|
||||
integrationTaskLivingDetailsEntity.setEndTime(endTime);
|
||||
integrationTaskLivingDetailsEntity.setDiffTime(interval.toString());
|
||||
integrationTaskLivingDetailsEntity.setTaskStatus(detailtype);//执行成功
|
||||
integrationTaskLivingDetailsEntity.setRemark(msg);
|
||||
integrationTaskLivingDetailsDao.update(integrationTaskLivingDetailsEntity);
|
||||
if(integrationTaskLogEntity != null ){
|
||||
integrationTaskLogEntity.setEndTime(endTime);
|
||||
integrationTaskLogEntity.setDiffTime(interval.toString());
|
||||
integrationTaskLogEntity.setTaskStatus(detailtype);//执行成功
|
||||
integrationTaskLogEntity.setRemark(msg);
|
||||
integrationTaskLogDao.update(integrationTaskLogEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue