| | |
| | | unit varchar(50), |
| | | domain_na varchar(100), |
| | | showtype smallint, |
| | | editable smallint, |
| | | editable smallint, |
| | | status smallint default 0, |
| | | bak varchar(1024) |
| | | ); |
| | | comment on table lf.sys_dict is '附件表'; |
| | |
| | | comment on column lf.sys_dict.domain_na is '值域名称'; |
| | | comment on column lf.sys_dict.showtype is '显示类型'; |
| | | comment on column lf.sys_dict.editable is '是否可编辑'; |
| | | comment on column lf.sys_dict.status is '状态:0-正常,1-删除,-1-废弃'; |
| | | comment on column lf.sys_dict.bak is '备注'; |
| | | -- alter sequence lf.sys_dict_id_seq restart with 300; |
| | | |
| | | select count(*) from lf.sys_dict where tab='sys_user'; |
| | | select count(*) from lf.sys_dict where status=0 and tab='sys_user'; |
| | | select * from lf.sys_dict order by ns,tab,order_num limit 10 offset 0; |
| | | select distinct ns,tab,fn_get_entity(tab) entity,tab_desc,tabletype from lf.sys_dict order by tab; |
| | | ----------------------------------------------------------------------------------------------------- 21.样式表 |
| | |
| | | |
| | | select * from lf.sys_layer; |
| | | alter sequence lf.sys_layer_id_seq restart with 1; |
| | | select * from lf.sys_dict where ns='md' |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_dict |
| | | <where> |
| | | ns = #{ns} |
| | | status = 0 |
| | | <if test="ns != null"> |
| | | and ns = #{ns} |
| | | </if> |
| | | <if test="tab != null"> |
| | | and tab like #{tab} |
| | | </if> |
| | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DictEntity"> |
| | | select * from lf.sys_dict |
| | | <where> |
| | | ns = #{ns} |
| | | status = 0 |
| | | <if test="ns != null"> |
| | | and ns = #{ns} |
| | | </if> |
| | | <if test="tab != null"> |
| | | and tab like #{tab} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.DictEntity"> |
| | | select * from lf.sys_dict order by ns,tab,id |
| | | select * from lf.sys_dict where status = 0 order by ns,tab,id |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DictEntity"> |
| | | select * from lf.sys_dict where id = #{id} |
| | | select * from lf.sys_dict where status = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDictTab" resultType="com.lf.server.entity.ctrl.TabEntity"> |
| | | select distinct ns,tab,tab_desc,fn_get_entity(tab) entity from lf.sys_dict |
| | | <where> |
| | | status = 0 |
| | | <if test="name != null"> |
| | | tab like #{name} or tab_desc like #{name} |
| | | and (tab like #{name} or tab_desc like #{name}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | delete from lf.sys_dict where id = #{id} |
| | | update lf.sys_dict set status = 1 where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_dict where id in |
| | | update lf.sys_dict set status = 1 where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |