| | |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return volunteerActivitiesPeople.volunteerTypeGetList(pageNum,pageSize); |
| | | return volunteerActivitiesPeople.volunteerTypeGetList(pageNum,pageSize,"1"); |
| | | } |
| | | |
| | | /************************************************************************************************** |
| | |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | /** |
| | | * 状态类型 |
| | | */ |
| | | @ApiModelProperty(value = "1 志愿者活动 2 商家类型") |
| | | private String type; |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/VolunteerType/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize); |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("type") String type); |
| | | |
| | | /** |
| | | * 新增 |
| | |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return communityService.volunteerTypeGetList(pageNum,pageSize); |
| | | return communityService.volunteerTypeGetList(pageNum,pageSize,"1"); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | volunteerTypeVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | volunteerTypeVO.setType("1"); |
| | | |
| | | return communityService.insertvolunteerType(volunteerTypeVO); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家状态 |
| | | */ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/merchant/volunteerTypeGetList") |
| | | public R merchantvolunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return communityService.volunteerTypeGetList(pageNum,pageSize,"2"); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/insertvolunteerType") |
| | | public R merchantinsertvolunteerType(@RequestBody VolunteerTypeVO volunteerTypeVO) |
| | | { |
| | | if(volunteerTypeVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerTypeVO.getName())) |
| | | { |
| | | return R.fail("活动类型不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerTypeVO.getCommunityId())) |
| | | { |
| | | volunteerTypeVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | volunteerTypeVO.setType("2"); |
| | | |
| | | return communityService.insertvolunteerType(volunteerTypeVO); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("type") String type) |
| | | { |
| | | return volunteerTypeService.volunteerTypeGetList(pageNum,pageSize); |
| | | return volunteerTypeService.volunteerTypeGetList(pageNum,pageSize,type); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerType> volunteerTypeGetList(Page page); |
| | | IPage<VolunteerType> volunteerTypeGetList(Page page,@Param("type") String type); |
| | | |
| | | /** |
| | | * 新增 |
| | |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "1 志愿者活动 2 商家类型") |
| | | private String type; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | * @param |
| | | * @return |
| | | */ |
| | | R volunteerTypeGetList(int pageNum,int pageSize); |
| | | R volunteerTypeGetList(int pageNum,int pageSize,String type); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | |
| | | public class VolunteerTypeServiceImpl extends ServiceImpl<VolunteerTypeDao, |
| | | VolunteerType> implements VolunteerTypeService { |
| | | @Override |
| | | public R volunteerTypeGetList(int pageNum,int pageSize) |
| | | public R volunteerTypeGetList(int pageNum,int pageSize,String type) |
| | | { |
| | | Page page = new Page<VolunteerActivity>(pageNum,pageSize); |
| | | return R.ok(baseMapper.volunteerTypeGetList(page)); |
| | | return R.ok(baseMapper.volunteerTypeGetList(page,type)); |
| | | } |
| | | |
| | | |
| | |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | <result property="type" column="type" /> |
| | | </resultMap> |
| | | |
| | | <!-- 分页查询 --> |
| | |
| | | name, |
| | | creation_time, |
| | | community_id, |
| | | type, |
| | | update_time |
| | | from volunteer_type |
| | | where type=#{type} |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | <if test="volunteerTypeVO.type != null"> |
| | | type, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | |
| | | </if> |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | #{volunteerTypeVO.communityId}, |
| | | </if> |
| | | <if test="volunteerTypeVO.type != null"> |
| | | #{volunteerTypeVO.type}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | community_id=#{volunteerTypeVO.communityId}, |
| | | </if> |
| | | <if test="volunteerTypeVO.type != null"> |
| | | type=#{volunteerTypeVO.type}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerTypeVO.id} |