fdfc6a02ebd522cb54590ed15003899442f29019.svn-base 4.17 KB
<?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.thinkgem.jeesite.modules.reg.dao.base.SRegBaseSllmDao">
    
	<sql id="sRegBaseSllmColumns">
		a.id AS "id",
		a.s_area_code AS "sareaCode",
		a.lmbm AS "lmbm",
		a.ysdm AS "ysdm",
		a.bdcdyh AS "bdcdyh",
		a.zddm AS "zddm",
		a.syqmj AS "syqmj",
		a.ldsyqxz AS "ldsyqxz",
		a.zysz AS "zysz",
		a.zs AS "zs",
		a.lz AS "lz",
		a.qy AS "qy",
		a.zlnd AS "zlnd",
		a.lb AS "lb",
		a.xb AS "xb",
		a.xdm AS "xdm",
		a.status AS "status",
		a.zdid AS "zdid",
		a.isdiya AS "isdiya",
		a.ischafeng AS "ischafeng",
		a.isyiyi AS "isyiyi",
		a.isaudit AS "isaudit",
		a.islogout AS "islogout",
		a.create_by AS "createBy.id",
		a.create_date AS "createDate",
		a.update_by AS "updateBy.id",
		a.update_date AS "updateDate",
		a.remarks AS "remarks",
		a.del_flag AS "delFlag",
		a.zl AS "zl",
		a.qlxz AS "qlxz",
		a.yt AS "yt",
		a.qllx AS "qllx",
		a.qxid AS "qxid"
	</sql>
	
	<sql id="sRegBaseSllmJoins">
	</sql>
    
	<select id="get" resultType="SRegBaseSllm">
		SELECT 
			<include refid="sRegBaseSllmColumns"/>
		FROM s_reg_base_sllm a
		<include refid="sRegBaseSllmJoins"/>
		WHERE a.id = #{id}
	</select>
	
	<select id="getqxid" resultType="SRegBaseSllm">
		SELECT 
			<include refid="sRegBaseSllmColumns"/>
		FROM s_reg_base_sllm a
		<include refid="sRegBaseSllmJoins"/>
		WHERE a.qxid = #{qxid}
	</select>
	
	<select id="findList" resultType="SRegBaseSllm">
		SELECT 
			<include refid="sRegBaseSllmColumns"/>
		FROM s_reg_base_sllm a
		<include refid="sRegBaseSllmJoins"/>
		<where>
			a.del_flag = #{DEL_FLAG_NORMAL}
			<if test="sareaCode != null and sareaCode != ''">
				AND a.s_area_code = #{sareaCode}
			</if>
			<if test="qxid != null and qxid != ''">
				AND a.qxid = #{qxid}
			</if>
		</where>
		<choose>
			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
				ORDER BY ${page.orderBy}
			</when>
			<otherwise>
				ORDER BY a.update_date DESC
			</otherwise>
		</choose>
	</select>
	
	<select id="findAllList" resultType="SRegBaseSllm">
		SELECT 
			<include refid="sRegBaseSllmColumns"/>
		FROM s_reg_base_sllm a
		<include refid="sRegBaseSllmJoins"/>
		<where>
			a.del_flag = #{DEL_FLAG_NORMAL}
		</where>		
		<choose>
			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
				ORDER BY ${page.orderBy}
			</when>
			<otherwise>
				ORDER BY a.update_date DESC
			</otherwise>
		</choose>
	</select>
	
	<insert id="insert">
		INSERT INTO s_reg_base_sllm(
			id,
			s_area_code,
			lmbm,
			ysdm,
			bdcdyh,
			zddm,
			syqmj,
			ldsyqxz,
			zysz,
			zs,
			lz,
			qy,
			zlnd,
			lb,
			xb,
			xdm,
			status,
			zdid,
			isdiya,
			ischafeng,
			isyiyi,
			isaudit,
			islogout,
			create_by,
			create_date,
			update_by,
			update_date,
			remarks,
			del_flag,
			zl,
			qlxz,
			yt,
			qllx,
			qxid
		) VALUES (
			#{id},
			#{sareaCode},
			#{lmbm},
			#{ysdm},
			#{bdcdyh},
			#{zddm},
			#{syqmj},
			#{ldsyqxz},
			#{zysz},
			#{zs},
			#{lz},
			#{qy},
			#{zlnd},
			#{lb},
			#{xb},
			#{xdm},
			#{status},
			#{zdid},
			#{isdiya},
			#{ischafeng},
			#{isyiyi},
			#{isaudit},
			#{islogout},
			#{createBy.id},
			#{createDate},
			#{updateBy.id},
			#{updateDate},
			#{remarks},
			#{delFlag},
			#{zl},
			#{qlxz},
			#{yt},
			#{qllx},
			#{qxid}
		)
	</insert>
	
	<update id="update">
		UPDATE s_reg_base_sllm SET 	
			s_area_code = #{sareaCode},
			lmbm = #{lmbm},
			ysdm = #{ysdm},
			bdcdyh = #{bdcdyh},
			zddm = #{zddm},
			syqmj = #{syqmj},
			ldsyqxz = #{ldsyqxz},
			zysz = #{zysz},
			zs = #{zs},
			lz = #{lz},
			qy = #{qy},
			zlnd = #{zlnd},
			lb = #{lb},
			xb = #{xb},
			xdm = #{xdm},
			status = #{status},
			zdid = #{zdid},
			isdiya = #{isdiya},
			ischafeng = #{ischafeng},
			isyiyi = #{isyiyi},
			isaudit = #{isaudit},
			islogout = #{islogout},
			update_by = #{updateBy.id},
			update_date = #{updateDate},
			remarks = #{remarks},
			zl = #{zl},
			qlxz = #{qlxz},
			yt = #{yt},
			qllx = #{qllx},
			qxid = #{qxid}
		WHERE id = #{id}
	</update>
	
	<update id="delete">
		UPDATE s_reg_base_sllm SET 
			del_flag = #{DEL_FLAG_DELETE}
		WHERE id = #{id}
	</update>
	
</mapper>