Merge branch 'lvleigang' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into dev
This commit is contained in:
commit
9d264af585
|
@ -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/
|
||||
|
|
|
@ -69,6 +69,18 @@
|
|||
<profile.active>llg</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>xel</id> <!--相二林-->
|
||||
<properties>
|
||||
<profile.active>xel</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ydc</id> <!--英德赛-->
|
||||
<properties>
|
||||
<profile.active>ydc</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<build>
|
||||
<finalName>kangarooDataCenterV3</finalName>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -0,0 +1,21 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -72,4 +72,6 @@ mybatis-plus:
|
|||
global-config:
|
||||
db-config:
|
||||
id-type: auto # 主键策略
|
||||
ax:
|
||||
url:
|
||||
|
||||
|
|
|
@ -56,20 +56,20 @@
|
|||
SELECT
|
||||
count( 1 ) as normalNum
|
||||
FROM
|
||||
integration_task_monitoring
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND typed = '1'
|
||||
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_monitoring
|
||||
integration_task
|
||||
WHERE
|
||||
sts = 'Y'
|
||||
AND typed = '2'
|
||||
AND task_status = '2'
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
@ -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,37 +1675,38 @@ 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);
|
||||
sysExtensionApiEntity.setQuerys(oldquerys);
|
||||
sysExtensionApiEntity.setBodys(oldbodys);
|
||||
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())
|
||||
) {
|
||||
//获取类
|
||||
Object object = null;
|
||||
try {
|
||||
object = ApplicationContextUtil.getBeanByName(receiveApi.getBeanName());
|
||||
} catch (SecurityException e) {
|
||||
|
||||
}
|
||||
//获取类下面的方法
|
||||
Method[] methods = object.getClass().getMethods();
|
||||
methods = object.getClass().getMethods();
|
||||
if (methods == null || methods.length == 0) {
|
||||
return BaseResult.getFailureMessageEntity("未找到内部方法,请联系管理员");
|
||||
}
|
||||
|
@ -1725,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();
|
||||
|
@ -1748,12 +1748,12 @@ 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 object = jsonArray.getJSONObject(i);
|
||||
headers.put(object.getString("parameterName"), object.getString("example"));
|
||||
JSONObject object1 = jsonArray.getJSONObject(i);
|
||||
headers.put(object1.getString("parameterName"), object1.getString("example"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1817,14 +1817,37 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
|
||||
}
|
||||
logger.info("保存日志开始");
|
||||
saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(),true);
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(),true);
|
||||
if (methods != null && methods.length > 0) {
|
||||
for (Method m : methods) {
|
||||
if (null != m) {
|
||||
if (m.getName().equals(receiveApi.getFunName().trim()+"CallBack")) {
|
||||
try {
|
||||
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
m.invoke(object, sysMessageManageLogEntity);
|
||||
logger.info("invoke结束>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
} catch (Exception e) {
|
||||
logger.error("invokeException{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
@ -1875,10 +1898,38 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
}
|
||||
logger.info("保存日志开始");
|
||||
saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(), true);
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(), true);
|
||||
if (methods != null && methods.length > 0) {
|
||||
for (Method m : methods) {
|
||||
if (null != m) {
|
||||
if (m.getName().equals(receiveApi.getFunName().trim()+"CallBack")) {
|
||||
try {
|
||||
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
m.invoke(object, sysMessageManageLogEntity);
|
||||
logger.info("invoke结束>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
} catch (Exception e) {
|
||||
logger.error("invokeException{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
@ -1944,12 +1995,12 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
* @Description 保存日志
|
||||
* @Date 11:36 上午 2023/10/20
|
||||
**/
|
||||
private void saveLog(SysApplicationEntity sendApp, SysApplicationEntity receiveApp, SysApplicationApiEntity receiveApi,
|
||||
private SysMessageManageLogEntity saveLog(SysApplicationEntity sendApp, SysApplicationEntity receiveApp, SysApplicationApiEntity receiveApi,
|
||||
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 消息主题
|
||||
|
@ -1971,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");//返回信息
|
||||
|
@ -2049,6 +2079,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
sysMessageManageLogEntity.setModify_time(new Date());
|
||||
sysMessageManageLogEntity.setSts("Y");
|
||||
taskExecutor.execute(() -> doEsbTask(sysMessageManageLogEntity));
|
||||
return sysMessageManageLogEntity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2145,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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
package com.hzya.frame.u8.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* @Description u8返回对象
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 15:40
|
||||
**/
|
||||
public class U8ResponseDTO {
|
||||
@JSONField(name = "Flag")
|
||||
private String flag;
|
||||
@JSONField(name = "DataOne")
|
||||
private String dataOne;
|
||||
@JSONField(name = "DataTwo")
|
||||
private String dataTwo;
|
||||
@JSONField(name = "Msg")
|
||||
private String msg;
|
||||
|
||||
//如果co初始化失败,或者token不对的时候会返回这些信息
|
||||
private String code;
|
||||
private String success;
|
||||
private String message;
|
||||
private String data;
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getDataOne() {
|
||||
return dataOne;
|
||||
}
|
||||
|
||||
public void setDataOne(String dataOne) {
|
||||
this.dataOne = dataOne;
|
||||
}
|
||||
|
||||
public String getDataTwo() {
|
||||
return dataTwo;
|
||||
}
|
||||
|
||||
public void setDataTwo(String dataTwo) {
|
||||
this.dataTwo = dataTwo;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(String success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.hzya.frame.u8.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.u8.dto.U8ResponseDTO;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 15:30
|
||||
**/
|
||||
public class U8Util {
|
||||
|
||||
static Logger logger = LogManager.getLogger(U8Util.class);
|
||||
|
||||
//获取token
|
||||
public static String getToken() {
|
||||
String url = "/Api/Base/GetToken";
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("secretkey", "L1NhkDrQhtBDzTxFxPI0jxWcBzTBSPvaI5xZusRRi9ofS9d6ngxrj1erwbdjxtUT");
|
||||
logger.info("获取U8token参数:{}", jsonObject.toJSONString());
|
||||
String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body();
|
||||
logger.info("token返回参数:{}", jsonObject.toJSONString());
|
||||
if (StrUtil.isNotEmpty(token)) {
|
||||
U8ResponseDTO u8ResponseDTO = JSONObject.parseObject(token, U8ResponseDTO.class);
|
||||
return u8ResponseDTO.getMessage();
|
||||
}
|
||||
return token;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue