| | |
| | | <?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.panzhihua.service_community.dao.MostBeautifulVolunteerDao"> |
| | | <!--<?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.panzhihua.service_community.dao.MostBeautifulVolunteerDao">--> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerActivity" id="VolunteerActivityMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="acType" column="ac_type" /> |
| | | <result property="address" column="address" /> |
| | | <result property="volunteerNum" column="volunteer_num" /> |
| | | <result property="acState" column="ac_state" /> |
| | | <result property="awardState" column="award_state" /> |
| | | <result property="issueTime" column="issue_time" /> |
| | | <result property="applyBeginTime" column="apply_begin_time" /> |
| | | <result property="applyEndTime" column="apply_end_time" /> |
| | | <result property="actityBeginTime" column="actity_begin_time" /> |
| | | <result property="actityEndTime" column="actity_end_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | <result property="volunteerLimit" column="volunteer_limit" /> |
| | | <result property="bonusPoints" column="bonus_points" /> |
| | | <result property="isCancelled" column="is_cancelled" /> |
| | | <result property="contactName" column="contact_name" /> |
| | | <result property="contactPhone" column="contact_phone" /> |
| | | <result property="activitCoverUrl" column="activity_cover_url" /> |
| | | <result property="activityContent" column="activity_content" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <!-- <resultMap type="com.panzhihua.service_community.entity.VolunteerActivity" id="VolunteerActivityMap">--> |
| | | <!-- <result property="id" column="id" />--> |
| | | <!-- <result property="name" column="name" />--> |
| | | <!-- <result property="acType" column="ac_type" />--> |
| | | <!-- <result property="address" column="address" />--> |
| | | <!-- <result property="volunteerNum" column="volunteer_num" />--> |
| | | <!-- <result property="acState" column="ac_state" />--> |
| | | <!-- <result property="awardState" column="award_state" />--> |
| | | <!-- <result property="issueTime" column="issue_time" />--> |
| | | <!-- <result property="applyBeginTime" column="apply_begin_time" />--> |
| | | <!-- <result property="applyEndTime" column="apply_end_time" />--> |
| | | <!-- <result property="actityBeginTime" column="actity_begin_time" />--> |
| | | <!-- <result property="actityEndTime" column="actity_end_time" />--> |
| | | <!-- <result property="communityId" column="community_id" />--> |
| | | <!-- <result property="volunteerLimit" column="volunteer_limit" />--> |
| | | <!-- <result property="bonusPoints" column="bonus_points" />--> |
| | | <!-- <result property="isCancelled" column="is_cancelled" />--> |
| | | <!-- <result property="contactName" column="contact_name" />--> |
| | | <!-- <result property="contactPhone" column="contact_phone" />--> |
| | | <!-- <result property="activitCoverUrl" column="activity_cover_url" />--> |
| | | <!-- <result property="activityContent" column="activity_content" />--> |
| | | <!-- <result property="creationTime" column="creation_time" />--> |
| | | |
| | | </resultMap> |
| | | <!-- </resultMap>--> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultMap="MostBeautifulVolunteerMap"> |
| | | select |
| | | id, |
| | | name, |
| | | ac_type, |
| | | address, |
| | | volunteer_num, |
| | | ac_state, |
| | | award_state, |
| | | issue_time, |
| | | apply_begin_time, |
| | | apply_end_time, |
| | | actity_begin_time, |
| | | actity_end_time, |
| | | community_id, |
| | | volunteer_limit, |
| | | bonus_points, |
| | | is_cancelled, |
| | | contact_name, |
| | | contact_phone, |
| | | activity_cover_url, |
| | | activity_content, |
| | | creation_time |
| | | from volunteer_activity |
| | | where id= #{id} |
| | | </select> |
| | | <!-- <!–查询单个–>--> |
| | | <!-- <select id="queryById" resultMap="MostBeautifulVolunteerMap">--> |
| | | <!-- select--> |
| | | <!-- id,--> |
| | | <!-- name,--> |
| | | <!-- ac_type,--> |
| | | <!-- address,--> |
| | | <!-- volunteer_num,--> |
| | | <!-- ac_state,--> |
| | | <!-- award_state,--> |
| | | <!-- issue_time,--> |
| | | <!-- apply_begin_time,--> |
| | | <!-- apply_end_time,--> |
| | | <!-- actity_begin_time,--> |
| | | <!-- actity_end_time,--> |
| | | <!-- community_id,--> |
| | | <!-- volunteer_limit,--> |
| | | <!-- bonus_points,--> |
| | | <!-- is_cancelled,--> |
| | | <!-- contact_name,--> |
| | | <!-- contact_phone,--> |
| | | <!-- activity_cover_url,--> |
| | | <!-- activity_content,--> |
| | | <!-- creation_time--> |
| | | <!-- from volunteer_activity--> |
| | | <!-- where id= #{id}--> |
| | | <!-- </select>--> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryList" resultMap="MostBeautifulVolunteerMap"> |
| | | select |
| | | id, |
| | | name, |
| | | certificate_url, |
| | | self_introduction, |
| | | volunteer_style, |
| | | weight_sorting, |
| | | unmount_type, |
| | | creation_time, |
| | | community_id |
| | | from most_beautiful_volunteer |
| | | <where> |
| | | 1=1 |
| | | <if test="name!=null and name !=''"> |
| | | and (`name` like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="unmountType!=null and unmountType !=''"> |
| | | and unmount_type =# {unmountType} |
| | | </if> |
| | | <!-- <!–查询单个–>--> |
| | | <!--<!– <select id="queryList" resultMap="MostBeautifulVolunteerMap">–>--> |
| | | <!--<!– select–>--> |
| | | <!--<!– id,–>--> |
| | | <!--<!– name,–>--> |
| | | <!--<!– certificate_url,–>--> |
| | | <!--<!– self_introduction,–>--> |
| | | <!--<!– volunteer_style,–>--> |
| | | <!--<!– weight_sorting,–>--> |
| | | <!--<!– unmount_type,–>--> |
| | | <!--<!– creation_time,–>--> |
| | | <!--<!– community_id–>--> |
| | | <!--<!– from most_beautiful_volunteer–>--> |
| | | <!--<!– <where>–>--> |
| | | <!--<!– 1=1–>--> |
| | | <!--<!– <if test="name!=null and name !=''">–>--> |
| | | <!--<!– and (`name` like concat('%',#{name},'%')–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="unmountType!=null and unmountType !=''">–>--> |
| | | <!--<!– and unmount_type =# {unmountType}–>--> |
| | | <!--<!– </if>–>--> |
| | | |
| | | </where> |
| | | order by weight_sorting asc,creation_time desc |
| | | </select> |
| | | <!--<!– </where>–>--> |
| | | <!--<!– order by weight_sorting asc,creation_time desc–>--> |
| | | <!--<!– </select>–>--> |
| | | |
| | | <insert id="insertMostBeautifulVolunteer"> |
| | | insert into most_beautiful_volunteer |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="mostBeautifulVolunteerVO.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.name != null"> |
| | | name, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.certificateUrl != null"> |
| | | certificate_url, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.selfIntroduction != null"> |
| | | self_introduction, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.volunteerStyle != null"> |
| | | volunteer_style, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.weightSorting != null"> |
| | | weight_sorting, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.unmountType != null"> |
| | | unmount_type, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | creationTime |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="mostBeautifulVolunteerVO.id != null"> |
| | | #{mostBeautifulVolunteerVO.id}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.name != null"> |
| | | #{mostBeautifulVolunteerVO.name}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.certificateUrl != null"> |
| | | #{mostBeautifulVolunteerVO.certificateUrl}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.selfIntroduction != null"> |
| | | #{mostBeautifulVolunteerVO.selfIntroduction}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.volunteerStyle != null"> |
| | | #{mostBeautifulVolunteerVO.weightSorting}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.weightSorting != null"> |
| | | #{mostBeautifulVolunteerVO.weightSorting}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.unmountType != null"> |
| | | #{mostBeautifulVolunteerVO.unmountType}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.communityId != null"> |
| | | #{mostBeautifulVolunteerVO.communityId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | <!--<!– <insert id="insertMostBeautifulVolunteer">–>--> |
| | | <!--<!– insert into most_beautiful_volunteer–>--> |
| | | <!--<!– <trim prefix="(" suffix=")" suffixOverrides=",">–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.id != null">–>--> |
| | | <!--<!– id,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.name != null">–>--> |
| | | <!--<!– name,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.certificateUrl != null">–>--> |
| | | <!--<!– certificate_url,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.selfIntroduction != null">–>--> |
| | | <!--<!– self_introduction,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.volunteerStyle != null">–>--> |
| | | <!--<!– volunteer_style,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.weightSorting != null">–>--> |
| | | <!--<!– weight_sorting,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.unmountType != null">–>--> |
| | | <!--<!– unmount_type,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.communityId != null">–>--> |
| | | <!--<!– community_id,–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– creationTime–>--> |
| | | <!--<!– </trim>–>--> |
| | | <!--<!– values–>--> |
| | | <!--<!– <trim prefix="(" suffix=")" suffixOverrides=",">–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.id != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.id},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.name != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.name},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.certificateUrl != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.certificateUrl},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.selfIntroduction != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.selfIntroduction},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.volunteerStyle != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.weightSorting},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.weightSorting != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.weightSorting},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.unmountType != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.unmountType},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.communityId != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.communityId},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– sysdate()–>--> |
| | | <!--<!– </trim>–>--> |
| | | <!--<!– </insert>–>--> |
| | | |
| | | <update id="updateById"> |
| | | update most_beautiful_volunteer |
| | | <set> |
| | | <if test="mostBeautifulVolunteerVO.id != null"> |
| | | #{mostBeautifulVolunteerVO.id}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.name != null"> |
| | | #{mostBeautifulVolunteerVO.name}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.certificateUrl != null"> |
| | | #{mostBeautifulVolunteerVO.certificateUrl}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.selfIntroduction != null"> |
| | | #{mostBeautifulVolunteerVO.selfIntroduction}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.volunteerStyle != null"> |
| | | #{mostBeautifulVolunteerVO.weightSorting}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.weightSorting != null"> |
| | | #{mostBeautifulVolunteerVO.weightSorting}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.unmountType != null"> |
| | | #{mostBeautifulVolunteerVO.unmountType}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{mostBeautifulVolunteerVO.id} |
| | | <!--<!– <update id="updateById">–>--> |
| | | <!--<!– update most_beautiful_volunteer–>--> |
| | | <!--<!– <set>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.id != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.id},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.name != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.name},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.certificateUrl != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.certificateUrl},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.selfIntroduction != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.selfIntroduction},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.volunteerStyle != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.weightSorting},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.weightSorting != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.weightSorting},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– <if test="mostBeautifulVolunteerVO.unmountType != null">–>--> |
| | | <!--<!– #{mostBeautifulVolunteerVO.unmountType},–>--> |
| | | <!--<!– </if>–>--> |
| | | <!--<!– update_time=sysdate()–>--> |
| | | <!--<!– </set>–>--> |
| | | <!--<!– where id = #{mostBeautifulVolunteerVO.id}–>--> |
| | | |
| | | </update> |
| | | <!--<!– </update>–>--> |
| | | |
| | | |
| | | <delete id="deleteById" parameterType="String"> |
| | | delete from most_beautiful_volunteer where id=#{id} |
| | | </delete> |
| | | <!--<!– <delete id="deleteById" parameterType="String">–>--> |
| | | <!--<!– delete from most_beautiful_volunteer where id=#{id}–>--> |
| | | <!--<!– </delete>–>--> |
| | | |
| | | </mapper> |
| | | <!--</mapper>--> |