HsBeforeOpeDAO.xml 8.86 KB
Newer Older
罗绍泽 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
<?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.gaowj.business.hsdata.HsBeforeOpeDAO">
	
	<insert id="insert_register" parameterType="map">
	      insert into b_t_ufp_register(
	      <trim prefix=""  suffixOverrides=",">
	         <if test="UUID != null ">UUID, </if>
	         <if test="USER_ID != null ">USER_ID, </if>
             <if test="PASSWORD != null ">PASSWORD, </if>
             <if test="ALIAS != null ">ALIAS, </if>
             <if test="NAME != null ">NAME , </if>
             <if test="SEX != null ">SEX , </if>
             <if test="EMAIL != null ">EMAIL , </if>
             <if test="TEL != null ">TEL , </if>
             <if test="LINK_ADD != null ">LINK_ADD , </if>
             <if test="FAMILY_ADD != null ">FAMILY_ADD , </if>
             <if test="POST != null ">POST , </if>
             <if test="ID_CODE != null ">ID_CODE , </if>
             <if test="EXPAND_XML != null ">EXPAND_XML , </if>
             <if test="IS_DELETE != null ">IS_DELETE , </if>
             <if test="CREATE_USER != null ">CREATE_USER , </if>
             <if test="CREATE_TIME != null ">CREATE_TIME , </if>
             <if test="UPDATE_USER != null ">UPDATE_USER , </if>
             <if test="UPDATE_TIME != null ">UPDATE_TIME , </if>
             <if test="MOBILE != null ">MOBILE , </if>
           </trim>
	    <![CDATA[ ) values( ]]> 
	       <trim prefix=""  suffixOverrides=",">
	         <if test="UUID != null ">#{UUID}, </if>
	         <if test="USER_ID != null ">#{USER_ID}, </if>
             <if test="PASSWORD != null ">#{PASSWORD}, </if>
             <if test="ALIAS != null ">#{ALIAS}, </if>
             <if test="NAME != null ">#{NAME} , </if>
             <if test="SEX != null ">#{SEX} , </if>
             <if test="EMAIL != null ">#{EMAIL} , </if>
             <if test="TEL != null ">#{TEL} , </if>
             <if test="LINK_ADD != null ">#{LINK_ADD} , </if>
             <if test="FAMILY_ADD != null ">#{FAMILY_ADD} , </if>
             <if test="POST != null ">#{POST} , </if>
             <if test="ID_CODE != null ">#{ID_CODE} , </if>
             <if test="EXPAND_XML != null ">#{EXPAND_XML} , </if>
             <if test="IS_DELETE != null ">#{IS_DELETE} , </if>
             <if test="CREATE_USER != null ">#{CREATE_USER} , </if>
             <if test="CREATE_TIME != null ">#{CREATE_TIME} , </if>
             <if test="UPDATE_USER != null ">#{UPDATE_USER} , </if>
             <if test="UPDATE_TIME != null ">#{UPDATE_TIME} , </if>
             <if test="MOBILE != null ">#{MOBILE} , </if>
            </trim>
	    <![CDATA[ ) ]]> 
 	</insert>
 
 	<update id="update_register" parameterType="map">
	   update b_t_ufp_register  
	    <set> 
	         <if test="USER_ID != null ">USER_ID = #{USER_ID}, </if>
             <if test="PASSWORD != null ">PASSWORD = #{PASSWORD}, </if>
             <if test="ALIAS != null ">ALIAS = #{ALIAS}, </if>
             <if test="NAME != null ">NAME = #{NAME} , </if>
             <if test="SEX != null ">SEX = #{SEX} , </if>
             <if test="EMAIL != null ">EMAIL = #{EMAIL} , </if>
             <if test="TEL != null ">TEL = #{TEL} , </if>
             <if test="LINK_ADD != null ">LINK_ADD = #{LINK_ADD} , </if>
             <if test="FAMILY_ADD != null ">FAMILY_ADD = #{FAMILY_ADD} , </if>
             <if test="POST != null ">POST = #{POST} , </if>
             <if test="ID_CODE != null ">ID_CODE = #{ID_CODE} , </if>
             <if test="EXPAND_XML != null ">EXPAND_XML = #{EXPAND_XML} , </if>
             <if test="IS_DELETE != null ">IS_DELETE = #{IS_DELETE} , </if>
             <if test="CREATE_USER != null ">CREATE_USER = #{CREATE_USER} , </if>
             <if test="CREATE_TIME != null ">CREATE_TIME = #{CREATE_TIME} , </if>
             <if test="UPDATE_USER != null ">UPDATE_USER = #{UPDATE_USER} , </if>
             <if test="UPDATE_TIME != null ">UPDATE_TIME = #{UPDATE_TIME} , </if>
             <if test="MOBILE != null ">MOBILE = #{MOBILE} , </if>
	    </set>
         <where>
	       <if test="UUID != null and UUID != ''">
	          and UUID = #{UUID} 
	       </if>
	       <if test="USER_ID != null and USER_ID != ''">
	          and USER_ID = #{USER_ID}
	       </if>
	  </where>
 	</update>
 	
 	<update id="update_register_password" parameterType="map">
	   update b_t_ufp_register  
	    <set> 
             <if test="PASSWORD != null ">PASSWORD = #{PASSWORD}, </if>
	    </set>
         <where>
	       <if test="UUID != null and UUID != ''">
	          and UUID = #{UUID} 
	       </if>
	       <if test="USER_ID != null and USER_ID != ''">
	          and USER_ID = #{USER_ID}
	       </if>
	  </where>
 	</update>
 	
 	
 	
 	<update id="delete_register" parameterType="map">
	 <![CDATA[
	delete from b_t_ufp_register 
	  ]]>
	  <where>
	    <if test="UUID != null and UUID != ''">
	      and UUID = #{UUID} 
	    </if>
	    <if test="USER_ID != null and USER_ID != ''">
	      and USER_ID = #{USER_ID}
	    </if>
	  </where> 
 	</update>
	
	<select id="listRegisterInfo" parameterType="map" resultType="upperCaseKeyMap">
	 <![CDATA[
	   select u.* from b_t_ufp_register u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="USER_ID != null and USER_ID != ''">
      and u.USER_ID = #{USER_ID}
     </if>
     <if test="PASSWORD != null and PASSWORD != ''">
      and u.PASSWORD = #{PASSWORD}
     </if>
	</select>
	
	<select id="listRegisterInfoCount" parameterType="map" resultType="int">
	 <![CDATA[
	   select count(*) c from b_t_ufp_register u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="USER_ID != null and USER_ID != ''">
      and u.USER_ID = #{USER_ID}
     </if>
     <if test="PASSWORD != null and PASSWORD != ''">
      and u.PASSWORD = #{PASSWORD}
     </if>
	</select>
	
	<!-- 查找数据目录 -->
	<select id="listCatalogInfo" parameterType="map" resultType="upperCaseKeyMap">
	 <![CDATA[
	   select u.* from b_t_sys_catalog u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="PARENT_ID != null and PARENT_ID != ''">
      and u.PARENT_ID = #{PARENT_ID}
     </if>
     <if test="CATALOG_NAME != null and CATALOG_NAME != ''">
      and u.CATALOG_NAME like '%${PASSWORD}%'
     </if>
     <if test="CATALOG != null and CATALOG.length > 0">
      and u.PARENT_ID in
       <foreach collection="CATALOG" item="id" open="(" close=")" separator=",">#{id}</foreach>
     </if>
     order by u.SORT 
	</select>
	
	<select id="listCatalogInfoCount" parameterType="map" resultType="int">
	 <![CDATA[
	   select count(*) c from b_t_sys_catalog u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="PARENT_ID != null and PARENT_ID != ''">
      and u.PARENT_ID = #{PARENT_ID}
     </if>
     <if test="CATALOG_NAME != null and CATALOG_NAME != ''">
      and u.CATALOG_NAME like '%${PASSWORD}%'
     </if>
     <if test="CATALOG != null and CATALOG.length > 0">
      and u.PARENT_ID in
       <foreach collection="CATALOG" item="id" open="(" close=")" separator=",">#{id}</foreach>
     </if>
	</select>
	
	<!-- 查找目录-表关联表 -->
	<select id="listRelationsInfo" parameterType="map" resultType="upperCaseKeyMap">
	 <![CDATA[
	   select u.* from b_t_sys_relation u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="CATALOG_ID != null and CATALOG_ID != ''">
      and u.CATALOG_ID like '${CATALOG_ID}%'
     </if>
     <if test="TABLE_NAME != null and TABLE_NAME != ''">
      and u.TABLE_NAME like '%${TABLE_NAME}%'
     </if>
     <if test="CATALOG != null and CATALOG.length > 0">
      and u.CATALOG_ID in
       <foreach collection="CATALOG" item="id" open="(" close=")" separator=",">#{id}</foreach>
     </if>
     <if test="KEYWORDS != null and KEYWORDS != ''">
      and u.KEYWORDS like '%${KEYWORDS}%'
     </if>

	</select>
	
	<select id="listRelationsInfoCount" parameterType="map" resultType="int">
	 <![CDATA[
	   select count(*) c from b_t_sys_relation u 
	   where 1=1  and u.is_delete=0 
     ]]>
     <if test="UUID != null and UUID != ''">
      and u.UUID = #{UUID}
     </if>
     <if test="CATALOG_ID != null and CATALOG_ID != ''">
      and u.CATALOG_ID like '${CATALOG_ID}%'
     </if>
     <if test="TABLE_NAME != null and TABLE_NAME != ''">
      and u.TABLE_NAME like '%${TABLE_NAME}%'
     </if>
     <if test="CATALOG != null and CATALOG.length > 0">
      and u.CATALOG_ID in
       <foreach collection="CATALOG" item="id" open="(" close=")" separator=",">#{id}</foreach>
     </if>
     <if test="KEYWORDS != null and KEYWORDS != ''">
      and u.KEYWORDS like '%${KEYWORDS}%'
     </if>
	</select>
</mapper>