37_ParametergroupDao、ParametergroupDao.xml

ParametergroupDao:

`package com.reserve.cang.core.sys.dao;

import com.reserve.cang.core.sys.domain.SysParamDomain;

import com.reserve.cang.core.sys.vo.ParametergroupVo;
import com.reserve.cang.generic.GenericDao;
import com.reserve.cang.model.sys.Parametergroup;
import com.github.pagehelper.Page;

import java.util.List;

/** 参数集合主表(SYS_PARAMETERGROUP) **/
public interface ParametergroupDao extends GenericDao<Parametergroup, String> {

Page<SysParamDomain> selectParaGroupFetchDetails();

Parametergroup selectByGroupNo(String groupNo);

Page<Parametergroup> selectByVoWhere(ParametergroupVo parametergroup);

/**
 * 查询数据字典
 * @return
 */
List<Parametergroup> queryAllData();

/**
 * 根据名称查询编号
 *
 * @param name
 * @return
 */
Parametergroup selectCodeByName(String name);

}`

Parametergroupdao.Xml:

`

and ID=#{id,jdbcType=VARCHAR} and BIS_MODIFY=#{bisModify,jdbcType=NUMERIC} and SGROUP_NAME=#{sgroupName,jdbcType=VARCHAR} and SGROUP_NO=#{sgroupNo,jdbcType=VARCHAR} and SREMARK=#{sremark,jdbcType=VARCHAR} and ID=#{id,jdbcType=VARCHAR} and BIS_MODIFY like '%${bisModify}%' and SGROUP_NAME like '%${sgroupName}%' and SGROUP_NO like '%${sgroupNo}%' and SREMARK=#{sremark,jdbcType=VARCHAR} and BIS_MODIFY=#{bisModify,jdbcType=NUMERIC} delete FROM SYS_PARAMETERGROUP where id in #{idItem} SELECT REPLACE(UUID(),'-','') FROM DUAL SELECT REPLACE(UUID(),'-','') FROM DUAL insert into SYS_PARAMETERGROUP ID, BIS_MODIFY, SGROUP_NAME, SGROUP_NO, SREMARK, #{id,jdbcType=VARCHAR}, #{bisModify,jdbcType=NUMERIC}, #{sgroupName,jdbcType=VARCHAR}, #{sgroupNo,jdbcType=VARCHAR}, #{sremark,jdbcType=VARCHAR}, update SYS_PARAMETERGROUP BIS_MODIFY=#{bisModify,jdbcType=NUMERIC}, SGROUP_NAME=#{sgroupName,jdbcType=VARCHAR}, SGROUP_NO=#{sgroupNo,jdbcType=VARCHAR}, SREMARK=#{sremark,jdbcType=VARCHAR}, where ID= #{id,jdbcType=VARCHAR} update SYS_PARAMETERGROUP set BIS_MODIFY=#{bisModify,jdbcType=NUMERIC} ,SGROUP_NAME=#{sgroupName,jdbcType=VARCHAR} ,SGROUP_NO=#{sgroupNo,jdbcType=VARCHAR} ,SREMARK=#{sremark,jdbcType=VARCHAR} where ID= #{id,jdbcType=VARCHAR}
<!-- 获取字典项和字典详情 -->
<select id="selectParaGroupFetchDetails" resultMap="dataDicMaps">
	<![CDATA[
	select a.ID     as gid,
	       a.sgroup_no,
	       a.sgroup_name,
	       a.sremark   as gremark,
	       a.bis_modify,
	       b.ID     as did,
	       b.sname,
	       b.svalue,
	       b.sremark   as dremark,
	       b.isort
	  from sys_ParameterGroup a
	  left join sys_Parameter_Group_Detail b
	    on a.ID = b.sgroupid
 ]]>
</select>
<!-- 根据字典编号获取字典 -->
<select id="selectByGroupNo" resultMap="resultEntity" parameterType="java.lang.String">
	select
	<include refid="column_List" />
	from SYS_PARAMETERGROUP where  sGroup_No=#{sgroupNo,jdbcType=VARCHAR}
</select>
<select id="selectByVoWhere" resultMap="resultEntity" parameterType="com.reserve.cang.core.sys.vo.ParametergroupVo">
	select
	<include refid="column_List" />
	from SYS_PARAMETERGROUP
	<include refid="Domain_Where_Clause" />
	<if test="orderStr != null and  orderStr != ''  ">
		ORDER BY ${orderStr}
	</if>
</select>

<!--查询数据字典-->
<select id="queryAllData" resultMap="resultEntity">
	select
	<include refid="column_List" />
	from SYS_PARAMETERGROUP
</select>

<!--
 附加信息,便于自己写sql语句
ID= #{id,jdbcType=VARCHAR}
BIS_MODIFY=#{bisModify,jdbcType=NUMERIC}
SGROUP_NAME=#{sgroupName,jdbcType=VARCHAR}
SGROUP_NO=#{sgroupNo,jdbcType=VARCHAR}
SREMARK=#{sremark,jdbcType=VARCHAR}
 -->

`

posted @ 2021-07-25 17:18  mimimikasa  阅读(44)  评论(0)    收藏  举报