| | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverImgUrl; |
| | | |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "是否参加(0 未参加 1已参加)") |
| | | private String isJoin; |
| | | |
| | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverImgUrl; |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "参加人数") |
| | | private String number; |
| | |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="activityType" column="activity_type" /> |
| | | <result property="content" column="content" /> |
| | | </resultMap> |
| | | |
| | | <!-- 分页查询 --> |
| | |
| | | cover_img_url, |
| | | creation_time, |
| | | update_time, |
| | | content, |
| | | activity_type |
| | | from jinhui_experience_activity |
| | | order by creation_time desc |
| | |
| | | |
| | | <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"> |
| | |
| | | <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 |
| | |
| | | </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> |
| | |
| | | <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} |