| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 | 
							- <?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.zhyc.xps.lylc.mapper.HosMapper">
 
-     <!-- 通用查询映射结果 -->
 
-     <resultMap id="HosDtoResultMap" type="com.zhyc.xps.lylc.dto.HosDto">
 
-         <result column="oc_id"                  property="ocId"             jdbcType="BIGINT"   />
 
-         <result column="hos_name"               property="hosName"          jdbcType="VARCHAR"  />
 
-         <result column="hos_code"               property="hosCode"          jdbcType="VARCHAR"  />
 
-         <result column="hos_tyshxydm"           property="hosTyshxydm"      jdbcType="VARCHAR"  />
 
-         <result column="hos_wzjd"               property="hosWzjd"          jdbcType="DECIMAL"  />
 
-         <result column="hos_wzwd"               property="hosWzwd"          jdbcType="DECIMAL"  />
 
-         <result column="hos_zcdz"               property="hosZcdz"          jdbcType="VARCHAR"  />
 
-         <result column="hos_scjydz"             property="hosScjydz"        jdbcType="VARCHAR"  />
 
-         <result column="hos_cat_id"             property="hosCatId"         jdbcType="BIGINT"   />
 
-         <result column="hos_website"            property="hosWebsite"       jdbcType="VARCHAR"  />
 
-         <result column="hos_grade"              property="hosGrade"         jdbcType="BIGINT"   />
 
-         <result column="hos_level"              property="hosLevel"         jdbcType="BIGINT"   />
 
-         <result column="hos_intro"              property="hosIntro"         jdbcType="VARCHAR"  />
 
-         <result column="access_time"            property="accessTime"       jdbcType="TIMESTAMP"/>
 
-         <result column="access_status"          property="accessStatus"     jdbcType="BIGINT"   />
 
-     </resultMap>
 
-     <!-- 通用查询结果列 -->
 
-     <sql id="HosDto_Cols">
 
-         A.oc_id,
 
-         A.hos_name,
 
-         A.hos_code,
 
-         A.hos_tyshxydm,
 
-         A.hos_wzjd,
 
-         A.hos_wzwd,
 
-         A.hos_zcdz,
 
-         A.hos_scjydz,
 
-         A.hos_cat_id,
 
-         A.hos_website,
 
-         A.hos_grade,
 
-         A.hos_level,
 
-         A.hos_intro,
 
-         B.access_time,
 
-         B.status AS access_status
 
-     </sql>
 
-     <!--基于ID查询-->
 
-     <select id="getById" resultMap="HosDtoResultMap">
 
-         SELECT
 
-             <include refid="HosDto_Cols"/>
 
-         FROM      hos       AS A
 
-         LEFT JOIN oc_access AS B  ON (A.oc_id = B.oc_id)
 
-         WHERE A.deleted_flag = 0
 
-         <if test="ocId != null">
 
-             AND A.oc_id = #{ocId ,jdbcType=BIGINT}
 
-         </if>
 
-     </select>
 
-     <!--分页查询-->
 
-     <select id="getByPage" parameterType="java.util.Map" resultMap="HosDtoResultMap" >
 
-         SELECT
 
-             <include refid="HosDto_Cols"/>
 
-         FROM      hos       AS A
 
-         LEFT JOIN oc_access AS B  ON (A.oc_id = B.oc_id)
 
-         WHERE A.deleted_flag = 0
 
-         <if test="keywords != null and keywords != ''">
 
-             AND A.hos_name like "%"#{keywords}"%"
 
-         </if>
 
-         ORDER BY A.oc_id ASC
 
-     </select>
 
-     <!--列表查询-->
 
-     <select id="getByList" parameterType="java.util.Map" resultMap="HosDtoResultMap">
 
-         SELECT
 
-             <include refid="HosDto_Cols"/>
 
-         FROM      hos       AS A
 
-         LEFT JOIN oc_access AS B  ON (A.oc_id = B.oc_id)
 
-         WHERE A.deleted_flag = 0
 
-         <if test="keywords != null and keywords != ''">
 
-             AND A.hos_name like "%"#{keywords}"%"
 
-         </if>
 
-     </select>
 
-     <insert id="create" parameterType="com.zhyc.xps.lylc.entity.Hos">
 
-         INSERT INTO hos
 
-         <trim prefix="(" suffix=")" suffixOverrides=",">
 
-             <if test="ocId != null">
 
-                 oc_id,
 
-             </if>
 
-             <if test="ocId != null">
 
-                 oc_id,
 
-             </if>
 
-             <if test="hosName != null and hosName != ''">
 
-                 hos_name,
 
-             </if>
 
-             <if test="hosCode != null and hosCode != ''">
 
-                 hos_code,
 
-             </if>
 
-             <if test="hosTyshxydm != null and hosTyshxydm != ''">
 
-                 hos_tyshxydm,
 
-             </if>
 
-             <if test="hosWzjd != null">
 
-                 hos_wzjd,
 
-             </if>
 
-             <if test="hosWzwd != null">
 
-                 hos_wzwd,
 
-             </if>
 
-             <if test="hosZcdz != null and hosZcdz != ''">
 
-                 hos_zcdz,
 
-             </if>
 
-             <if test="hosScjydz != null and hosScjydz != ''">
 
-                 hos_scjydz,
 
-             </if>
 
-             <if test="hosCatId != null">
 
