lidongdong
2023-10-23 e10f53c6ca83b11f1baa3af72508754c895398c9
添加活动详情  用户是否参加新增活动内容字段
3个文件已修改
62 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiExperienceActivityVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiExperienceActivity.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiExperienceActivityMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/jinhui/JinhuiExperienceActivityVO.java
@@ -65,6 +65,10 @@
    @ApiModelProperty(value = "封面")
    private String coverImgUrl;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "是否参加(0 未参加   1已参加)")
    private String isJoin;
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/java/com/panzhihua/service_jinhui_community/entity/JinhuiExperienceActivity.java
@@ -62,6 +62,9 @@
    @ApiModelProperty(value = "封面")
    private String coverImgUrl;
    @ApiModelProperty(value = "内容")
    private String content;
    @TableField(exist = false)
    @ApiModelProperty(value = "参加人数")
    private String number;
springcloud_k8s_panzhihuazhihuishequ/service_jinhui_community/src/main/resources/mapper/JinhuiExperienceActivityMapper.xml
@@ -19,6 +19,7 @@
        <result property="creationTime" column="creation_time" />
        <result property="updateTime" column="update_time" />
        <result property="activityType" column="activity_type" />
        <result property="content" column="content" />
    </resultMap>
    <!-- 分页查询 -->
@@ -41,6 +42,7 @@
            cover_img_url,
            creation_time,
            update_time,
            content,
            activity_type
        from jinhui_experience_activity
        order by creation_time desc
@@ -49,28 +51,30 @@
    <select id="getDetails" resultMap="itemMap">
        select
            jeeea.id,
            jeeea.title,
            jeeea.address,
            jeeea.lat,
            jeeea.lon,
            jeeea.apply_start_time,
            jeeea.apply_end_time,
            jeeea.activity_start_time,
            jeeea.activity_end_time,
            jeeea.people_number,
            (count(jae.id)) as number,
            IF(jae.id == null , '0', '1') as isJoin,
            jeeea.phone,
            jeeea.award,
            jeeea.cover_img_url,
            jeeea.creation_time,
            jeeea.update_time,
            jeeea.activity_type
        from jinhui_experience_activity as jeeea
        Left join jinhui_apply_experience as jae on jae.activity_id=jeeea.id
            id,
            title,
            address,
            lat,
            lon,
            apply_start_time,
            apply_end_time,
            activity_start_time,
            activity_end_time,
            people_number,
            (select count(jae.id) from jinhui_apply_experience as jae
             where jae.activity_id=jinhui_experience_activity.id) as number,
            IF((select id from jinhui_apply_experience where jinhui_apply_experience.user_id=#{userId}
                and jinhui_experience_activity.id=jinhui_apply_experience.activity_id) IS NULL, '0', '1') as isJoin,
            phone,
            award,
            content,
            cover_img_url,
            creation_time,
            update_time,
            activity_type
        from jinhui_experience_activity
        where
            jeeea.id=#{id}
            id=#{id}
    </select>
    <insert id="addData">
@@ -118,6 +122,9 @@
            <if test="item.activityType != null and item.activityType != '' ">
                activity_type,
            </if>
            <if test="item.content != null and item.content != '' ">
                content,
            </if>
            creation_time
        </trim>
        values
@@ -163,6 +170,9 @@
            </if>
            <if test="item.activityType != null and item.activityType != '' ">
                #{item.activityType},
            </if>
            <if test="item.content != null and item.content != '' ">
                #{item.content},
            </if>
            sysdate()
        </trim>
@@ -213,6 +223,9 @@
            <if test="item.activityType != null and item.activityType != '' ">
                activity_type=#{item.activityType},
            </if>
            <if test="item.content != null and item.content != '' ">
                content=#{item.content},
            </if>
            update_time=sysdate()
        </set>
        where id = #{item.id}