<?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="io.renren.modules.app.dao.XzdyFwxxSdDao">

	<update id="updatebymh" parameterType="io.renren.modules.app.entity.XzdyFwxxSdEntity">
		update fwxx set
		mj=#{mj},fwxz=#{fwxz},hx=#{hx},fwyt=#{fwyt},bz=#{bz} where
		mh=#{mh}

	</update>

	<select id="selectxq" resultType="io.renren.modules.app.entity.XlkEntity">
		select xqmc,xqbm from xqxx
		where 1=1

	</select>

	<select id="selectxm" resultType="io.renren.modules.app.entity.XlkEntity">
		select xmmc,xmbm from xm
		where
		1=1

	</select>

	<select id="selectlz" resultType="io.renren.modules.app.entity.XlkEntity">
		select dhmc,dhbm from zhxx
		where 1=1

	</select>

	<select id="selectdy" resultType="io.renren.modules.app.entity.XlkEntity">
		select dymc,fwdybm from dyxx
		where 1=1

	</select>


	<select id="queryByPage" parameterType="io.renren.modules.app.entity.XzdyFwxxSdEntity"
		resultType="io.renren.modules.app.entity.XzdyFwxxSdEntity">

		select d.fwdybm fwdybm,d.dymc dymc,d.hs hs,f.mj mj,f.fwxz fwxz,f.hx
		hx,f.bz bz from fwxx f left
		join dyxx d on f.mh=d.fwdybm where 1=1

		<if test=" id!=null and id!='' ">
			and id like CONCAT(#{id},"%")
		</if>
		<if test=" cczh!=null and cczh!='' ">
			and cczh like CONCAT(#{cczh},"%")
		</if>
		<if test=" fwbm!=null and fwbm!='' ">
			and fwbm like CONCAT(#{fwbm},"%")
		</if>
		<if test=" dhbm!=null and dhbm!='' ">
			and dhbm like CONCAT(#{dhbm},"%")
		</if>
		<if test=" mphm!=null and mphm!='' ">
			and mphm like CONCAT(#{mphm},"%")
		</if>
		<if test=" lc!=null and lc!='' ">
			and lc like CONCAT(#{lc},"%")
		</if>
		<if test=" hx!=null and hx!='' ">
			and hx like CONCAT(#{hx},"%")
		</if>
		<if test=" fwxz!=null and fwxz!='' ">
			and fwxz like CONCAT(#{fwxz},"%")
		</if>
		<if test=" ssdj!=null and ssdj!='' ">
			and ssdj like CONCAT(#{ssdj},"%")
		</if>
		<if test=" mj!=null and mj!='' ">
			and mj like CONCAT(#{mj},"%")
		</if>
		<if test=" fwje!=null and fwje!='' ">
			and fwje like CONCAT(#{fwje},"%")
		</if>
		<if test=" gfrq!=null and gfrq!='' ">
			and gfrq like CONCAT(#{gfrq},"%")
		</if>
		<if test=" lfmj!=null and lfmj!='' ">
			and lfmj like CONCAT(#{lfmj},"%")
		</if>
		<if test=" lfdj!=null and lfdj!='' ">
			and lfdj like CONCAT(#{lfdj},"%")
		</if>
		<if test=" lfje!=null and lfje!='' ">
			and lfje like CONCAT(#{lfje},"%")
		</if>
		<if test=" zjk!=null and zjk!='' ">
			and zjk like CONCAT(#{zjk},"%")
		</if>
		<if test=" hxt!=null and hxt!='' ">
			and hxt like CONCAT(#{hxt},"%")
		</if>
		<if test=" xm!=null and xm!='' ">
			and xm like CONCAT(#{xm},"%")
		</if>
		<if test=" sfzh!=null and sfzh!='' ">
			and sfzh like CONCAT(sfzh,"%")
		</if>
		<if test=" lxdh!=null and lxdh!='' ">
			and lxdh like CONCAT(#{lxdh},"%")
		</if>
		<if test=" jjze!=null and jjze!='' ">
			and jjze like CONCAT(#{jjze},"%")
		</if>
		<if test=" grje!=null and grje!='' ">
			and grje like CONCAT(#{grje},"%")
		</if>
		<if test=" dwje!=null and dwje!='' ">
			and dwje like CONCAT(#{dwje},"%")
		</if>
		<if test=" dqye!=null and dqye!='' ">
			and dqye like CONCAT(#{dqye},"%")
		</if>
		<if test=" sfsc!=null and sfsc!='' ">
			and sfsc like CONCAT(#{sfsc},"%")
		</if>
		<if test=" mh!=null and mh!='' ">
			and mh like CONCAT(#{mh},"%")
		</if>
		<if test=" grjjl!=null and grjjl!='' ">
			and grjjl like CONCAT(#{grjjl},"%")
		</if>
		<if test=" jsbz!=null and jsbz!='' ">
			and jsbz like CONCAT(#{jsbz},"%")
		</if>
		<if test=" gzdbm!=null and gzdbm!='' ">
			and gzdbm like CONCAT(#{gzdbm},"%")
		</if>
		<if test=" ggsy!=null and ggsy!='' ">
			and ggsy like CONCAT(#{ggsy},"%")
		</if>
		<if test=" zqje!=null and zqje!='' ">
			and zqje like CONCAT(#{zqje},"%")
		</if>
		<if test=" ljlx!=null and ljlx!='' ">
			and ljlx like CONCAT(#{ljlx},"%")
		</if>
		<if test=" ncye!=null and ncye!='' ">
			and ncye like CONCAT(#{ncye},"%")
		</if>
		<if test=" xhje!=null and xhje!='' ">
			and xhje like CONCAT(#{xhje},"%")
		</if>
		<if test=" xhjx!=null and xhjx!='' ">
			and xhjx like CONCAT(#{xhjx},"%")
		</if>
		<if test=" htbh!=null and htbh!='' ">
			and htbh like CONCAT(#{htbh},"%")
		</if>
		<if test=" fpbh!=null and fpbh!='' ">
			and fpbh like CONCAT(#{fpbh},"%")
		</if>
		<if test=" zjlb!=null and zjlb!='' ">
			and zjlb like CONCAT(#{zjlb},"%")
		</if>
		<if test=" dz!=null and dz!='' ">
			and dz like CONCAT(#{dz},"%")
		</if>
		<if test=" bz!=null and bz!='' ">
			and bz like CONCAT(#{bz},"%")
		</if>
		<if test=" jcbzbm!=null and jcbzbm!='' ">
			and jcbzbm like CONCAT(#{jcbzbm},"%")
		</if>
		<if test=" fwyt!=null and fwyt!='' ">
			and fwyt like CONCAT(#{fwyt},"%")
		</if>
		<if test=" spzt!=null and spzt!='' ">
			and spzt like CONCAT(#{spzt},"%")
		</if>
		<if test=" yzkm!=null and yzkm!='' ">
			and yzkm like CONCAT(#{yzkm},"%")
		</if>

	</select>


</mapper>