lidongdong
2023-08-17 3459b7f0525b74fdc6630cd2a4fed6237988b2eb
美志愿者编辑报错id为空
1个文件已修改
334 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/VolunteerActivityMapper.xml 334 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/VolunteerActivityMapper.xml
@@ -1,178 +1,178 @@
<?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>
<!--    &lt;!&ndash;查询单个&ndash;&gt;-->
<!--    <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>
<!--    &lt;!&ndash;查询单个&ndash;&gt;-->
<!--&lt;!&ndash;    <select id="queryList" resultMap="MostBeautifulVolunteerMap">&ndash;&gt;-->
<!--&lt;!&ndash;        select&ndash;&gt;-->
<!--&lt;!&ndash;        id,&ndash;&gt;-->
<!--&lt;!&ndash;        name,&ndash;&gt;-->
<!--&lt;!&ndash;        certificate_url,&ndash;&gt;-->
<!--&lt;!&ndash;        self_introduction,&ndash;&gt;-->
<!--&lt;!&ndash;        volunteer_style,&ndash;&gt;-->
<!--&lt;!&ndash;        weight_sorting,&ndash;&gt;-->
<!--&lt;!&ndash;        unmount_type,&ndash;&gt;-->
<!--&lt;!&ndash;        creation_time,&ndash;&gt;-->
<!--&lt;!&ndash;        community_id&ndash;&gt;-->
<!--&lt;!&ndash;        from most_beautiful_volunteer&ndash;&gt;-->
<!--&lt;!&ndash;        <where>&ndash;&gt;-->
<!--&lt;!&ndash;            1=1&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="name!=null and name !=''">&ndash;&gt;-->
<!--&lt;!&ndash;                and (`name` like concat('%',#{name},'%')&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if  test="unmountType!=null and unmountType !=''">&ndash;&gt;-->
<!--&lt;!&ndash;                and unmount_type =# {unmountType}&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
        </where>
        order by weight_sorting asc,creation_time desc
    </select>
<!--&lt;!&ndash;        </where>&ndash;&gt;-->
<!--&lt;!&ndash;        order by weight_sorting asc,creation_time desc&ndash;&gt;-->
<!--&lt;!&ndash;    </select>&ndash;&gt;-->
    <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>
<!--&lt;!&ndash;    <insert id="insertMostBeautifulVolunteer">&ndash;&gt;-->
<!--&lt;!&ndash;        insert into most_beautiful_volunteer&ndash;&gt;-->
<!--&lt;!&ndash;        <trim prefix="(" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.id != null">&ndash;&gt;-->
<!--&lt;!&ndash;                id,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.name != null">&ndash;&gt;-->
<!--&lt;!&ndash;                name,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.certificateUrl != null">&ndash;&gt;-->
<!--&lt;!&ndash;                certificate_url,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.selfIntroduction != null">&ndash;&gt;-->
<!--&lt;!&ndash;                self_introduction,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.volunteerStyle != null">&ndash;&gt;-->
<!--&lt;!&ndash;                volunteer_style,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.weightSorting != null">&ndash;&gt;-->
<!--&lt;!&ndash;                weight_sorting,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.unmountType != null">&ndash;&gt;-->
<!--&lt;!&ndash;                unmount_type,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.communityId != null">&ndash;&gt;-->
<!--&lt;!&ndash;                community_id,&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            creationTime&ndash;&gt;-->
<!--&lt;!&ndash;        </trim>&ndash;&gt;-->
<!--&lt;!&ndash;        values&ndash;&gt;-->
<!--&lt;!&ndash;        <trim prefix="("  suffix=")" suffixOverrides=",">&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.id != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.id},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.name != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.name},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.certificateUrl != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.certificateUrl},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.selfIntroduction != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.selfIntroduction},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.volunteerStyle != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.weightSorting},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.weightSorting != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.weightSorting},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.unmountType != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.unmountType},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.communityId != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.communityId},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            sysdate()&ndash;&gt;-->
<!--&lt;!&ndash;        </trim>&ndash;&gt;-->
<!--&lt;!&ndash;    </insert>&ndash;&gt;-->
    <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}
<!--&lt;!&ndash;    <update id="updateById">&ndash;&gt;-->
<!--&lt;!&ndash;        update most_beautiful_volunteer&ndash;&gt;-->
<!--&lt;!&ndash;        <set>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.id != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.id},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.name != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.name},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.certificateUrl != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.certificateUrl},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.selfIntroduction != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.selfIntroduction},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.volunteerStyle != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.weightSorting},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.weightSorting != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.weightSorting},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            <if test="mostBeautifulVolunteerVO.unmountType != null">&ndash;&gt;-->
<!--&lt;!&ndash;                #{mostBeautifulVolunteerVO.unmountType},&ndash;&gt;-->
<!--&lt;!&ndash;            </if>&ndash;&gt;-->
<!--&lt;!&ndash;            update_time=sysdate()&ndash;&gt;-->
<!--&lt;!&ndash;        </set>&ndash;&gt;-->
<!--&lt;!&ndash;        where id = #{mostBeautifulVolunteerVO.id}&ndash;&gt;-->
    </update>
<!--&lt;!&ndash;    </update>&ndash;&gt;-->
    <delete id="deleteById" parameterType="String">
        delete from most_beautiful_volunteer where id=#{id}
    </delete>
<!--&lt;!&ndash;    <delete id="deleteById" parameterType="String">&ndash;&gt;-->
<!--&lt;!&ndash;        delete from most_beautiful_volunteer where id=#{id}&ndash;&gt;-->
<!--&lt;!&ndash;    </delete>&ndash;&gt;-->
</mapper>
<!--</mapper>-->