-                 hos_cat_id,
 
-             </if>
 
-             <if test="hosWebsite != null and hosWebsite != ''">
 
-                 hos_website,
 
-             </if>
 
-             <if test="hosGrade != null">
 
-                 hos_grade,
 
-             </if>
 
-             <if test="hosLevel != null">
 
-                 hos_level,
 
-             </if>
 
-             <if test="hosIntro != null and hosIntro != ''">
 
-                 hos_intro,
 
-             </if>
 
-             <if test="createdBy != null">
 
-                 created_by,
 
-             </if>
 
-             <if test="createdAt != null">
 
-                 created_at,
 
-             </if>
 
-         </trim>
 
-         <trim prefix="values (" suffix=")" suffixOverrides=",">
 
-             <if test="ocId != null">
 
-                 #{ocId,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="ocId != null">
 
-                 #{ocId ,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="hosName != null and hosName != ''">
 
-                 #{hosName ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosCode != null and hosCode != ''">
 
-                 #{hosCode ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosTyshxydm != null and hosTyshxydm != ''">
 
-                 #{hosTyshxydm ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosWzjd != null">
 
-                 #{hosWzjd ,jdbcType=DECIMAL},
 
-             </if>
 
-             <if test="hosWzwd != null">
 
-                 #{hosWzwd ,jdbcType=DECIMAL},
 
-             </if>
 
-             <if test="hosZcdz != null and hosZcdz != ''">
 
-                 #{hosZcdz ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosScjydz != null and hosScjydz != ''">
 
-                 #{hosScjydz ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosCatId != null">
 
-                 #{hosCatId ,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="hosWebsite != null and hosWebsite != ''">
 
-                 #{hosWebsite ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="hosGrade != null">
 
-                 #{hosGrade ,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="hosLevel != null">
 
-                 #{hosLevel ,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="hosIntro != null and hosIntro != ''">
 
-                 #{hosIntro ,jdbcType=VARCHAR},
 
-             </if>
 
-             <if test="createdBy != null">
 
-                 #{createdBy ,jdbcType=BIGINT},
 
-             </if>
 
-             <if test="createdAt != null">
 
-                 #{createdAt ,jdbcType=TIMESTAMP},
 
-             </if>
 
-         </trim>
 
-     </insert>
 
-     <!--更新-->
 
-     <update id="update" parameterType="com.zhyc.xps.lylc.entity.Hos">
 
-         UPDATE hos
 
-         <trim suffixOverrides=",">
 
-             <set>
 
-                 <if test="hosName != null and hosName != ''">
 
-                     hos_name = #{hosName, jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosCode != null and hosCode != ''">
 
-                     hos_code = #{hosCode ,jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosTyshxydm != null and hosTyshxydm != ''">
 
-                     hos_tyshxydm = #{hosTyshxydm ,jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosWzjd != null">
 
-                     hos_wzjd = #{hosWzjd ,jdbcType=DECIMAL},
 
-                 </if>
 
-                 <if test="hosWzwd != null">
 
-                     hos_wzwd = #{hosWzwd ,jdbcType=DECIMAL},
 
-                 </if>
 
-                 <if test="hosZcdz != null and hosZcdz != ''">
 
-                     hos_zcdz = #{hosZcdz ,jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosScjydz != null and hosScjydz != ''">
 
-                     hos_scjydz = #{hosScjydz ,jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosCatId != null">
 
-                     hos_cat_id = #{hosCatId ,jdbcType=BIGINT},
 
-                 </if>
 
-                 <if test="hosWebsite != null and hosWebsite != ''">
 
-                     hos_website = #{hosWebsite ,jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="hosGrade != null">
 
-                     hos_grade = #{hosGrade ,jdbcType=BIGINT},
 
-                 </if>
 
-                 <if test="hosLevel != null">
 
-                     hos_level = #{hosLevel ,jdbcType=BIGINT},
 
-                 </if>
 
-                 <if test="hosIntro != null  and hosIntro != ''">
 
-                     hos_intro = #{hosIntro, jdbcType=VARCHAR},
 
-                 </if>
 
-                 <if test="updatedBy != null ">
 
-                     updated_by = #{updatedBy ,jdbcType=BIGINT},
 
-                 </if>
 
-                 <if test="updatedAt != null">
 
-                     updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
 
-                 </if>
 
-             </set>
 
-         </trim>
 
-         WHERE 1 = 1
 
-         <if test="ocId != null">
 
-             AND oc_id = #{ocId ,jdbcType=BIGINT}
 
-         </if>
 
-     </update>
 
-     <!--删除-->
 
-     <update id="delete" parameterType="java.util.Map">
 
-         UPDATE hos
 
-         <trim suffixOverrides=",">
 
-             <set>
 
-                 <if test="deletedFlag != null">
 
-                     deleted_flag = #{deletedFlag,jdbcType=BIGINT},
 
-                 </if>
 
-                 <if test="deletedTime != null">
 
-                     deleted_time = #{deletedTime,jdbcType=TIMESTAMP},
 
-                 </if>
 
-                 <if test="deletedBy != null">
 
-                     deleted_by = #{deletedBy,jdbcType=BIGINT},
 
-                 </if>
 
-             </set>
 
-         </trim>
 
-         WHERE oc_id = #{ocId ,jdbcType=BIGINT}
 
-     </update>
 
- </mapper>
 
 
  |