first commit

This commit is contained in:
zhengchengqiang
2024-11-11 09:53:47 +08:00
commit 3c26b78bbe
1593 changed files with 73406 additions and 0 deletions
@@ -0,0 +1,147 @@
<?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.alonginfo.project.engine.mapper.MxPagesMapper">
<resultMap type="MxPages" id="MxPagesResult">
<id property="pageId" column="page_id" />
<result property="pageName" column="page_name" />
<result property="proId" column="pro_id" />
<result property="pagePath" column="page_path" />
<result property="pageComponent" column="page_component" />
<result property="pageDevelopCanvas" column="page_developCanvas" />
<result property="pageLayout" column="page_layout" />
<result property="isOwnChartTheme" column="is_own_chartTheme" />
<result property="themeId" column="theme_id" />
<result property="pagePublish" column="page_publish" />
<result property="isEncrypt" column="is_encrypt" />
<result property="password" column="password" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="remark" column="remark" />
<result property="appCtrl" column="app_ctrl" />
</resultMap>
<sql id="selectmxPagesVo">
select page_id, page_name, pro_id, page_path, page_component, page_developCanvas, page_layout, is_own_chartTheme,
theme_id, page_publish,is_encrypt,password,create_time,create_by,remark
from mx_pages
</sql>
<!-- 查询工程页面信息 -->
<select id="getPages" parameterType="MxPages" resultMap="MxPagesResult">
select ma.page_id, ma.page_name, ma.pro_id, ma.page_path, ma.page_component, ma.page_developCanvas ,ma.page_layout , ma.is_own_chartTheme
,ma.theme_id , ma.page_publish, ma.is_encrypt, ma.password, ma.create_time, ma.create_by, ma.remark, ma.app_ctrl
from mx_pages ma
<where>
<if test="pageId != null and pageId != '' ">
AND ma.page_id = #{pageId}
</if>
<if test="proId != null and proId != ''">
AND ma.pro_id = #{proId}
</if>
</where>
</select>
<!-- 检测页面名称是否唯一 -->
<select id="selectPageForName" parameterType="MxPages" resultMap="MxPagesResult">
<include refid="selectmxPagesVo"/>
<where>
page_name = #{pageName}
</where>
</select>
<!-- 根据id获取页面信息 -->
<select id="getPageInfo" parameterType="MxPages" resultMap="MxPagesResult">
<include refid="selectmxPagesVo"/>
<where>
page_id = #{pageId}
</where>
</select>
<!-- 新增主题页面信息 -->
<insert id="insertPages" parameterType="MxPages">
insert into mx_pages (
<if test="pageId != null and pageId != '' ">page_id,</if>
<if test="pageName != null and pageName != '' ">page_name,</if>
<if test="proId != null and proId != '' ">pro_id,</if>
<if test="pagePath != null and pagePath != '' ">page_path,</if>
<if test="pageComponent != null and pageComponent != '' ">page_component,</if>
<if test="pageDevelopCanvas != null and pageDevelopCanvas != '' ">page_developCanvas,</if>
<if test="pageLayout != null and pageLayout != '' ">page_layout,</if>
<if test="isOwnChartTheme != null and isOwnChartTheme != '' ">is_own_chartTheme,</if>
<if test="themeId != null and themeId != '' ">theme_id,</if>
<if test="pagePublish != null and pagePublish != '' ">page_publish,</if>
<if test="isEncrypt != null and isEncrypt != '' ">is_encrypt,</if>
<if test="password != null and password != '' ">password,</if>
<if test="remark != null and remark != '' ">remark,</if>
<if test="createBy != null and createBy != '' ">create_by,</if>
create_time
) values (
<if test="pageId != null and pageId != '' ">#{pageId},</if>
<if test="pageName != null and pageName != '' ">#{pageName},</if>
<if test="proId != null and proId != '' ">#{proId},</if>
<if test="pagePath != null and pagePath != '' ">#{pagePath},</if>
<if test="pageComponent != null and pageComponent != '' ">#{pageComponent},</if>
<if test="pageDevelopCanvas != null and pageDevelopCanvas != '' ">#{pageDevelopCanvas},</if>
<if test="pageLayout != null and pageLayout != '' ">#{pageLayout},</if>
<if test="isOwnChartTheme != null and isOwnChartTheme != '' ">#{isOwnChartTheme},</if>
<if test="themeId != null and themeId != '' ">#{themeId},</if>
<if test="pagePublish != null and pagePublish != '' ">#{pagePublish},</if>
<if test="isEncrypt != null and isEncrypt != '' ">#{isEncrypt},</if>
<if test="password != null and password != '' ">#{password},</if>
<if test="remark != null and remark != '' ">#{remark},</if>
<if test="createBy != null and createBy != '' ">#{createBy},</if>
sysdate()
)
</insert>
<!-- 更新页面信息 -->
<update id="updatePages" parameterType="MxPages">
update mx_pages
<set>
<if test="pageName != null and pageName != '' ">page_name = #{pageName},</if>
<if test="pagePath != null and pagePath != '' ">page_path = #{pagePath},</if>
<if test="pageComponent != null and pageComponent != '' ">page_component = #{pageComponent},</if>
<if test="pageDevelopCanvas != null and pageDevelopCanvas != '' ">page_developCanvas = #{pageDevelopCanvas},</if>
<if test="pageLayout != null and pageLayout != '' ">page_layout = #{pageLayout},</if>
<if test="isOwnChartTheme != null and isOwnChartTheme != '' ">is_own_chartTheme = #{isOwnChartTheme},</if>
<if test="themeId != null and themeId != '' ">theme_id = #{themeId},</if>
<if test="pagePublish != null and pagePublish != '' ">page_publish = #{pagePublish},</if>
<if test="isEncrypt != null and isEncrypt != '' ">is_encrypt = #{isEncrypt},</if>
<if test="password != null and password != '' ">password = #{password},</if>
<if test="remark != null and remark != '' ">remark = #{remark},</if>
<if test="appCtrl != null and appCtrl != '' ">app_ctrl = #{appCtrl},</if>
</set>
where page_id = #{pageId}
</update>
<!-- 主题发布-->
<update id="releasePage" parameterType="MxPages">
update mx_pages
<set>
<if test="pagePublish != null and pagePublish != '' ">page_publish = #{pagePublish},</if>
<if test="isEncrypt != null and isEncrypt != '' ">is_encrypt = #{isEncrypt},</if>
<if test="password != null and password != '' ">password = #{password},</if>
</set>
where page_id = #{pageId}
</update>
<!-- 删除主题页面 -->
<delete id="mxDeletePage" parameterType="String">
delete from mx_pages where page_id = #{pageId}
</delete>
<!-- 根据工程id删除 页面信息-->
<delete id="deletePagesForProId" parameterType="String">
delete from mx_pages where pro_id in
<foreach item="proId" collection="array" open="(" separator="," close=")">
#{proId}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,107 @@
<?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.alonginfo.project.engine.mapper.MxProjectMapper">
<resultMap type="MxProject" id="MxProjectResult">
<id property="proId" column="pro_id" />
<result property="proName" column="pro_name" />
<result property="proState" column="pro_state" />
<result property="themeId" column="theme_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="themeName" column="theme_name" />
<result property="remark" column="remark" />
</resultMap>
<!-- 工程列表-->
<select id="selectProject" parameterType="MxProject" resultMap="MxProjectResult">
select ma.pro_id, ma.pro_name, ma.pro_state, ma.theme_id, ma.create_by, ma.create_time ,ma.update_by , ma.update_time ,ma.remark , us.theme_name
from mx_project ma left join mx_theme_manager us on ma.theme_id = us.theme_id
<where>
<if test="userId != null and userId != 1 ">
AND ma.pro_state = '0'
</if>
<if test="proName != null and proName != ''">
AND ma.pro_name like concat('%', #{proName}, '%')
</if>
</where>
order by create_time desc
</select>
<!-- 检测工程名是否唯一-->
<select id="selectProjectForName" parameterType="MxProject" resultMap="MxProjectResult">
select ma.pro_id, ma.pro_name, ma.pro_state, ma.theme_id, ma.create_by, ma.create_time
from mx_project ma
<where>
<if test="proName != null and proName != ''">
AND pro_name = #{proName}
</if>
</where>
</select>
<!-- 新增工程 -->
<insert id="insertPro" parameterType="MxProject">
insert into mx_project (
<if test="proId != null and proId != '' ">pro_id,</if>
<if test="proName != null and proName != '' ">pro_name,</if>
<if test="proState != null and proState != '' ">pro_state,</if>
<if test="themeId != null and themeId != '' ">theme_id,</if>
<if test="createBy != null and createBy != '' ">create_by,</if>
<if test="remark != null and remark != '' ">remark,</if>
create_time
) values (
<if test="proId != null and proId != '' ">#{proId},</if>
<if test="proName != null and proName != '' ">#{proName},</if>
<if test="proState != null and proState != '' ">#{proState},</if>
<if test="themeId != null and themeId != '' ">#{themeId},</if>
<if test="createBy != null and createBy != '' ">#{createBy},</if>
<if test="remark != null and remark != '' ">remark,</if>
sysdate()
)
</insert>
<!-- 根据id查询工程信息 -->
<select id="getInfo" parameterType="MxProject" resultMap="MxProjectResult">
select ma.pro_id, ma.pro_name, ma.pro_state, ma.theme_id, ma.create_by, ma.create_time ,ma.update_by , ma.update_time ,ma.remark
from mx_project ma
<where>
<if test="proId != null and proId != ''">
AND ma.pro_id = #{proId}
</if>
</where>
</select>
<!-- 更新工程信息-->
<update id="updateMxProject" parameterType="MxProject">
update mx_project
<set>
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
<if test="themeId != null and themeId != ''">theme_id = #{themeId},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where pro_id = #{proId}
</update>
<!-- 删除工程信息 -->
<delete id="deleteProjects" parameterType="String">
delete from mx_project where pro_id in
<foreach item="proId" collection="array" open="(" separator="," close=")">
#{proId}
</foreach>
</delete>
<!-- 改变工程状态-->
<update id="changeProState" parameterType="String">
update mx_project set pro_state = #{proState} where pro_id = #{proId}
</update>
</mapper>
@@ -0,0 +1,93 @@
<?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.alonginfo.project.engine.mapper.ThemeManagerMapper">
<resultMap type="ThemeManager" id="ThemeManagerResult">
<id property="themeId" column="theme_id" />
<result property="themeName" column="theme_name" />
<result property="jsonText" column="json_text" />
<result property="remark" column="remark" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="createDate" column="create_date" />
</resultMap>
<!-- 查询主题列表 -->
<select id="selectThemeManagerList" parameterType="ThemeManager" resultMap="ThemeManagerResult">
select ma.theme_id, ma.theme_name, ma.json_text, ma.remark, ma.user_id, us.user_name, ma.create_date
from mx_theme_manager ma , sys_user us
<where>
ma.user_id = us.user_id
<if test="userId != null and userId != 1 ">
AND ma.user_id = #{userId}
</if>
<if test="themeName != null and themeName != ''">
AND theme_name = like concat('%', #{themeName}, '%')
</if>
</where>
order by create_date desc
</select>
<!-- 根据主题名称查询 -->
<select id="selectThemeManagerForName" parameterType="ThemeManager" resultMap="ThemeManagerResult">
select ma.theme_id, ma.theme_name, ma.json_text, ma.remark, ma.user_id, ma.create_date
from mx_theme_manager ma
<where>
<if test="themeName != null and themeName != ''">
AND theme_name = #{themeName}
</if>
</where>
</select>
<!-- 新增图表主题 -->
<insert id="insertThemeManager" parameterType="ThemeManager">
insert into mx_theme_manager (
<if test="themeId != null and themeId != '' ">theme_id,</if>
<if test="themeName != null and themeName != '' ">theme_name,</if>
<if test="jsonText != null and jsonText != '' ">json_text,</if>
<if test="remark != null and remark != '' ">remark,</if>
<if test="userId != null and userId != '' ">user_id,</if>
create_date
) values (
<if test="themeId != null and themeId != '' ">#{themeId},</if>
<if test="themeName != null and themeName != '' ">#{themeName},</if>
<if test="jsonText != null and jsonText != '' ">#{jsonText},</if>
<if test="remark != null and remark != '' ">#{remark},</if>
<if test="userId != null and userId != '' ">#{userId},</if>
sysdate()
)
</insert>
<!-- 根据id获取信息-->
<select id="getInfoChartThemeId" parameterType="ThemeManager" resultMap="ThemeManagerResult">
select ma.theme_id, ma.theme_name, ma.json_text, ma.remark, ma.user_id, ma.create_date
from mx_theme_manager ma
<where>
<if test="themeId != null and themeId != ''">
AND theme_id = #{themeId}
</if>
</where>
</select>
<!-- 修改图表主题 -->
<update id="updateThemeManager" parameterType="ThemeManager">
update mx_theme_manager
<set>
<if test="themeName != null and themeName != ''">theme_name = #{themeName},</if>
<if test="jsonText != null and jsonText != ''">json_text = #{jsonText},</if>
<if test="remark != null and remark != ''">remark = #{remark}</if>
</set>
where theme_id = #{themeId}
</update>
<!-- 删除图表主题-->
<delete id="delChartTheme" parameterType="String">
delete from mx_theme_manager where theme_id in
<foreach item="themeId" collection="array" open="(" separator="," close=")">
#{themeId}
</foreach>
</delete>
</mapper>