主数据修改,同步调整菜单表

This commit is contained in:
lvleigang 2024-05-15 08:36:08 +08:00
parent 1b653ff985
commit 62ac8ee77b
12 changed files with 340 additions and 117 deletions

View File

@ -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>

View File

@ -57,6 +57,7 @@ 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.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 +111,8 @@ public class MdmServiceImpl implements IMdmService {
private IMdmTableCodeRuleDao mdmTableCodeRuleDao;//模版数据表编码规则表
@Resource
protected IUserRoleMapper userRoleMapper;
@Resource
private ISysMenuConfigDao sysMenuConfigDao;
/**
* @param object
* @return com.hzya.frame.web.entity.JsonResultEntity
@ -968,15 +970,23 @@ 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("1");
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 新增按钮
//module.setServiceName("mdmService");//Spring bean名称
//module.setLvl("2");//等级
//module.setName("integrationOptionAdmin"+moduleEntity.getMdmCode());//名称
@ -999,29 +1009,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("显示信息保存成功,菜单配置失败请检查");
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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>

View File

@ -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;
}
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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,24 +1675,24 @@ 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);
//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())
@ -1725,7 +1725,6 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
}
}
//TODO 判断是否有内部api
Map<String, String> headerMap = sysExtensionApiEntity.getHeaders();
String querys = sysExtensionApiEntity.getQuerys();
String bodys = sysExtensionApiEntity.getBodys();
@ -1748,9 +1747,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 object = jsonArray.getJSONObject(i);
headers.put(object.getString("parameterName"), object.getString("example"));
@ -1817,7 +1816,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
}
logger.info("保存日志开始");
saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(),true);
saveLog(sendApp, receiveApp, receiveApi, oldbodys, bodys, oldheaderMap, headerMap, headers, oldquerys, querys, body.toString(), true);
logger.info("保存日志结束");
if (flag) {
if (JSONUtil.isTypeJSON(body.toString())) {
@ -1875,7 +1874,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
}
}
logger.info("保存日志开始");
saveLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headerMap, headers, oldquerys,querys, body.toString(), true);
saveLog(sendApp, receiveApp, receiveApi, oldbodys, bodys, oldheaderMap, headerMap, headers, oldquerys, querys, body.toString(), true);
logger.info("保存日志结束");
if (flag) {
return BaseResult.getSuccessMessageEntity("转发成功", body);
@ -1945,11 +1944,11 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
* @Date 11:36 上午 2023/10/20
**/
private void saveLog(SysApplicationEntity sendApp, SysApplicationEntity receiveApp, SysApplicationApiEntity receiveApi,
String oldbodys,String bodys,
Map<String, String> oldheaderMap,Map<String, String> headerMap,
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 +1970,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");//返回信息
@ -2145,6 +2123,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

View File

@ -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;
}
}

View File

@ -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>

View File

@ -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}