SRegBusNydsyqDao.xml 4.11 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.sumdata.dao.datatable.SRegBusNydsyqDao">
    
	<sql id="sRegBusNydsyqColumns">
		a.id AS "id",
		a.ysdm AS "ysdm",
		a.zddm AS "zddm",
		a.bdcdyh AS "bdcdyh",
		a.ywh AS "ywh",
		a.qllx AS "qllx",
		a.djlx AS "djlx",
		a.djyy AS "djyy",
		a.fbf AS "fbf",
		a.cbsyqmj AS "cbsyqmj",
		a.cbsyqssj AS "cbsyqssj",
		a.cbsyjssj AS "cbsyjssj",
		a.tdsyqxz AS "tdsyqxz",
		a.syttlx AS "syttlx",
		a.yzyfs AS "yzyfs",
		a.cyzl AS "cyzl",
		a.syzcl AS "syzcl",
		a.bdcqzh AS "bdcqzh",
		a.qxdm AS "qxdm",
		a.djjg AS "djjg",
		a.dbr AS "dbr",
		a.djsj AS "djsj",
		a.fj AS "fj",
		a.qszt AS "qszt",
		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.isfdsj AS "isfdsj",
		a.islogout AS "islogout",
		a.qxid AS "qxid",
		a.s_area_code AS "sAreaCode"
	</sql>
	
	<sql id="sRegBusNydsyqJoins">
	</sql>
    
	<select id="get" resultType="SRegBusNydsyq">
		SELECT 
			<include refid="sRegBusNydsyqColumns"/>
		FROM s_reg_bus_nydsyq a
		<include refid="sRegBusNydsyqJoins"/>
		WHERE a.id = #{id}
	</select>
	
	<select id="getqxid" resultType="SRegBusNydsyq">
		SELECT 
			<include refid="sRegBusNydsyqColumns"/>
		FROM s_reg_bus_nydsyq a
		<include refid="sRegBusNydsyqJoins"/>
		WHERE a.qxid = #{qxid}
	</select>
	
	<select id="findList" resultType="SRegBusNydsyq">
		SELECT 
			<include refid="sRegBusNydsyqColumns"/>
		FROM s_reg_bus_nydsyq a
		<include refid="sRegBusNydsyqJoins"/>
		<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>
	
	<select id="findAllList" resultType="SRegBusNydsyq">
		SELECT 
			<include refid="sRegBusNydsyqColumns"/>
		FROM s_reg_bus_nydsyq a
		<include refid="sRegBusNydsyqJoins"/>
		<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_bus_nydsyq(
			id,
			ysdm,
			zddm,
			bdcdyh,
			ywh,
			qllx,
			djlx,
			djyy,
			fbf,
			cbsyqmj,
			cbsyqssj,
			cbsyjssj,
			tdsyqxz,
			syttlx,
			yzyfs,
			cyzl,
			syzcl,
			bdcqzh,
			qxdm,
			djjg,
			dbr,
			djsj,
			fj,
			qszt,
			create_by,
			create_date,
			update_by,
			update_date,
			remarks,
			del_flag,
			isfdsj,
			islogout,
			qxid,
			s_area_code
		) VALUES (
			#{id},
			#{ysdm},
			#{zddm},
			#{bdcdyh},
			#{ywh},
			#{qllx},
			#{djlx},
			#{djyy},
			#{fbf},
			#{cbsyqmj},
			#{cbsyqssj},
			#{cbsyjssj},
			#{tdsyqxz},
			#{syttlx},
			#{yzyfs},
			#{cyzl},
			#{syzcl},
			#{bdcqzh},
			#{qxdm},
			#{djjg},
			#{dbr},
			#{djsj},
			#{fj},
			#{qszt},
			#{createBy.id},
			#{createDate},
			#{updateBy.id},
			#{updateDate},
			#{remarks},
			#{delFlag},
			#{isfdsj},
			#{islogout},
			#{qxid},
			#{sAreaCode}
		)
	</insert>
	
	<update id="update">
		UPDATE s_reg_bus_nydsyq SET 	
			ysdm = #{ysdm},
			zddm = #{zddm},
			bdcdyh = #{bdcdyh},
			ywh = #{ywh},
			qllx = #{qllx},
			djlx = #{djlx},
			djyy = #{djyy},
			fbf = #{fbf},
			cbsyqmj = #{cbsyqmj},
			cbsyqssj = #{cbsyqssj},
			cbsyjssj = #{cbsyjssj},
			tdsyqxz = #{tdsyqxz},
			syttlx = #{syttlx},
			yzyfs = #{yzyfs},
			cyzl = #{cyzl},
			syzcl = #{syzcl},
			bdcqzh = #{bdcqzh},
			qxdm = #{qxdm},
			djjg = #{djjg},
			dbr = #{dbr},
			djsj = #{djsj},
			fj = #{fj},
			qszt = #{qszt},
			update_by = #{updateBy.id},
			update_date = #{updateDate},
			remarks = #{remarks},
			isfdsj = #{isfdsj},
			islogout = #{islogout},
			qxid = #{qxid},
			s_area_code = #{sAreaCode}
		WHERE id = #{id}
	</update>
	
	<update id="delete">
		UPDATE s_reg_bus_nydsyq SET 
			del_flag = #{DEL_FLAG_DELETE}
		WHERE id = #{id}
	</update>
	
</mapper>