#HTXC-1# 初始化开发环境
parent
8888f3fe70
commit
e17a2e762c
@ -0,0 +1,127 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.CardMapper">
|
||||||
|
<update id="editCard">
|
||||||
|
update ${tableName}
|
||||||
|
<set>
|
||||||
|
<foreach collection="sets" index="index" item="item" open="" separator="," close="">
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</foreach>
|
||||||
|
</set>
|
||||||
|
where ${primaryKey} = #{primaryKeyValue}
|
||||||
|
</update>
|
||||||
|
<insert id="addCardBackId" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="addCardWithUUID" >
|
||||||
|
insert into ${tableName}
|
||||||
|
( uuid
|
||||||
|
<foreach collection="sets" index="index" item="item" open="," separator="," close=")">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
( #{uuid}
|
||||||
|
<foreach collection="sets" index="index" item="item" open="," separator="," close=")">
|
||||||
|
#{item.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertCard">
|
||||||
|
insert into ${tableName}
|
||||||
|
(
|
||||||
|
<if test="uuid != null and uuid != ''"> uuid, </if>
|
||||||
|
<if test="sets != null">
|
||||||
|
<foreach collection="sets" index="index" item="item" open="" separator="," close="">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
values
|
||||||
|
(
|
||||||
|
<if test="uuid != null and uuid != ''"> #{uuid}, </if>
|
||||||
|
<if test="sets != null">
|
||||||
|
<foreach collection="sets" index="index" item="item" open="" separator="," close="">
|
||||||
|
#{item.value}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<update id="updateCard" >
|
||||||
|
update ${tableName}
|
||||||
|
<set>
|
||||||
|
<if test="sets != null">
|
||||||
|
<foreach collection="sets" index="index" item="item" open="" separator="," close="">
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where ${primaryKey} = #{primaryKeyValue}
|
||||||
|
</update>
|
||||||
|
<delete id="deleteCard">
|
||||||
|
delete from ${tableName} where ${primaryKey} = #{primaryKeyValue}
|
||||||
|
</delete>
|
||||||
|
<insert id="addCard">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<select id="getCard" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select
|
||||||
|
<choose>
|
||||||
|
<when test="fields!=null">
|
||||||
|
<foreach collection="fields" index="index" item="item" open="" separator="," close="">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
*
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
from ${tableName}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere!=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="primaryKey!=null and primaryKey != '' and primaryKeyValue!=null and primaryKeyValue != ''">
|
||||||
|
and ${primaryKey} = #{primaryKeyValue}
|
||||||
|
</if>
|
||||||
|
<if test="sqlWhereList!=null">
|
||||||
|
<foreach collection="sqlWhereList" index="index" item="item" open="" separator=" " close="">
|
||||||
|
and ${item.name} = #{item.value}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="getIdByUUID" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select ${primaryKey} primaryKey from ${tableName} where uuid = #{uuid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getHtmlLabelIndexId" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select indexid id from htmllabelinfo where labelname = #{text} and languageid = #{languageid}
|
||||||
|
</select>
|
||||||
|
<select id="getNextHtmlLabelIndexId" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select min(id) id from htmllabelindex
|
||||||
|
</select>
|
||||||
|
<delete id="deleteHtmlLabelIndex">
|
||||||
|
delete from htmllabelindex where id = #{indexid}
|
||||||
|
</delete>
|
||||||
|
<insert id="newHtmlLabelIndex">
|
||||||
|
insert into htmllabelindex values(#{indexid}, #{text})
|
||||||
|
</insert>
|
||||||
|
<delete id="deleteHtmlLabelInfo">
|
||||||
|
delete from htmllabelinfo where indexid = #{indexid}
|
||||||
|
</delete>
|
||||||
|
<insert id="newHtmlLabelInfo" >
|
||||||
|
insert into htmllabelinfo values (#{indexid},#{text},#{languageid})
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
@ -0,0 +1,75 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.CustomPageMapper">
|
||||||
|
<select id="getAllPages" resultType="com.api.formmode.mybatis.bean.CustomPageBean">
|
||||||
|
select id, customname, customdesc, creater, createdate,
|
||||||
|
createtime, appid, props propsStr, subcompanyid, guid,
|
||||||
|
component
|
||||||
|
from mode_custompage
|
||||||
|
union all
|
||||||
|
select id, customname, customdesc, creater, createdate,
|
||||||
|
createtime, appid, props propsStr, subcompanyid, guid,
|
||||||
|
component
|
||||||
|
from cpt_custompage
|
||||||
|
</select>
|
||||||
|
<select id="getDocker" resultType="com.api.formmode.mybatis.bean.CustomPageBean">
|
||||||
|
select a.*, a.props propsStr
|
||||||
|
from mode_custompage a
|
||||||
|
where
|
||||||
|
<choose>
|
||||||
|
<when test="guid !=null and guid != ''">
|
||||||
|
a.guid = #{guid}
|
||||||
|
</when>
|
||||||
|
<when test="id != null and id != ''">
|
||||||
|
a.id = #{id}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
1=2
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
union all
|
||||||
|
select a.*, a.props propsStr
|
||||||
|
from cpt_custompage a
|
||||||
|
where
|
||||||
|
<choose>
|
||||||
|
<when test="guid !=null and guid != ''">
|
||||||
|
a.guid = #{guid}
|
||||||
|
</when>
|
||||||
|
<when test="id != null and id != ''">
|
||||||
|
a.id = #{id}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
1=2
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</select>
|
||||||
|
<insert id="addDocker">
|
||||||
|
insert into mode_custompage
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
${item.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="sets" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<update id="editDocker">
|
||||||
|
update mode_custompage
|
||||||
|
set
|
||||||
|
<foreach collection="sets" index="index" item="item" open="" separator="," close="">
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</foreach>
|
||||||
|
where
|
||||||
|
<choose>
|
||||||
|
<when test="guid !=null and guid != ''">
|
||||||
|
guid = #{guid}
|
||||||
|
</when>
|
||||||
|
<when test="id != null and id != ''">
|
||||||
|
id = #{id}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
1=2
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -0,0 +1,62 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.CustomSearchMapper">
|
||||||
|
<select id="getButtons" resultType="com.api.formmode.mybatis.bean.CustomSearchBatchSetBean">
|
||||||
|
select COALESCE(s.id, 0) as batchSetId,
|
||||||
|
COALESCE(s.listBatchName, e.expendName) as listBatchName,
|
||||||
|
COALESCE(s.isUse, e.defaultenable) as isUse,
|
||||||
|
s.isShortCutButton,
|
||||||
|
COALESCE(s.expandId, e.id) as expandId,
|
||||||
|
e.isSystemFlag,
|
||||||
|
e.showType,
|
||||||
|
e.openType,
|
||||||
|
e.hrefType,
|
||||||
|
e.hrefId,
|
||||||
|
e.hrefTarget
|
||||||
|
from mode_pageExpand e
|
||||||
|
left join mode_batchSet s
|
||||||
|
on e.id = s.expandId
|
||||||
|
and s.customSearchId = #{customId}
|
||||||
|
where
|
||||||
|
<choose>
|
||||||
|
<when test="modeId==0">
|
||||||
|
e.MODEID is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
e.modeId = #{modeId}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
and COALESCE(s.isUse, e.defaultenable) = '1'
|
||||||
|
and e.isbatch in ('1','2')
|
||||||
|
order by COALESCE(s.showOrder,e.showOrder)
|
||||||
|
</select>
|
||||||
|
<select id="getColumns" resultType="com.api.formmode.mybatis.bean.FieldBean">
|
||||||
|
select a.id as dspId,a.customId,a.FieldId,a.isQuery, a.isShow,a.showOrder,
|
||||||
|
a.queryOrder,a.isTitle,a.colWidth,a.isOrder,a.orderType,
|
||||||
|
a.orderNum,a.isStat,a.isKey,a.isOrderField,a.priOrder,
|
||||||
|
a.hrefLink,a.showMethod,a.isGroup,a.searchParaName,a.searchParaName1,
|
||||||
|
a.isAdvancedQuery,a.advancedQueryOrder,a.conditionTransition,a.isMapLocation,a.editable as isEditable,
|
||||||
|
COALESCE(a.showNameLabel,b.fieldLabel) as showNameLabel,
|
||||||
|
b.billId,b.fieldDbType,b.fieldHtmlType,b.type,b.fieldName,
|
||||||
|
b.viewType
|
||||||
|
from mode_CustomDspField a
|
||||||
|
left join workflow_billfield b on a.fieldid = b.id
|
||||||
|
where a.customid = #{customId}
|
||||||
|
<if test="isKey!=null and isKey !=''">
|
||||||
|
and isKey = #{isKey}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<delete id="deleteData" >
|
||||||
|
delete from ${tableName}
|
||||||
|
where ${primaryKey} in
|
||||||
|
<foreach collection="primaryKeyValues" index="index" item="value" open="(" separator="," close=")">
|
||||||
|
#{value}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
<select id="getCustomButtons" resultType="com.api.formmode.mybatis.bean.CustomSearchButtonBean">
|
||||||
|
select * from mode_customsearchButton where objid = #{customId} and isShow = '1' order by SHOWORDER
|
||||||
|
</select>
|
||||||
|
<select id="getBatchEditDetail" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select a.*, b.fieldname from mode_batchmodifydetail a, workflow_billfield b where a.FEILDID = b.id and a.mainid = #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,103 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.FormMapper">
|
||||||
|
<resultMap id="selectResultMap" type="com.api.formmode.mybatis.bean.SelectItemBean">
|
||||||
|
<id property="key" column="selectValue" />
|
||||||
|
<result property="title" column="selectName" />
|
||||||
|
<result property="value" column="selectValue" />
|
||||||
|
</resultMap>
|
||||||
|
<select id="getSelectItems" resultMap="selectResultMap" >
|
||||||
|
select selectName ,selectValue
|
||||||
|
from workflow_selectItem
|
||||||
|
where fieldId = #{fieldId}
|
||||||
|
order by selectValue asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetailTables" resultType="com.api.formmode.mybatis.bean.DetailTableBean">
|
||||||
|
select id, billId,
|
||||||
|
tableName, title, orderId
|
||||||
|
from workflow_billdetailtable
|
||||||
|
where billId = #{billId}
|
||||||
|
order by orderId asc
|
||||||
|
</select>
|
||||||
|
<select id="getFieldSelects" resultType="com.api.formmode.mybatis.bean.FieldBean">
|
||||||
|
select a.id fieldId, a.fieldDbType, a.fieldName, a.fieldLabel,
|
||||||
|
a.detailTable
|
||||||
|
from workflow_billfield a
|
||||||
|
where a.billid = #{formId}
|
||||||
|
<if test=" viewType !=null and viewType != '' ">
|
||||||
|
and a.viewType = #{viewType}
|
||||||
|
</if>
|
||||||
|
<if test=" detailTable!=null and detailTable != '' ">
|
||||||
|
and a.detailTable = #{detailTable}
|
||||||
|
</if>
|
||||||
|
<if test="fieldHtmlType != null and fieldHtmlType != '' ">
|
||||||
|
and a.FIELDHTMLTYPE = #{fieldHtmlType}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and type != '' ">
|
||||||
|
and a.type = #{type}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<delete id="deleteData">
|
||||||
|
delete from ${tableName} where ${field} = #{value}
|
||||||
|
</delete>
|
||||||
|
<insert id="addRow">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="sets" item="set" index="ni" open="(" separator="," close=")">
|
||||||
|
${set.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="sets" item="set" index="vi" open="(" separator="," close=")">
|
||||||
|
#{set.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="addData" databaseId="sqlserver">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="columns" item="col" index="ci" open="(" separator="," close=")">
|
||||||
|
${col}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="datas" item="row" index="ri" open="" separator="," close="">
|
||||||
|
<foreach collection="row" item="data" index="di" open="(" separator="," close=")">
|
||||||
|
#{data}
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="addData" databaseId="mysql">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="columns" item="col" index="ci" open="(" separator="," close=")">
|
||||||
|
${col}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="datas" item="row" index="ri" open="" separator="," close="">
|
||||||
|
<foreach collection="row" item="data" index="di" open="(" separator="," close=")">
|
||||||
|
#{data}
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="addData" databaseId="oracle">
|
||||||
|
insert into ${tableName}
|
||||||
|
<foreach collection="columns" item="col" index="ci" open="(" separator="," close=")">
|
||||||
|
${col}
|
||||||
|
</foreach>
|
||||||
|
<foreach collection="datas" item="row" index="ri" open="select * from (" separator="union all" close=") t">
|
||||||
|
<foreach collection="row" item="data" index="di" open="select" separator="," close="from dual">
|
||||||
|
#{data}
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<select id="getHrmResourceFields" resultType="com.api.formmode.mybatis.bean.FieldBean">
|
||||||
|
select a.id fieldId, a.fieldLabel
|
||||||
|
from workflow_billfield a
|
||||||
|
where a.fieldhtmltype = '3'
|
||||||
|
and a.type in ('1','17')
|
||||||
|
and a.billid = #{formId}
|
||||||
|
</select>
|
||||||
|
<select id="getModeCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count from (
|
||||||
|
select id from modeinfo where formid = #{formid}
|
||||||
|
union all select id from mode_customsearch where formid = #{formid}
|
||||||
|
union all select id from mode_report where formid = #{formid}
|
||||||
|
union all select id from mode_custombrowser where formid = #{formid}) t
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.ModeCodeMapper">
|
||||||
|
<select id="getCodeFields" resultType="com.api.formmode.mybatis.bean.FormFieldBean">
|
||||||
|
select id,fieldlabel
|
||||||
|
from workflow_billfield
|
||||||
|
where viewtype=0 and type='1' and fieldhtmltype='1'
|
||||||
|
and billid=#{formId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,72 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.ModeMapper">
|
||||||
|
<resultMap id="selectResultMap" type="com.api.formmode.mybatis.bean.SelectItemBean">
|
||||||
|
<id property="key" column="selectValue" />
|
||||||
|
<result property="title" column="selectName" />
|
||||||
|
<result property="value" column="selectValue" />
|
||||||
|
<result property="parentValue" column="parentValue" />
|
||||||
|
</resultMap>
|
||||||
|
<select id="getModeByFormId" resultType="com.api.formmode.mybatis.bean.ModeInfoBean">
|
||||||
|
select id, modename
|
||||||
|
from modeinfo
|
||||||
|
where formid = #{formId}
|
||||||
|
</select>
|
||||||
|
<select id="getLayouts" resultType="com.api.formmode.mybatis.bean.ModeLayoutBean">
|
||||||
|
select id, modeId, formId, type, layoutName,
|
||||||
|
sysPath, colsPerRow, cssFile, isDefault, version,
|
||||||
|
operUser, operTime, dataJSON, pluginJSON, scripts
|
||||||
|
from modeHtmlLayout
|
||||||
|
where modeId = #{modeId}
|
||||||
|
</select>
|
||||||
|
<select id="getModeFieldSelectItems" resultType="com.api.formmode.mybatis.bean.ModeFieldSelectItemBean">
|
||||||
|
select a.id as fieldId,a.fieldlabel, a.viewtype, a.detailTable,a.fieldName,
|
||||||
|
c.orderId detailTableOrder, a.fieldHtmlType, a.fieldDbType, a.type as fieldType,
|
||||||
|
b.layoutId
|
||||||
|
from workflow_billfield a
|
||||||
|
left join workflow_billdetailTable c
|
||||||
|
on a.detailTable = c.tableName and a.billid = c.billid,
|
||||||
|
modeFormField b
|
||||||
|
where a.id = b.fieldId
|
||||||
|
<if test="formId!=null and formId!=''">
|
||||||
|
and a.billid = #{formId}
|
||||||
|
</if>
|
||||||
|
<if test="modeId!=null and modeId!=''">
|
||||||
|
and b.modeId = #{modeId}
|
||||||
|
</if>
|
||||||
|
<if test="isEdit!=null and isEdit != ''">
|
||||||
|
and b.isedit = #{isEdit}
|
||||||
|
</if>
|
||||||
|
<if test="layoutId != null and layoutId != ''">
|
||||||
|
and b.layoutid = #{layoutId}
|
||||||
|
</if>
|
||||||
|
<if test="fieldHtmlTypes !=null">
|
||||||
|
<foreach collection="fieldHtmlTypes" item="type" index="index" open="and (" separator="or" close=")">
|
||||||
|
a.fieldHtmlType = #{type}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
order by a.viewtype,a.dsporder
|
||||||
|
</select>
|
||||||
|
<select id="getSelectItems" resultMap="selectResultMap">
|
||||||
|
select selectValue, selectName, fieldid as parentValue
|
||||||
|
from workflow_selectItem
|
||||||
|
where fieldId in
|
||||||
|
<foreach collection="fieldIds" item="fieldId" index="index" open="(" separator="," close=")">
|
||||||
|
#{fieldId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
<select id="getHrmResourceFields" resultType="com.api.formmode.mybatis.bean.FieldBean">
|
||||||
|
select a.id fieldId, a.fieldLabel
|
||||||
|
from workflow_billfield a ,
|
||||||
|
modeinfo b
|
||||||
|
where a.billid = b.formid
|
||||||
|
and a.fieldhtmltype = '3'
|
||||||
|
and a.type in ('1','17')
|
||||||
|
and b.id = #{modeId}
|
||||||
|
</select>
|
||||||
|
<select id="getLayoutSelects" resultType="com.api.formmode.mybatis.bean.ModeLayoutBean" >
|
||||||
|
select id, layoutname, type
|
||||||
|
from MODEHTMLLAYOUT
|
||||||
|
where modeid = #{modeid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,4 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.ModeRightInfoMapper">
|
||||||
|
</mapper>
|
@ -0,0 +1,69 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.ModeTreeFieldMapper">
|
||||||
|
<select id="getAllChild" resultType="com.api.formmode.mybatis.bean.PrimaryKeyBean" databaseId="oracle">
|
||||||
|
select id primaryKey
|
||||||
|
from modeTreeField
|
||||||
|
where ','|| allSuperFieldId||',' like #{modeType} and nvl(isdelete,0)!=1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllChild" resultType="com.api.formmode.mybatis.bean.PrimaryKeyBean" databaseId="sqlserver">
|
||||||
|
select id primaryKey
|
||||||
|
from modeTreeField
|
||||||
|
where ','+allSuperFieldId+',' like #{modeType} and isnull(isdelete,0)!=1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllChild" resultType="com.api.formmode.mybatis.bean.PrimaryKeyBean" databaseId="mysql">
|
||||||
|
select id primaryKey
|
||||||
|
from modeTreeField
|
||||||
|
where concat(',',allSuperFieldId,',') like #{modeType} and ifnull(isdelete,0)!=1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="allChildApp" databaseId="oracle">
|
||||||
|
select t.id
|
||||||
|
from modeTreeField t
|
||||||
|
where ','|| t.allSuperFieldId||',' like #{appIdSql} or t.id = #{appId}
|
||||||
|
</sql>
|
||||||
|
<sql id="allChildApp" databaseId="sqlserver">
|
||||||
|
select t.id
|
||||||
|
from modeTreeField t
|
||||||
|
where ','+t.allSuperFieldId+',' like #{appIdSql} or t.id = #{appId}
|
||||||
|
</sql>
|
||||||
|
<sql id="allChildApp" databaseId="mysql">
|
||||||
|
select t.id
|
||||||
|
from modeTreeField
|
||||||
|
where concat(',',t.allSuperFieldId,',') like #{appIdSql} or t.id = #{appId}
|
||||||
|
</sql>
|
||||||
|
<select id="getModeCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count
|
||||||
|
from modeinfo
|
||||||
|
where 1=1
|
||||||
|
and MODETYPE in ( <include refid="allChildApp"/> )
|
||||||
|
and (ISDELETE is null or ISDELETE = '0')
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getFormCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count
|
||||||
|
from workflow_bill a
|
||||||
|
where exists (select 1 from modeinfo b where a.id = b.formid and b.modetype in ( <include refid="allChildApp"/> ))
|
||||||
|
or EXISTS (select 1 from appforminfo c where a.id = c.formid and c.appid in ( <include refid="allChildApp"/> ))
|
||||||
|
or exists (select 1 from ModeFormExtend d where d.formid = a.id and d.appid in ( <include refid="allChildApp"/> ))
|
||||||
|
</select>
|
||||||
|
<select id="getSearchCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count
|
||||||
|
from mode_customsearch a
|
||||||
|
where exists (select 1 from modeinfo b where a.modeid = b.id and b.modetype in ( <include refid="allChildApp"/> ))
|
||||||
|
or a.appid in (<include refid="allChildApp"/>)
|
||||||
|
</select>
|
||||||
|
<select id="getBrowserCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count
|
||||||
|
from mode_custombrowser a
|
||||||
|
where exists (select 1 from modeinfo b where a.modeid = b.id and b.modetype in ( <include refid="allChildApp"/> ))
|
||||||
|
or a.appid in (<include refid="allChildApp"/>)
|
||||||
|
</select>
|
||||||
|
<select id="getTreeCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(id) count
|
||||||
|
from mode_customtree a
|
||||||
|
where a.appid in (<include refid="allChildApp"/>)
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.SimpleTableMapper">
|
||||||
|
<insert id="insert">
|
||||||
|
insert into modefieldauthorize
|
||||||
|
<foreach collection="sets" index="index" item="set" open="( " separator="," close=")">
|
||||||
|
${set.name}
|
||||||
|
</foreach>
|
||||||
|
values
|
||||||
|
<foreach collection="sets" index="index" item="set" open="( " separator="," close=")">
|
||||||
|
#{set.value}
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<delete id="clear">
|
||||||
|
delete
|
||||||
|
from ${tableName}
|
||||||
|
where
|
||||||
|
<choose>
|
||||||
|
<when test="sqlWhere == null ">
|
||||||
|
1=2
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<foreach collection="sqlWhere" index="index" item="lsSql"
|
||||||
|
open="" separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean"
|
||||||
|
open="( " separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,354 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.SplitPageMapper">
|
||||||
|
<select id="getAllDatas" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select r.*
|
||||||
|
<if test="outFields!=null and outFields!=''">
|
||||||
|
,${outFields}
|
||||||
|
</if>
|
||||||
|
from ( select
|
||||||
|
<if test="isDistinct"> distinct </if>
|
||||||
|
${fields}
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index1" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean" open="( "
|
||||||
|
separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupValues!=null">
|
||||||
|
<foreach collection="groupValues" index="index" item="item"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<choose>
|
||||||
|
<when test="item.value == 'empty'">
|
||||||
|
${item.name} is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupBy != null and groupBy != ''">
|
||||||
|
group by ${groupBy}
|
||||||
|
</if>
|
||||||
|
order by
|
||||||
|
<if test="orderBy != null and orderBy != ''">
|
||||||
|
${orderBy},
|
||||||
|
</if>
|
||||||
|
<if test="orderByList!=null">
|
||||||
|
<foreach collection="orderByList" index="index" item="item"
|
||||||
|
open="" separator="," close=",">
|
||||||
|
${item.name} ${item.type}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
${primaryKey} ${primaryKeyOrderType} ) r
|
||||||
|
<if test="outSqlFrom != null and outSqlFrom != '' and outSqlWhere != null and outSqlWhere != ''">
|
||||||
|
,${outSqlFrom}
|
||||||
|
where ${outSqlWhere}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="getCurrentPage" resultType="com.api.formmode.mybatis.bean.SplitPageResult"
|
||||||
|
databaseId="oracle">
|
||||||
|
select r.*
|
||||||
|
<if test="outFields!=null and outFields!=''">
|
||||||
|
,${outFields}
|
||||||
|
</if>
|
||||||
|
from ( select my_table.*, rownum as my_rownum
|
||||||
|
from ( select tableA.*,rownum as oracle_rownum
|
||||||
|
from ( select
|
||||||
|
<if test="isDistinct"> distinct </if>
|
||||||
|
${fields}
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index1" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean" open="( "
|
||||||
|
separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupValues!=null">
|
||||||
|
<foreach collection="groupValues" index="index" item="item"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<choose>
|
||||||
|
<when test="item.value == 'empty'">
|
||||||
|
${item.name} is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupBy != null and groupBy != ''">
|
||||||
|
group by ${groupBy}
|
||||||
|
</if>
|
||||||
|
order by
|
||||||
|
<if test="orderBy != null and orderBy != ''">
|
||||||
|
${orderBy},
|
||||||
|
</if>
|
||||||
|
<if test="orderByList!=null">
|
||||||
|
<foreach collection="orderByList" index="index" item="item"
|
||||||
|
open="" separator="," close=",">
|
||||||
|
${item.name} ${item.type}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
${primaryKey} ${primaryKeyOrderType}
|
||||||
|
) tableA
|
||||||
|
) my_table
|
||||||
|
where oracle_rownum between #{min} and #{max}
|
||||||
|
) r
|
||||||
|
<if
|
||||||
|
test="outSqlFrom != null and outSqlFrom != '' and outSqlWhere != null and outSqlWhere != ''">
|
||||||
|
,${outSqlFrom}
|
||||||
|
where ${outSqlWhere}
|
||||||
|
</if>
|
||||||
|
order by my_rownum
|
||||||
|
</select>
|
||||||
|
<select id="getCurrentPage" resultType="com.api.formmode.mybatis.bean.SplitPageResult"
|
||||||
|
databaseId="sqlserver">
|
||||||
|
select outtemp1409477546046.* from (
|
||||||
|
select row_number()over(order by tempcolumn1409477546046) temprownumber1409477546046,* from (
|
||||||
|
select
|
||||||
|
<if test="isDistinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
top ${max} tempcolumn1409477546046=0, ${fields}
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index1" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean" open="( "
|
||||||
|
separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupValues!=null">
|
||||||
|
<foreach collection="groupValues" index="index" item="item"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<choose>
|
||||||
|
<when test="item.value == 'empty'">
|
||||||
|
${item.name} is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupBy != null and groupBy != ''">
|
||||||
|
group by ${groupBy}
|
||||||
|
</if>
|
||||||
|
order by
|
||||||
|
<if test="orderBy != null and orderBy != ''">
|
||||||
|
${orderBy},
|
||||||
|
</if>
|
||||||
|
<if test="orderByList!=null">
|
||||||
|
<foreach collection="orderByList" index="index" item="item"
|
||||||
|
open="" separator="," close=",">
|
||||||
|
${item.name} ${item.type}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
${primaryKey} ${primaryKeyOrderType}
|
||||||
|
) innertemp1409477546046
|
||||||
|
) outtemp1409477546046
|
||||||
|
where temprownumber1409477546046>=${min} order by temprownumber1409477546046
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getRecordCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(
|
||||||
|
<if test="isDistinct"> distinct </if>
|
||||||
|
<choose>
|
||||||
|
<when test="isGroupCount">
|
||||||
|
*) count, ${countGroupBy} name
|
||||||
|
from (select ${fields}
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean"
|
||||||
|
open="( " separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
) tblTmp group by ${countGroupBy}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${primaryKey}) count
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean"
|
||||||
|
open="( " separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupValues!=null">
|
||||||
|
<foreach collection="groupValues" index="index" item="item"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<choose>
|
||||||
|
<when test="item.value == 'empty'">
|
||||||
|
${item.name} is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</select>
|
||||||
|
<select id="getSumAndCount" resultType="com.api.formmode.mybatis.bean.SplitPageResult">
|
||||||
|
select count(
|
||||||
|
<if test="isDistinct">distinct</if>
|
||||||
|
${primaryKey}) count
|
||||||
|
<if test="sumFields!=null">
|
||||||
|
<foreach collection="sumFields" index="index" item="item"
|
||||||
|
open=", " separator="," close="">
|
||||||
|
sum(COALESCE(${item.sqlName},0)) ${item.dataIndex}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
from ${sqlFrom}
|
||||||
|
where 1=1
|
||||||
|
<if test="sqlWhere !=null and sqlWhere != ''">
|
||||||
|
and ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="conditionValues!=null">
|
||||||
|
<foreach collection="conditionValues" index="index" item="lsSql"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<foreach collection="lsSql" index="index2" item="bean" open="( "
|
||||||
|
separator="or" close=")">
|
||||||
|
${bean.name}
|
||||||
|
<choose>
|
||||||
|
<when test="bean.operation == 'between'">
|
||||||
|
between #{bean.value} and #{bean.value1}
|
||||||
|
</when>
|
||||||
|
<when test="bean.operation == 'exists' or bean.operation == 'in'">
|
||||||
|
${bean.operation} ${bean.value}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${bean.operation} #{bean.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="groupValues!=null">
|
||||||
|
<foreach collection="groupValues" index="index" item="item"
|
||||||
|
open="and " separator="and" close="">
|
||||||
|
<choose>
|
||||||
|
<when test="item.value == 'empty'">
|
||||||
|
${item.name} is null
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${item.name} = #{item.value}
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="objectSqlWhere !=null and objectSqlWhere != ''">
|
||||||
|
and ${objectSqlWhere}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,45 @@
|
|||||||
|
<?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.api.formmode.mybatis.mapper.TreeMapper">
|
||||||
|
<select id="getAllData" resultType="com.api.formmode.mybatis.bean.TreeNodeBean">
|
||||||
|
select ${name} as name,${primaryKey} as primaryKey,${parentKey} as parentKey
|
||||||
|
from ${tableName}
|
||||||
|
<if test="sqlWhere!=null">
|
||||||
|
where ${sqlWhere}
|
||||||
|
</if>
|
||||||
|
<if test="orderBy!=null">
|
||||||
|
${orderBy}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="getRootDatas" resultType="com.api.formmode.mybatis.bean.TreeNodeBean">
|
||||||
|
select ${name} as name,${primaryKey} as primaryKey,${parentKey} as parentKey
|
||||||
|
from ${tableName}
|
||||||
|
left join (select ${primaryKey} as primaryKey from ${tableName} where ${sqlWhere}) p1 on ${parentKey} = p1.primaryKey
|
||||||
|
where p1.primaryKey is null
|
||||||
|
and ${sqlWhere}
|
||||||
|
</select>
|
||||||
|
<select id="getChildDatas" resultType="com.api.formmode.mybatis.bean.TreeNodeBean">
|
||||||
|
select ${name} as name, ${primaryKey} as primaryKey, ${parentKey} as parentKey
|
||||||
|
from ${tableName}
|
||||||
|
where ${parentKey} = #{parentId}
|
||||||
|
and ${sqlWhere}
|
||||||
|
</select>
|
||||||
|
<select id="getChildCount" resultType="com.api.formmode.mybatis.bean.CountBean">
|
||||||
|
select count(1) as count
|
||||||
|
from ${tableName}
|
||||||
|
where ${parentKey} = #{parentId}
|
||||||
|
and ${sqlWhere}
|
||||||
|
</select>
|
||||||
|
<select id="getQuickSearchKeys" resultType="com.api.formmode.mybatis.bean.TreeNodeBean">
|
||||||
|
select ${name} as name, ${primaryKey} as primaryKey, ${parentKey} as parentKey
|
||||||
|
from ${tableName}
|
||||||
|
where ${name} like #{quickSearchValue}
|
||||||
|
and ${sqlWhere}
|
||||||
|
</select>
|
||||||
|
<select id="getTreeNode" resultType="com.api.formmode.mybatis.bean.TreeNodeBean">
|
||||||
|
select ${nameField} as name, ${primaryKey} as primaryKey, ${parentKey} as parentKey
|
||||||
|
from ${tableName}
|
||||||
|
where ${primaryKey} = #{primaryKeyValue}
|
||||||
|
and ${sqlWhere}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<ehcache>
|
||||||
|
<diskStore path="java.io.tempdir" />
|
||||||
|
<defaultCache
|
||||||
|
maxElementsInMemory = "10000"
|
||||||
|
maxElementsOnDisk = "0"
|
||||||
|
eternal = "true"
|
||||||
|
overflowToDisk = "true"
|
||||||
|
diskPersistent = "false"
|
||||||
|
diskSpoolBufferSizeMB = "50"
|
||||||
|
diskExpiryThreadIntervalSeconds = "120"
|
||||||
|
memoryStoreEvictionPolicy = "LFU"
|
||||||
|
/>
|
||||||
|
<cache name="com.cloudstore"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="true"
|
||||||
|
overflowToDisk="true"
|
||||||
|
diskPersistent="true"
|
||||||
|
memoryStoreEvictionPolicy="LFU" />
|
||||||
|
</ehcache>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?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.cloudstore.dev.api.mapper.Dao_TableMapper">
|
||||||
|
|
||||||
|
<insert id="insertUserDefCol" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into cloudstore_defcol (dataIndex,sysid, orders, display, pageUid,userid) values
|
||||||
|
<foreach item="item" collection="list" separator=",">
|
||||||
|
(#{item.dataIndex},'', #{item.orders}, #{item.display}, #{item.pageUid}, #{item.userId})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE daoConfig
|
||||||
|
PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/dao-2.dtd">
|
||||||
|
|
||||||
|
<daoConfig>
|
||||||
|
<context>
|
||||||
|
|
||||||
|
<transactionManager type="SQLMAP">
|
||||||
|
<property name="SqlMapConfigResource"
|
||||||
|
value="com/weaver/ecology/search/cfg/nonspring/sqlMapConfig.mssql.xml"/>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<dao interface="com.weaver.ecology.search.dao.CommonDao"
|
||||||
|
implementation="com.weaver.ecology.search.dao.ibatis.CommonSqlMapDao"/>
|
||||||
|
|
||||||
|
</context>
|
||||||
|
</daoConfig>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE daoConfig
|
||||||
|
PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/dao-2.dtd">
|
||||||
|
|
||||||
|
<daoConfig>
|
||||||
|
<context>
|
||||||
|
|
||||||
|
<transactionManager type="SQLMAP">
|
||||||
|
<property name="SqlMapConfigResource"
|
||||||
|
value="com/weaver/ecology/search/cfg/nonspring/sqlMapConfig.oracle.xml"/>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<dao interface="com.weaver.ecology.search.dao.CommonDao"
|
||||||
|
implementation="com.weaver.ecology.search.dao.ibatis.CommonSqlMapDao"/>
|
||||||
|
|
||||||
|
</context>
|
||||||
|
</daoConfig>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE daoConfig
|
||||||
|
PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/dao-2.dtd">
|
||||||
|
|
||||||
|
<daoConfig>
|
||||||
|
<context>
|
||||||
|
|
||||||
|
<transactionManager type="SQLMAP">
|
||||||
|
<property name="SqlMapConfigResource"
|
||||||
|
value="com/weaver/ecology/search/cfg/nonspring/sqlMapConfig.xml"/>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<dao interface="com.weaver.ecology.search.dao.CommonDao"
|
||||||
|
implementation="com.weaver.ecology.search.dao.ibatis.CommonSqlMapDao"/>
|
||||||
|
|
||||||
|
</context>
|
||||||
|
</daoConfig>
|
@ -0,0 +1,18 @@
|
|||||||
|
# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
|
||||||
|
# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
|
||||||
|
|
||||||
|
log4j.logger.com.weaver.ecology.search=INFO,searchStdout
|
||||||
|
log4j.additivity.com.weaver.ecology.search=false
|
||||||
|
|
||||||
|
log4j.appender.searchStdout=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.searchStdout.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.searchStdout.layout.ConversionPattern=%d %p [%c] - %m%n
|
||||||
|
|
||||||
|
log4j.appender.searchLogfile=org.apache.log4j.RollingFileAppender
|
||||||
|
log4j.appender.searchLogfile.File=E:/yeriwei/project/WEB-INF/searchLogs.log
|
||||||
|
log4j.appender.searchLogfile.MaxFileSize=512KB
|
||||||
|
# Keep three backup files.
|
||||||
|
log4j.appender.searchLogfile.MaxBackupIndex=3
|
||||||
|
# Pattern to output: date priority [category] - message
|
||||||
|
log4j.appender.searchLogfile.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.searchLogfile.layout.ConversionPattern=%d %p [%c] - %m%n
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
|
||||||
|
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
|
||||||
|
<sqlMapConfig>
|
||||||
|
<!-- properties resource="nonspring/jdbc.oracle.properties"/ -->
|
||||||
|
<!-- properties resource="com/weaver/ecology/search/cfg/nonspring/jdbc.properties"/ -->
|
||||||
|
<transactionManager type="JDBC">
|
||||||
|
<dataSource type="SIMPLE">
|
||||||
|
<property value="${DriverClasses}" name="JDBC.Driver"/>
|
||||||
|
<property value="${url}" name="JDBC.ConnectionURL"/>
|
||||||
|
<property value="${user}" name="JDBC.Username"/>
|
||||||
|
<property value="${password}" name="JDBC.Password"/>
|
||||||
|
</dataSource>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<sqlMap resource="com/weaver/ecology/search/dao/ibatis/sqlmap/CommonSqlMap.mssql.xml"/>
|
||||||
|
<sqlMap resource="com/weaver/ecology/search/dao/ibatis/sqlmap/CommonSqlMap.xml"/>
|
||||||
|
|
||||||
|
</sqlMapConfig>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
|
||||||
|
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
|
||||||
|
<sqlMapConfig>
|
||||||
|
<!-- properties resource="nonspring/jdbc.oracle.properties"/ -->
|
||||||
|
<!-- properties resource="com/weaver/ecology/search/cfg/nonspring/jdbc.properties"/ -->
|
||||||
|
<transactionManager type="JDBC">
|
||||||
|
<dataSource type="SIMPLE">
|
||||||
|
<property value="${DriverClasses}" name="JDBC.Driver"/>
|
||||||
|
<property value="${url}" name="JDBC.ConnectionURL"/>
|
||||||
|
<property value="${user}" name="JDBC.Username"/>
|
||||||
|
<property value="${password}" name="JDBC.Password"/>
|
||||||
|
</dataSource>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<sqlMap resource="com/weaver/ecology/search/dao/ibatis/sqlmap/CommonSqlMap.oracle.xml"/>
|
||||||
|
<sqlMap resource="com/weaver/ecology/search/dao/ibatis/sqlmap/CommonSqlMap.xml"/>
|
||||||
|
|
||||||
|
</sqlMapConfig>
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
|
||||||
|
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
|
||||||
|
<sqlMapConfig>
|
||||||
|
<!-- properties resource="nonspring/jdbc.oracle.properties"/ -->
|
||||||
|
<!-- properties resource="com/weaver/ecology/search/cfg/nonspring/jdbc.properties"/ -->
|
||||||
|
<transactionManager type="JDBC">
|
||||||
|
<dataSource type="SIMPLE">
|
||||||
|
<property value="${DriverClasses}" name="JDBC.Driver"/>
|
||||||
|
<property value="${ecology.url}" name="JDBC.ConnectionURL"/>
|
||||||
|
<property value="${ecology.user}" name="JDBC.Username"/>
|
||||||
|
<property value="${ecology.password}" name="JDBC.Password"/>
|
||||||
|
</dataSource>
|
||||||
|
</transactionManager>
|
||||||
|
|
||||||
|
<sqlMap resource="com/weaver/ecology/search/dao/ibatis/sqlmap/CommonSqlMap.xml"/>
|
||||||
|
</sqlMapConfig>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
||||||
|
|
||||||
|
<sqlMap>
|
||||||
|
<resultMap id="docDetailResult" class="com.weaver.ecology.search.model.DocDetail">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="docSubject" column="docSubject"/>
|
||||||
|
<result property="doctype" column="doctype"/>
|
||||||
|
<result property="mainCategory" column="mainCategory"/>
|
||||||
|
<result property="subCategory" column="subCategory"/>
|
||||||
|
<result property="secCategory" column="secCategory"/>
|
||||||
|
<result property="docCreaterId" column="docCreaterId"/>
|
||||||
|
<result property="docCreateDate" column="docCreateDate"/>
|
||||||
|
<result property="docCreateTime" column="docCreateTime"/>
|
||||||
|
<result property="accessoryCount" column="accessoryCount"/>
|
||||||
|
<result property="replayDocCount" column="replayDocCount"/>
|
||||||
|
<result property="isReply" column="isReply"/>
|
||||||
|
<result property="replyDocId" column="replyDocId"/>
|
||||||
|
<result property="docCreaterType" column="docCreaterType"/>
|
||||||
|
<result property="docContent" column="docContent"/>
|
||||||
|
</resultMap>
|
||||||
|
</sqlMap>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
||||||
|
|
||||||
|
<sqlMap>
|
||||||
|
<resultMap id="docDetailResult" class="com.weaver.ecology.search.model.DocDetail">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="docSubject" column="docSubject"/>
|
||||||
|
<result property="doctype" column="doctype"/>
|
||||||
|
<result property="mainCategory" column="mainCategory"/>
|
||||||
|
<result property="subCategory" column="subCategory"/>
|
||||||
|
<result property="secCategory" column="secCategory"/>
|
||||||
|
<result property="docCreaterId" column="docCreaterId"/>
|
||||||
|
<result property="docCreateDate" column="docCreateDate"/>
|
||||||
|
<result property="docCreateTime" column="docCreateTime"/>
|
||||||
|
<result property="accessoryCount" column="accessoryCount"/>
|
||||||
|
<result property="replayDocCount" column="replayDocCount"/>
|
||||||
|
<result property="isReply" column="isReply"/>
|
||||||
|
<result property="replyDocId" column="replyDocId"/>
|
||||||
|
<result property="docCreaterType" column="docCreaterType"/>
|
||||||
|
<result property="docContent" column="docContent" jdbcType="CLOB"/>
|
||||||
|
</resultMap>
|
||||||
|
</sqlMap>
|
@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
|
||||||
|
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
||||||
|
|
||||||
|
<sqlMap>
|
||||||
|
|
||||||
|
<typeAlias alias="mainCategory" type="com.weaver.ecology.search.model.DocMainCategory"/>
|
||||||
|
<typeAlias alias="htmlLabelInfo" type="com.weaver.ecology.search.model.HtmlLabelInfo"/>
|
||||||
|
<typeAlias alias="shareInnerDoc" type="com.weaver.ecology.search.model.ShareInnerDoc"/>
|
||||||
|
<typeAlias alias="hrmOrgGroupRelated" type="com.weaver.ecology.search.model.HrmOrgGroupRelated"/>
|
||||||
|
|
||||||
|
<select id="getMainCategoryList" resultClass="mainCategory">
|
||||||
|
select * from docMaincategory
|
||||||
|
<isNotEqual compareValue="0">
|
||||||
|
WHERE id=#value#
|
||||||
|
</isNotEqual>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="shareInnerDocResult" class="shareInnerDoc">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="sourceid" column="sourceid"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="content" column="content"/>
|
||||||
|
<result property="seclevel" column="seclevel"/>
|
||||||
|
<result property="sharelevel" column="sharelevel"/>
|
||||||
|
<result property="srcfrom" column="srcfrom"/>
|
||||||
|
<result property="opuser" column="opuser"/>
|
||||||
|
<result property="sharesource" column="sharesource"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="hrmOrgGroupRelatedResult" class="hrmOrgGroupRelated">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="orgGroupId" column="orgGroupId"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="content" column="content"/>
|
||||||
|
<result property="secLevelFrom" column="secLevelFrom"/>
|
||||||
|
<result property="secLevelTo" column="secLevelTo"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="getDocs">
|
||||||
|
SELECT D.id AS id,D.docSubject AS docSubject,D.doctype AS doctype,D.mainCategory AS mainCategory,D.subCategory AS subCategory,
|
||||||
|
D.secCategory AS secCategory,D.docCreaterId AS docCreaterId,D.docCreateDate AS docCreateDate,D.docCreateTime AS docCreateTime,
|
||||||
|
D.accessoryCount AS accessoryCount,D.replaydoccount AS replaydoccount,D.isReply AS isReply,D.replyDocId AS replyDocId,D.docCreaterType AS docCreaterType,
|
||||||
|
<isEqual property="isDb" compareValue="mssql">
|
||||||
|
D.docContent AS docContent
|
||||||
|
FROM Docdetail D
|
||||||
|
</isEqual>
|
||||||
|
<isEqual property="isDb" compareValue="oracle">
|
||||||
|
C.docContent AS docContent
|
||||||
|
FROM Docdetail D,docDetailContent C
|
||||||
|
</isEqual>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="orcaleWhere">
|
||||||
|
AND D.id=C.docId
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getDocDetailById" resultMap="docDetailResult">
|
||||||
|
<include refid="getDocs"/>
|
||||||
|
WHERE D.id=#docId#
|
||||||
|
<isEqual property="isDb" compareValue="oracle">
|
||||||
|
<include refid="orcaleWhere"/>
|
||||||
|
</isEqual>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDocDetailListByDate" resultMap="docDetailResult">
|
||||||
|
<include refid="getDocs"/>
|
||||||
|
<dynamic prepend="WHERE">
|
||||||
|
<isNull property="docId">
|
||||||
|
<![CDATA[
|
||||||
|
(D.isReply is null OR D.isreply<>1) AND D.docCreateDate BETWEEN #startDate# AND #endDate#
|
||||||
|
]]>
|
||||||
|
</isNull>
|
||||||
|
<isNotNull property="docId">
|
||||||
|
D.replyDocId=#docId#
|
||||||
|
</isNotNull>
|
||||||
|
<isEqual property="isDb" compareValue="oracle">
|
||||||
|
<include refid="orcaleWhere"/>
|
||||||
|
</isEqual>
|
||||||
|
</dynamic>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getUpdateDocByDate" resultMap="docDetailResult">
|
||||||
|
<include refid="getDocs"/>
|
||||||
|
WHERE D.doclastmoddate BETWEEN #startDate# AND #endDate#
|
||||||
|
<isEqual property="isDb" compareValue="oracle">
|
||||||
|
<include refid="orcaleWhere"/>
|
||||||
|
</isEqual>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDocImageFilesByDocId" resultClass="com.weaver.ecology.search.model.DocImageFile">
|
||||||
|
SELECT * FROM docImageFile WHERE docId=#value# order by id asc,versionid desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getImageFilesByFileId" resultClass="com.weaver.ecology.search.model.ImageFile">
|
||||||
|
SELECT * FROM ImageFile WHERE imageFileid=#value#
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getShareInfoByDocId" resultMap="shareInnerDocResult">
|
||||||
|
SELECT id,sourceid,type,content,seclevel,sharelevel,srcfrom,opuser,sharesource
|
||||||
|
FROM ShareInnerDoc WHERE sourceId=#value#
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getHrmOrgGroupRelatedByGroupId" resultMap="hrmOrgGroupRelatedResult">
|
||||||
|
SELECT id,orgGroupId, type, content,secLevelFrom,secLevelTo
|
||||||
|
FROM HrmOrgGroupRelated WHERE orgGroupId=#value#
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="sqlCategoryFields">
|
||||||
|
SELECT id AS ID,categoryname AS CATEGORYNAME FROM
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getSecCategoryNames" resultClass="java.util.HashMap">
|
||||||
|
<include refid="sqlCategoryFields"/> DocSecCategory
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getSubCategoryNames" resultClass="java.util.HashMap">
|
||||||
|
<include refid="sqlCategoryFields"/> DocsubCategory
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getMainCategoryNames" resultClass="java.util.HashMap">
|
||||||
|
<include refid="sqlCategoryFields"/> docMaincategory
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getLanguageResource" resultClass="htmlLabelInfo" parameterClass="string">
|
||||||
|
SELECT * FROM HtmlLabelInfo WHERE indexid in ($value$)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getLoginIdByUserId" resultClass="string">
|
||||||
|
SELECT loginid FROM hrmResource WHERE id=#value#
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</sqlMap>
|
@ -0,0 +1,13 @@
|
|||||||
|
<?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.weaver.mapper.FunctionUpgradeMapper">
|
||||||
|
<select id="checkMenuControlList" resultType="int" databaseId="mysql">
|
||||||
|
select 1 from information_schema.tables where table_name='MENUCONTROLLIST' and table_schema = database()
|
||||||
|
</select>
|
||||||
|
<select id="checkMenuControlList" resultType="int" databaseId="oracle">
|
||||||
|
select 1 from user_tables where table_name='MENUCONTROLLIST'
|
||||||
|
</select>
|
||||||
|
<select id="checkMenuControlList" resultType="int">
|
||||||
|
SELECT 1 FROM sysobjects WHERE name='menucontrollist'
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue