主数据修改,应用添加脚本类
This commit is contained in:
parent
ff5676689f
commit
e753410b89
|
@ -7,7 +7,7 @@ import com.hzya.frame.basedao.dao.IBaseDao;
|
|||
* 主数据功能应用分发表(mdm_module_distribute: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-14 10:06:36
|
||||
* @since 2024-06-17 11:05:32
|
||||
*/
|
||||
public interface IMdmModuleDistributeDao extends IBaseDao<MdmModuleDistributeEntity, String> {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-14 10:06:36
|
||||
* @since 2024-06-17 11:05:32
|
||||
*/
|
||||
@Repository(value = "MdmModuleDistributeDaoImpl")
|
||||
public class MdmModuleDistributeDaoImpl extends MybatisGenericDao<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeDao{
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-14 10:06:36
|
||||
* @since 2024-06-17 11:05:33
|
||||
*/
|
||||
public class MdmModuleDistributeEntity extends BaseEntity {
|
||||
|
||||
|
@ -19,10 +19,16 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
private String appId;
|
||||
/** 修改接口 */
|
||||
private String updateApi;
|
||||
/** 修改插件 */
|
||||
private String updateScript;
|
||||
/** 新增接口 */
|
||||
private String addApi;
|
||||
/** 新增插件 */
|
||||
private String addScript;
|
||||
/** 删除接口 */
|
||||
private String deleteApi;
|
||||
/** 删除插件 */
|
||||
private String deleteScript;
|
||||
/** 启用停用 0、停用1、启用 */
|
||||
private String enabledState;
|
||||
/** 主表ID */
|
||||
|
@ -56,6 +62,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.updateApi = updateApi;
|
||||
}
|
||||
|
||||
public String getUpdateScript() {
|
||||
return updateScript;
|
||||
}
|
||||
|
||||
public void setUpdateScript(String updateScript) {
|
||||
this.updateScript = updateScript;
|
||||
}
|
||||
|
||||
public String getAddApi() {
|
||||
return addApi;
|
||||
}
|
||||
|
@ -64,6 +78,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.addApi = addApi;
|
||||
}
|
||||
|
||||
public String getAddScript() {
|
||||
return addScript;
|
||||
}
|
||||
|
||||
public void setAddScript(String addScript) {
|
||||
this.addScript = addScript;
|
||||
}
|
||||
|
||||
public String getDeleteApi() {
|
||||
return deleteApi;
|
||||
}
|
||||
|
@ -72,6 +94,14 @@ public class MdmModuleDistributeEntity extends BaseEntity {
|
|||
this.deleteApi = deleteApi;
|
||||
}
|
||||
|
||||
public String getDeleteScript() {
|
||||
return deleteScript;
|
||||
}
|
||||
|
||||
public void setDeleteScript(String deleteScript) {
|
||||
this.deleteScript = deleteScript;
|
||||
}
|
||||
|
||||
public String getEnabledState() {
|
||||
return enabledState;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,11 @@
|
|||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||
<result property="updateApi" column="update_api" jdbcType="VARCHAR"/>
|
||||
<result property="updateScript" column="update_script" jdbcType="VARCHAR"/>
|
||||
<result property="addApi" column="add_api" jdbcType="VARCHAR"/>
|
||||
<result property="addScript" column="add_script" jdbcType="VARCHAR"/>
|
||||
<result property="deleteApi" column="delete_api" jdbcType="VARCHAR"/>
|
||||
<result property="deleteScript" column="delete_script" jdbcType="VARCHAR"/>
|
||||
<result property="enabledState" column="enabled_state" jdbcType="VARCHAR"/>
|
||||
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
|
@ -26,8 +29,11 @@
|
|||
,mdm_id
|
||||
,app_id
|
||||
,update_api
|
||||
,update_script
|
||||
,add_api
|
||||
,add_script
|
||||
,delete_api
|
||||
,delete_script
|
||||
,enabled_state
|
||||
,db_id
|
||||
,sorts
|
||||
|
@ -39,13 +45,6 @@
|
|||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-MdmModuleDistributeEntity-result">
|
||||
select
|
||||
<include refid="MdmModuleDistributeEntity_Base_Column_List" />
|
||||
from mdm_module_distribute where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDistributeEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDistribute.entity.MdmModuleDistributeEntity">
|
||||
select
|
||||
|
@ -56,8 +55,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="updateScript != null and updateScript != ''"> and update_script = #{updateScript} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="addScript != null and addScript != ''"> and add_script = #{addScript} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> and delete_script = #{deleteScript} </if>
|
||||
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
|
@ -82,8 +84,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="updateScript != null and updateScript != ''"> and update_script = #{updateScript} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="addScript != null and addScript != ''"> and add_script = #{addScript} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> and delete_script = #{deleteScript} </if>
|
||||
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
|
@ -110,8 +115,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api like concat('%',#{updateApi},'%') </if>
|
||||
<if test="updateScript != null and updateScript != ''"> and update_script like concat('%',#{updateScript},'%') </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api like concat('%',#{addApi},'%') </if>
|
||||
<if test="addScript != null and addScript != ''"> and add_script like concat('%',#{addScript},'%') </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api like concat('%',#{deleteApi},'%') </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> and delete_script like concat('%',#{deleteScript},'%') </if>
|
||||
<if test="enabledState != null and enabledState != ''"> and enabled_state like concat('%',#{enabledState},'%') </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id like concat('%',#{dbId},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
|
@ -138,8 +146,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> or update_api = #{updateApi} </if>
|
||||
<if test="updateScript != null and updateScript != ''"> or update_script = #{updateScript} </if>
|
||||
<if test="addApi != null and addApi != ''"> or add_api = #{addApi} </if>
|
||||
<if test="addScript != null and addScript != ''"> or add_script = #{addScript} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> or delete_api = #{deleteApi} </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> or delete_script = #{deleteScript} </if>
|
||||
<if test="enabledState != null and enabledState != ''"> or enabled_state = #{enabledState} </if>
|
||||
<if test="dbId != null and dbId != ''"> or db_id = #{dbId} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
|
@ -164,8 +175,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="appId != null and appId != ''"> app_id , </if>
|
||||
<if test="updateApi != null and updateApi != ''"> update_api , </if>
|
||||
<if test="updateScript != null and updateScript != ''"> update_script , </if>
|
||||
<if test="addApi != null and addApi != ''"> add_api , </if>
|
||||
<if test="addScript != null and addScript != ''"> add_script , </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> delete_api , </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> delete_script , </if>
|
||||
<if test="enabledState != null and enabledState != ''"> enabled_state , </if>
|
||||
<if test="dbId != null and dbId != ''"> db_id , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
|
@ -176,7 +190,6 @@
|
|||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -185,8 +198,11 @@
|
|||
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||
<if test="updateApi != null and updateApi != ''"> #{updateApi} ,</if>
|
||||
<if test="updateScript != null and updateScript != ''"> #{updateScript} ,</if>
|
||||
<if test="addApi != null and addApi != ''"> #{addApi} ,</if>
|
||||
<if test="addScript != null and addScript != ''"> #{addScript} ,</if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> #{deleteApi} ,</if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> #{deleteScript} ,</if>
|
||||
<if test="enabledState != null and enabledState != ''"> #{enabledState} ,</if>
|
||||
<if test="dbId != null and dbId != ''"> #{dbId} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
|
@ -197,32 +213,34 @@
|
|||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_distribute a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_distribute(mdm_id, app_id, update_api, add_api, delete_api, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
insert into mdm_module_distribute(mdm_id, app_id, update_api, update_script, add_api, add_script, delete_api, delete_script, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{entity.deleteApi},#{entity.enabledState},#{entity.dbId},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.updateScript},#{entity.addApi},#{entity.addScript},#{entity.deleteApi},#{entity.deleteScript},#{entity.enabledState},#{entity.dbId},#{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 mdm_module_distribute(mdm_id, app_id, update_api, add_api, delete_api, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
insert into mdm_module_distribute(mdm_id, app_id, update_api, update_script, add_api, add_script, delete_api, delete_script, enabled_state, db_id, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.addApi},#{entity.deleteApi},#{entity.enabledState},#{entity.dbId},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
(#{entity.mdmId},#{entity.appId},#{entity.updateApi},#{entity.updateScript},#{entity.addApi},#{entity.addScript},#{entity.deleteApi},#{entity.deleteScript},#{entity.enabledState},#{entity.dbId},#{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
|
||||
mdm_id = values(mdm_id),
|
||||
app_id = values(app_id),
|
||||
update_api = values(update_api),
|
||||
update_script = values(update_script),
|
||||
add_api = values(add_api),
|
||||
add_script = values(add_script),
|
||||
delete_api = values(delete_api),
|
||||
delete_script = values(delete_script),
|
||||
enabled_state = values(enabled_state),
|
||||
db_id = values(db_id),
|
||||
create_user_id = values(create_user_id),
|
||||
|
@ -239,8 +257,11 @@ update mdm_module_distribute set
|
|||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||
<if test="updateApi != null and updateApi != ''"> update_api = #{updateApi},</if>
|
||||
<if test="updateScript != null and updateScript != ''"> update_script = #{updateScript},</if>
|
||||
<if test="addApi != null and addApi != ''"> add_api = #{addApi},</if>
|
||||
<if test="addScript != null and addScript != ''"> add_script = #{addScript},</if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> delete_api = #{deleteApi},</if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> delete_script = #{deleteScript},</if>
|
||||
<if test="enabledState != null and enabledState != ''"> enabled_state = #{enabledState},</if>
|
||||
<if test="dbId != null and dbId != ''"> db_id = #{dbId},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
|
@ -266,8 +287,11 @@ update mdm_module_distribute set sts= 'N' ,modify_time = #{modify_time},modify_
|
|||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="updateApi != null and updateApi != ''"> and update_api = #{updateApi} </if>
|
||||
<if test="updateScript != null and updateScript != ''"> and update_script = #{updateScript} </if>
|
||||
<if test="addApi != null and addApi != ''"> and add_api = #{addApi} </if>
|
||||
<if test="addScript != null and addScript != ''"> and add_script = #{addScript} </if>
|
||||
<if test="deleteApi != null and deleteApi != ''"> and delete_api = #{deleteApi} </if>
|
||||
<if test="deleteScript != null and deleteScript != ''"> and delete_script = #{deleteScript} </if>
|
||||
<if test="enabledState != null and enabledState != ''"> and enabled_state = #{enabledState} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.hzya.frame.basedao.service.IBaseService;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-14 10:06:36
|
||||
* @since 2024-06-17 11:05:33
|
||||
*/
|
||||
public interface IMdmModuleDistributeService extends IBaseService<MdmModuleDistributeEntity, String>{
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.hzya.frame.basedao.service.impl.BaseService;
|
|||
* 主数据功能应用分发表(MdmModuleDistribute)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-14 10:06:36
|
||||
* @since 2024-06-17 11:05:33
|
||||
*/
|
||||
@Service(value = "mdmModuleDistributeService")
|
||||
public class MdmModuleDistributeServiceImpl extends BaseService<MdmModuleDistributeEntity, String> implements IMdmModuleDistributeService {
|
||||
|
|
|
@ -196,7 +196,6 @@
|
|||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -220,7 +219,6 @@
|
|||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_distribute_detail a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
|
@ -167,7 +167,6 @@
|
|||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -187,7 +186,6 @@
|
|||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
|
@ -161,7 +161,6 @@
|
|||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -180,7 +179,6 @@
|
|||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ${tableName} a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
|
@ -161,7 +161,6 @@
|
|||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -179,7 +178,6 @@
|
|||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_module_source a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sysnew.application.script.dao;
|
||||
|
||||
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 脚本表(sys_application_script: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 11:07:21
|
||||
*/
|
||||
public interface ISysApplicationScriptDao extends IBaseDao<SysApplicationScriptEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sysnew.application.script.dao.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
|
||||
import com.hzya.frame.sysnew.application.script.dao.ISysApplicationScriptDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 脚本表(SysApplicationScript)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 11:07:22
|
||||
*/
|
||||
@Repository(value = "SysApplicationScriptDaoImpl")
|
||||
public class SysApplicationScriptDaoImpl extends MybatisGenericDao<SysApplicationScriptEntity, String> implements ISysApplicationScriptDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
package com.hzya.frame.sysnew.application.script.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 脚本表(SysApplicationScript)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 11:07:22
|
||||
*/
|
||||
public class SysApplicationScriptEntity extends BaseEntity {
|
||||
|
||||
/** 应用id */
|
||||
private String appId;
|
||||
/** 脚本名称 */
|
||||
private String scriptName;
|
||||
/** 脚本编号 */
|
||||
private String scriptCode;
|
||||
/** 脚本版本 */
|
||||
private String scriptVersion;
|
||||
/** classname */
|
||||
private String className;
|
||||
/** 脚本内容 */
|
||||
private String scriptData;
|
||||
/** 描述 */
|
||||
private String scriptRemark;
|
||||
/** 发布日期 */
|
||||
private Date releaseDate;
|
||||
/** 启用停用(1启用2停用) */
|
||||
private String scriptStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public String getScriptName() {
|
||||
return scriptName;
|
||||
}
|
||||
|
||||
public void setScriptName(String scriptName) {
|
||||
this.scriptName = scriptName;
|
||||
}
|
||||
|
||||
public String getScriptCode() {
|
||||
return scriptCode;
|
||||
}
|
||||
|
||||
public void setScriptCode(String scriptCode) {
|
||||
this.scriptCode = scriptCode;
|
||||
}
|
||||
|
||||
public String getScriptVersion() {
|
||||
return scriptVersion;
|
||||
}
|
||||
|
||||
public void setScriptVersion(String scriptVersion) {
|
||||
this.scriptVersion = scriptVersion;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getScriptData() {
|
||||
return scriptData;
|
||||
}
|
||||
|
||||
public void setScriptData(String scriptData) {
|
||||
this.scriptData = scriptData;
|
||||
}
|
||||
|
||||
public String getScriptRemark() {
|
||||
return scriptRemark;
|
||||
}
|
||||
|
||||
public void setScriptRemark(String scriptRemark) {
|
||||
this.scriptRemark = scriptRemark;
|
||||
}
|
||||
|
||||
public Date getReleaseDate() {
|
||||
return releaseDate;
|
||||
}
|
||||
|
||||
public void setReleaseDate(Date releaseDate) {
|
||||
this.releaseDate = releaseDate;
|
||||
}
|
||||
|
||||
public String getScriptStatus() {
|
||||
return scriptStatus;
|
||||
}
|
||||
|
||||
public void setScriptStatus(String scriptStatus) {
|
||||
this.scriptStatus = scriptStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.sysnew.application.script.dao.impl.SysApplicationScriptDaoImpl">
|
||||
|
||||
<resultMap id="get-SysApplicationScriptEntity-result" type="com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="appId" column="app_id" jdbcType="VARCHAR"/>
|
||||
<result property="scriptName" column="script_name" jdbcType="VARCHAR"/>
|
||||
<result property="scriptCode" column="script_code" jdbcType="VARCHAR"/>
|
||||
<result property="scriptVersion" column="script_version" jdbcType="VARCHAR"/>
|
||||
<result property="className" column="class_name" jdbcType="VARCHAR"/>
|
||||
<result property="scriptData" column="script_data" jdbcType="VARCHAR"/>
|
||||
<result property="scriptRemark" column="script_remark" jdbcType="VARCHAR"/>
|
||||
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="scriptStatus" column="script_status" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "SysApplicationScriptEntity_Base_Column_List">
|
||||
id
|
||||
,app_id
|
||||
,script_name
|
||||
,script_code
|
||||
,script_version
|
||||
,class_name
|
||||
,script_data
|
||||
,script_remark
|
||||
,release_date
|
||||
,script_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
</sql>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-SysApplicationScriptEntity-result">
|
||||
select
|
||||
<include refid="SysApplicationScriptEntity_Base_Column_List"/>
|
||||
from sys_application_script where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysApplicationScriptEntity-result" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity">
|
||||
select
|
||||
<include refid="SysApplicationScriptEntity_Base_Column_List" />
|
||||
from sys_application_script
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name = #{scriptName} </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> and script_code = #{scriptCode} </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity">
|
||||
select count(1) from sys_application_script
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name = #{scriptName} </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> and script_code = #{scriptCode} </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysApplicationScriptEntity-result" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity">
|
||||
select
|
||||
<include refid="SysApplicationScriptEntity_Base_Column_List" />
|
||||
from sys_application_script
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name like concat('%',#{scriptName},'%') </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> and script_code like concat('%',#{scriptCode},'%') </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version like concat('%',#{scriptVersion},'%') </if>
|
||||
<if test="className != null and className != ''"> and class_name like concat('%',#{className},'%') </if>
|
||||
<if test="scriptData != null and scriptData != ''"> and script_data like concat('%',#{scriptData},'%') </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark like concat('%',#{scriptRemark},'%') </if>
|
||||
<if test="releaseDate != null"> and release_date like concat('%',#{releaseDate},'%') </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status like concat('%',#{scriptStatus},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysApplicationScriptentity_list_or" resultMap="get-SysApplicationScriptEntity-result" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity">
|
||||
select
|
||||
<include refid="SysApplicationScriptEntity_Base_Column_List" />
|
||||
from sys_application_script
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="appId != null and appId != ''"> or app_id = #{appId} </if>
|
||||
<if test="scriptName != null and scriptName != ''"> or script_name = #{scriptName} </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> or script_code = #{scriptCode} </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> or script_version = #{scriptVersion} </if>
|
||||
<if test="className != null and className != ''"> or class_name = #{className} </if>
|
||||
<if test="scriptData != null and scriptData != ''"> or script_data = #{scriptData} </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> or script_remark = #{scriptRemark} </if>
|
||||
<if test="releaseDate != null"> or release_date = #{releaseDate} </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> or script_status = #{scriptStatus} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity" >
|
||||
insert into sys_application_script(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="appId != null and appId != ''"> app_id , </if>
|
||||
<if test="scriptName != null and scriptName != ''"> script_name , </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> script_code , </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version , </if>
|
||||
class_name ,
|
||||
<if test="scriptData != null and scriptData != ''"> script_data , </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark , </if>
|
||||
<if test="releaseDate != null"> release_date , </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="appId != null and appId != ''"> #{appId} ,</if>
|
||||
<if test="scriptName != null and scriptName != ''"> #{scriptName} ,</if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> #{scriptCode} ,</if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> #{scriptVersion} ,</if>
|
||||
CONCAT('g','_',LAST_INSERT_ID()) ,
|
||||
<if test="scriptData != null and scriptData != ''"> #{scriptData} ,</if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> #{scriptRemark} ,</if>
|
||||
<if test="releaseDate != null"> #{releaseDate} ,</if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> #{scriptStatus} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into sys_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{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_application_script(app_id, script_name, script_code, script_version, class_name, script_data, script_remark, release_date, script_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.appId},#{entity.scriptName},#{entity.scriptCode},#{entity.scriptVersion},#{entity.className},#{entity.scriptData},#{entity.scriptRemark},#{entity.releaseDate},#{entity.scriptStatus},#{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
|
||||
app_id = values(app_id),
|
||||
script_name = values(script_name),
|
||||
script_code = values(script_code),
|
||||
script_version = values(script_version),
|
||||
class_name = values(class_name),
|
||||
script_data = values(script_data),
|
||||
script_remark = values(script_remark),
|
||||
release_date = values(release_date),
|
||||
script_status = values(script_status),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity" >
|
||||
update sys_application_script set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="appId != null and appId != ''"> app_id = #{appId},</if>
|
||||
<if test="scriptName != null and scriptName != ''"> script_name = #{scriptName},</if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> script_code = #{scriptCode},</if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> script_version = #{scriptVersion},</if>
|
||||
<if test="className != null and className != ''"> class_name = #{className},</if>
|
||||
<if test="scriptData != null and scriptData != ''"> script_data = #{scriptData},</if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> script_remark = #{scriptRemark},</if>
|
||||
<if test="releaseDate != null"> release_date = #{releaseDate},</if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> script_status = #{scriptStatus},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity" >
|
||||
update sys_application_script set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity" >
|
||||
update sys_application_script set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="appId != null and appId != ''"> and app_id = #{appId} </if>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name = #{scriptName} </if>
|
||||
<if test="scriptCode != null and scriptCode != ''"> and script_code = #{scriptCode} </if>
|
||||
<if test="scriptVersion != null and scriptVersion != ''"> and script_version = #{scriptVersion} </if>
|
||||
<if test="className != null and className != ''"> and class_name = #{className} </if>
|
||||
<if test="scriptData != null and scriptData != ''"> and script_data = #{scriptData} </if>
|
||||
<if test="scriptRemark != null and scriptRemark != ''"> and script_remark = #{scriptRemark} </if>
|
||||
<if test="releaseDate != null"> and release_date = #{releaseDate} </if>
|
||||
<if test="scriptStatus != null and scriptStatus != ''"> and script_status = #{scriptStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from sys_application_script where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.sysnew.application.script.service;
|
||||
|
||||
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 脚本表(SysApplicationScript)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 11:07:22
|
||||
*/
|
||||
public interface ISysApplicationScriptService extends IBaseService<SysApplicationScriptEntity, String>{
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.sysnew.application.script.service.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
|
||||
import com.hzya.frame.sysnew.application.script.dao.ISysApplicationScriptDao;
|
||||
import com.hzya.frame.sysnew.application.script.service.ISysApplicationScriptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 脚本表(SysApplicationScript)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-17 11:07:22
|
||||
*/
|
||||
@Service(value = "sysApplicationScriptService")
|
||||
public class SysApplicationScriptServiceImpl extends BaseService<SysApplicationScriptEntity, String> implements ISysApplicationScriptService {
|
||||
|
||||
private ISysApplicationScriptDao sysApplicationScriptDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysApplicationScriptDao(ISysApplicationScriptDao dao) {
|
||||
this.sysApplicationScriptDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -357,4 +357,64 @@ public interface ISysApplicationService extends IBaseService<SysApplicationEntit
|
|||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
JsonResultEntity queryPlugAndApi(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本查询分页接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity queryAppScriptPage(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本查询接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity queryAppScript(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本修改接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity saveAppScript(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本修改接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity updateAppScript(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本删除接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity deleteAppScript(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 获取脚本接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity getAppScript(JSONObject jsonObject);
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 脚本启用停用接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
* @param jsonObject
|
||||
* @return
|
||||
**/
|
||||
JsonResultEntity enableOrDisableAppScript(JSONObject jsonObject);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
|||
import com.hzya.frame.sysnew.application.plugin.dao.ISysApplicationPluginDao;
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginDto;
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||
import com.hzya.frame.sysnew.application.script.dao.ISysApplicationScriptDao;
|
||||
import com.hzya.frame.sysnew.application.script.entity.SysApplicationScriptEntity;
|
||||
import com.hzya.frame.sysnew.application.service.ISysApplicationService;
|
||||
import com.hzya.frame.sysnew.integtationTask.IIntegrationTaskCacheableService;
|
||||
import com.hzya.frame.sysnew.messageManage.dao.ISysMessageManageDao;
|
||||
|
@ -116,6 +118,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
@Resource
|
||||
private ISysApplicationPluginDao sysApplicationPluginDao;
|
||||
@Resource
|
||||
private ISysApplicationScriptDao sysApplicationScriptDao;
|
||||
@Resource
|
||||
private ISysMessageManageDao sysMessageManageDao;
|
||||
@Resource
|
||||
private ISysMessageManageDetailDao sysMessageManageDetailDao; //明细表
|
||||
|
@ -2282,4 +2286,156 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
jsonObject1.put("api",sysApplicationApiEntity);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", jsonObject1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本查询分页接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryAppScriptPage(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
//判断分页
|
||||
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
|
||||
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
|
||||
}
|
||||
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
|
||||
List<SysApplicationScriptEntity> sysApplicationScriptEntities = sysApplicationScriptDao.queryByLike(entity);
|
||||
PageInfo pageInfo = new PageInfo(sysApplicationScriptEntities);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本查询接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity queryAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
List<SysApplicationScriptEntity> sysApplicationScriptEntities = sysApplicationScriptDao.queryByLike(entity);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", sysApplicationScriptEntities);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本修改接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity saveAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getScriptCode() == null || "".equals(entity.getScriptCode())) {
|
||||
return BaseResult.getFailureMessageEntity("请先输入脚本编号");
|
||||
}
|
||||
if (entity.getScriptData() == null || "".equals(entity.getScriptData())) {
|
||||
return BaseResult.getFailureMessageEntity("请先输入脚本内容");
|
||||
}
|
||||
entity.setCreate();
|
||||
sysApplicationScriptDao.save(entity);
|
||||
return BaseResult.getSuccessMessageEntity("保存脚本成功", entity.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本修改接口
|
||||
* @Date 2:09 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity updateAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getScriptCode() == null || "".equals(entity.getScriptCode())) {
|
||||
return BaseResult.getFailureMessageEntity("请先输入脚本编号");
|
||||
}
|
||||
if (entity.getScriptData() == null || "".equals(entity.getScriptData())) {
|
||||
return BaseResult.getFailureMessageEntity("请先输入脚本内容");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysApplicationScriptDao.update(entity);
|
||||
return BaseResult.getSuccessMessageEntity("修改脚本成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本删除接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity deleteAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysApplicationScriptDao.logicRemoveMultiCondition(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除脚本成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 获取脚本接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity getAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//查询接口
|
||||
SysApplicationScriptEntity sysApplicationScriptEntity = sysApplicationScriptDao.get(entity.getId());
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", sysApplicationScriptEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return
|
||||
* @Author lvleigang
|
||||
* @Description 脚本启用停用接口
|
||||
* @Date 2:10 下午 2023/9/23
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity enableOrDisableAppScript(JSONObject object) {
|
||||
SysApplicationScriptEntity entity = getData("jsonStr", object, SysApplicationScriptEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getScriptStatus() == null || "".equals(entity.getScriptStatus())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysApplicationScriptDao.update(entity);
|
||||
if ("1".equals(entity.getScriptStatus())) {// 1启用2停用
|
||||
return BaseResult.getSuccessMessageEntity("启用成功");
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("停用成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue