| | |
| | | @GetMapping("/queryById") |
| | | public R queryById(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(volunteerActivityService.queryById(id)); |
| | | return R.ok(volunteerActivityService.queryById(id,getUserId()+"")); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RequestParam(value = "actityEndTime", required = false) Date actityEndTime) |
| | | { |
| | | |
| | | return R.ok(volunteerActivityService.queryList(pageNum, pageSize, name, acState, acType, actityBeginTime, actityEndTime)); |
| | | return R.ok(volunteerActivityService.queryList(pageNum, pageSize, name, acState,getUserId()+"", acType, actityBeginTime, actityEndTime)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivity queryById(@Param("id") String id); |
| | | VolunteerActivity queryById(@Param("id") String id,@Param("userId") String userId); |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | @Param("name") String name, |
| | | @Param("acState") String acState, |
| | | @Param("acType") String acType, |
| | | @Param("userId") String userId, |
| | | @Param("actityBeginTime") Date actityBeginTime, |
| | | @Param("actityEndTime") Date actityEndTime); |
| | | |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "是否参与活动 0未参与 1参与") |
| | | private String isSign; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivity queryById( String id); |
| | | VolunteerActivity queryById( String id,String userId); |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | String name, |
| | | String acState, |
| | | String acType, |
| | | String userId, |
| | | Date actityBeginTime, |
| | | Date actityEndTime); |
| | | |
| | |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | { |
| | | |
| | | @Override |
| | | public VolunteerActivity queryById(String Id) { |
| | | return baseMapper.queryById(Id); |
| | | public VolunteerActivity queryById(String Id,String userId) { |
| | | return baseMapper.queryById(Id,userId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | String name, |
| | | String acState, |
| | | String acType, |
| | | String userId, |
| | | Date actityBeginTime, |
| | | Date actityEndTime) |
| | | { |
| | | Page page = new Page<VolunteerActivity>(pageNum,pageSize); |
| | | return baseMapper.queryList(page, name, acState, acType, actityBeginTime, actityEndTime); |
| | | return baseMapper.queryList(page, name, acState, acType, userId, actityBeginTime, actityEndTime); |
| | | } |
| | | |
| | | @Override |
| | |
| | | address, |
| | | (select count(id) from volunteer_activities_people_involved where activity_id=volunteer_activity.id) as volunteer_num, |
| | | ac_state, |
| | | (if((select count(id) from volunteer_activities_people_involved |
| | | where activity_id=volunteer_activity.id and user_id=#{userId})>0,1,0)) as isSign, |
| | | award_state, |
| | | issue_time, |
| | | apply_begin_time, |
| | |
| | | address, |
| | | (select count(id) from volunteer_activities_people_involved where activity_id=volunteer_activity.id) as volunteer_num, |
| | | ac_state, |
| | | (if((select count(id) from volunteer_activities_people_involved |
| | | where activity_id=volunteer_activity.id and user_id=#{userId})>0,1,0)) as isSign, |
| | | award_state, |
| | | issue_time, |
| | | apply_begin_time, |