Merge branch 'haucheng_panzhihua' of http://gitlab.nhys.cdnhxx.com:9380/root/zhihuishequ into haucheng_panzhihua
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerActivitiesPeople") |
| | | public class VolunteerActivitiesPeopleApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityService volunteerActivitiesPeople; |
| | | |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetById") |
| | | public R vapGetById(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return R.ok(volunteerActivitiesPeople.vapGetById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetList") |
| | | public R vapGetList(@RequestParam("activityId") String activityId, |
| | | @RequestParam("communityId") String communityId) |
| | | { |
| | | if(StringUtils.isEmpty(activityId)) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | communityId=getLoginUserInfo().getCommunityId()+""; |
| | | } |
| | | |
| | | return R.ok(volunteerActivitiesPeople.vapGetList(activityId, communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapInsert") |
| | | public R vapInsert(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | if(volunteerActivitiesPeopleVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getActivityId())) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getVolunteerId())) |
| | | { |
| | | return R.fail("志愿者id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getCommunityId())) |
| | | { |
| | | volunteerActivitiesPeopleVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | return volunteerActivitiesPeople.vapInsert(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapUpdate") |
| | | public R vapUpdate(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | if(volunteerActivitiesPeopleVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getId())) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getActivityId())) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getVolunteerId())) |
| | | { |
| | | return R.fail("志愿者id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getCommunityId())) |
| | | { |
| | | volunteerActivitiesPeopleVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | return volunteerActivitiesPeople.vapUpdate(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/vapDelete") |
| | | public R vapDelete(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return volunteerActivitiesPeople.vapDelete(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryList") |
| | | R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "acState", required = false) String acState, |
| | | @RequestParam(value = "acType", required = false) String acType, |
| | | @RequestParam(value = "actityBeginTime", required = false) Date actityBeginTime, |
| | | @RequestParam(value = "actityEndTime", required = false) Date actityEndTime) |
| | | { |
| | | return volunteerActivitiesPeople.volunteerQueryList(pageNum, pageSize, name, acState, acType, actityBeginTime, actityEndTime); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return volunteerActivitiesPeople.volunteerTypeGetList(pageNum,pageSize); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/XmostBeautiful") |
| | | @Api(tags = {"小程序志愿者活动"}) |
| | | public class XmostBeautifulApi |
| | | { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryById") |
| | | public R queryById(@RequestParam("id") String Id) |
| | | { |
| | | if(StringUtils.isEmpty(Id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return communityService.queryById2(Id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param name |
| | | * @param unmountType |
| | | * @return |
| | | */ |
| | | @GetMapping("/getqueryList") |
| | | public R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize")int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "unmountType", required = false) String unmountType) |
| | | { |
| | | return communityService.queryList(pageNum,pageSize,name,unmountType); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("是否培训公共") |
| | | private Integer isOrgHatch; |
| | | |
| | | @ApiModelProperty("类别(1.社区动态 2.招募公告 3.考察记录 4.评审公示 5.孵化培育 6.出壳成果)") |
| | | @ApiModelProperty("类别(1.社区动态 2.招募公告 3.考察记录 4.评审公示 5.孵化培育 6.出壳成果 10.社区主题)") |
| | | private Integer category; |
| | | |
| | | @ApiModelProperty("显示时间") |
| | |
| | | private String communityName; |
| | | @ApiModelProperty("物业公司Id") |
| | | private Long propertyId; |
| | | |
| | | @ApiModelProperty("爱心积分") |
| | | private String loveIntegral; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("最美志愿者") |
| | | public class MostBeautifulVolunteerVO { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 志愿者姓名 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者姓名") |
| | | private String name; |
| | | /** |
| | | * 志愿者证件url |
| | | */ |
| | | @ApiModelProperty(value = "志愿者证件url") |
| | | private String certificateUrl; |
| | | /** |
| | | * 自我介绍 |
| | | */ |
| | | @ApiModelProperty(value = "自我介绍") |
| | | private String selfIntroduction; |
| | | /** |
| | | * 志愿者风采 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者风采") |
| | | private String volunteerStyle; |
| | | /** |
| | | * 权重排序 |
| | | */ |
| | | @ApiModelProperty(value = "权重排序") |
| | | private String weightSorting; |
| | | /** |
| | | * 上下架状态( 0 下架 1 上架 ) |
| | | */ |
| | | @ApiModelProperty(value = "上下架状态( 0 下架 1 上架 )") |
| | | private String unmountType; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("志愿者活动参与人员表") |
| | | public class VolunteerActivitiesPeopleVO |
| | | { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | /** |
| | | * 活动id |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String activityId; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者id") |
| | | private String volunteerId; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String contactPhone; |
| | | |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "奖励发放状态( 0 未发放 1已发放 )") |
| | | private String issueStatus; |
| | | |
| | | @ApiModelProperty(value = "发放积分") |
| | | private String issuePoints; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("志愿者活动") |
| | | public class VolunteerActivityVO |
| | | { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String acType; |
| | | /** |
| | | * 活动地址 |
| | | */ |
| | | @ApiModelProperty(value = "活动地址") |
| | | private String address; |
| | | /** |
| | | * 志愿者人数 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者人数") |
| | | private String volunteerNum; |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String acState; |
| | | /** |
| | | * 奖励发放状态 |
| | | */ |
| | | @ApiModelProperty(value = "奖励发放状态") |
| | | private String awardState; |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | @ApiModelProperty(value = "发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date issueTime; |
| | | /** |
| | | * 报名开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "报名开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date applyBeginTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "报名结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date applyEndTime; |
| | | /** |
| | | * 活动开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actityBeginTime; |
| | | /** |
| | | * 活动结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actityEndTime; |
| | | /** |
| | | * 志愿者上限(0无限 大于0 就是限制) |
| | | */ |
| | | @ApiModelProperty(value = "志愿者上限(0无限 大于0 就是限制)") |
| | | private String volunteerLimit; |
| | | /** |
| | | * 奖励积分 |
| | | */ |
| | | @ApiModelProperty(value = "奖励积分") |
| | | private String bonusPoints; |
| | | /** |
| | | * 是否可以报名后取消(0 不可以 1可以) |
| | | */ |
| | | @ApiModelProperty(value = "是否可以报名后取消(0 不可以 1可以)") |
| | | private String isCancelled; |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String contactPhone; |
| | | /** |
| | | * 活动封面 |
| | | */ |
| | | @ApiModelProperty(value = "活动封面") |
| | | private String activitCoverUrl; |
| | | /** |
| | | * 活动内容 |
| | | */ |
| | | @ApiModelProperty(value = "活动内容") |
| | | private String activityContent; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("志愿者活动类型表") |
| | | public class VolunteerTypeVO { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String name; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | } |
| | |
| | | package com.panzhihua.common.service.community; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidCheckRecordVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | |
| | | import com.panzhihua.common.model.vos.DictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.common.model.vos.community.ComActColumnVO; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActFourMemberVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthElderlyDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngBuildingExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationCorrectExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationCultExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDisabilityExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDrugExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationElderExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationKeyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationLowSecurityExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMajorExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationPensionExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationRehabilitationExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationSentenceExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVeteransExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealAssetsExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealAssetsVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseUndercarriageVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.model.vos.community.ComStreetVO; |
| | | import com.panzhihua.common.model.vos.community.ComSwRotaExcelVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthElderlyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticAgeGender; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | |
| | | /** |
| | | * 通过洗车订单查询银联订单 |
| | | * |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @GetMapping("/unionpay/detail") |
| | |
| | | /** |
| | | * 通过银联订单查询洗车订单 |
| | | * |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @GetMapping("/unionpay/unionpayDetail") |
| | |
| | | @RequestParam("money") String money); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /********************************************************************************************************* |
| | | * |
| | | * |
| | | * 最美志愿者 |
| | | * |
| | | * |
| | | * *********************************************************************************************************/ |
| | | @GetMapping("/MostBeautifu/queryById") |
| | | public R queryById2(@RequestParam("id") String Id); |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param name |
| | | * @param unmountType |
| | | * @return |
| | | */ |
| | | @GetMapping("/MostBeautifu/getqueryList") |
| | | public R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize")int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "unmountType", required = false) String unmountType); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/MostBeautifu/addMostBeautiful") |
| | | public R insertMostBeautifulVolunteer(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/MostBeautifu/upMostBeautiful") |
| | | public R updateById(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/MostBeautifu/delectVuId") |
| | | public R deleteById(@RequestParam("id") String Id); |
| | | |
| | | |
| | | /******************************************************************************************************************** |
| | | * |
| | | * |
| | | * 志愿者活动 |
| | | * |
| | | * |
| | | *******************************************************************************************************************/ |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("Volunteer/queryById") |
| | | R volunteerQueryById(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("Volunteer/queryList") |
| | | R volunteerQueryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "acState", required = false) String acState, |
| | | @RequestParam(value = "acType", required = false) String acType, |
| | | @RequestParam(value = "actityBeginTime", required = false) Date actityBeginTime, |
| | | @RequestParam(value = "actityEndTime", required = false) Date actityEndTime); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("Volunteer/insertVolunteer") |
| | | R insertVolunteer(@RequestBody VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | @PostMapping("Volunteer/updateById") |
| | | R volunteerUpdateById(@RequestBody VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | @DeleteMapping("Volunteer/deleteById") |
| | | R volunteerDeleteById(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 定时刷新活动状态 |
| | | * @return |
| | | */ |
| | | @GetMapping("/Volunteer/timedTaskVolunteerActivitiesJobHandler") |
| | | public R timedTaskVolunteerActivitiesJobHandler(); |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * |
| | | * 志愿者活动类型 |
| | | * |
| | | * |
| | | *******************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerType/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerType/insertvolunteerType") |
| | | public R insertvolunteerType(@RequestBody VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param volunteerTypeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerType/volunteerTypeUpdate") |
| | | public R volunteerTypeUpdate(@RequestBody VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/VolunteerType/volunteerTypeDelete") |
| | | public R volunteerTypeDelete(@RequestParam("id") String id); |
| | | |
| | | /***************************************************************************************************************** |
| | | * |
| | | * |
| | | * 志愿者参加活动 |
| | | * |
| | | * |
| | | ****************************************************************************************************************/ |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerActivitiesPeople/vapGetById") |
| | | public R vapGetById(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerActivitiesPeople/vapGetList") |
| | | public R vapGetList(@RequestParam("activityId") String activityId, |
| | | @RequestParam("communityId") String communityId); |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerActivitiesPeople/vapInsert") |
| | | public R vapInsert(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerActivitiesPeople/vapUpdate") |
| | | public R vapUpdate(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/VolunteerActivitiesPeople/vapDelete") |
| | | public R vapDelete(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"最美志愿者API"}) |
| | | @RestController |
| | | @RequestMapping("/mostBeautifulVolunteer") |
| | | public class MostBeautifulApi |
| | | { |
| | | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryById") |
| | | public R queryById(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return communityService.queryById2(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param name |
| | | * @param unmountType |
| | | * @return |
| | | */ |
| | | @GetMapping("/getqueryList") |
| | | public R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize")int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "unmountType", required = false) String unmountType) |
| | | { |
| | | return communityService.queryList(pageNum,pageSize,name,unmountType); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/addMostBeautiful") |
| | | public R insertMostBeautifulVolunteer(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO) |
| | | { |
| | | |
| | | if(mostBeautifulVolunteerVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(mostBeautifulVolunteerVO.getCommunityId())) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | |
| | | return communityService.insertMostBeautifulVolunteer(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/upMostBeautiful") |
| | | public R updateById(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO) |
| | | { |
| | | if(mostBeautifulVolunteerVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(mostBeautifulVolunteerVO.getId())) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(mostBeautifulVolunteerVO.getCommunityId())) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | |
| | | return communityService.updateById(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delectVuId") |
| | | public R deleteById(@RequestParam("id") String Id) |
| | | { |
| | | return communityService.deleteById(Id); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerActivitiesPeople") |
| | | public class VolunteerActivitiesPeopleApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityService volunteerActivitiesPeople; |
| | | |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetById") |
| | | public R vapGetById(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return R.ok(volunteerActivitiesPeople.vapGetById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetList") |
| | | public R vapGetList(@RequestParam("activityId") String activityId, |
| | | @RequestParam("communityId") String communityId) |
| | | { |
| | | if(StringUtils.isEmpty(activityId)) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | communityId=getLoginUserInfo().getCommunityId()+""; |
| | | } |
| | | |
| | | return R.ok(volunteerActivitiesPeople.vapGetList(activityId, communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapInsert") |
| | | public R vapInsert(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | if(volunteerActivitiesPeopleVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getActivityId())) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getVolunteerId())) |
| | | { |
| | | return R.fail("志愿者id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getCommunityId())) |
| | | { |
| | | volunteerActivitiesPeopleVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | return volunteerActivitiesPeople.vapInsert(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapUpdate") |
| | | public R vapUpdate(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | if(volunteerActivitiesPeopleVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getId())) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getActivityId())) |
| | | { |
| | | return R.fail("活动id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getVolunteerId())) |
| | | { |
| | | return R.fail("志愿者id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerActivitiesPeopleVO.getCommunityId())) |
| | | { |
| | | volunteerActivitiesPeopleVO.setCommunityId(getLoginUserInfo().getCommunityId()+""); |
| | | } |
| | | |
| | | return volunteerActivitiesPeople.vapUpdate(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/vapDelete") |
| | | public R vapDelete(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return volunteerActivitiesPeople.vapDelete(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 志愿者活动 |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/Volunteer") |
| | | public class VolunteerActivityApi |
| | | { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryById") |
| | | public R queryById(@RequestParam("id") String id) |
| | | { |
| | | return communityService.volunteerQueryById(id); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryList") |
| | | R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "acState", required = false) String acState, |
| | | @RequestParam(value = "acType", required = false) String acType, |
| | | @RequestParam(value = "actityBeginTime", required = false) Date actityBeginTime, |
| | | @RequestParam(value = "actityEndTime", required = false) Date actityEndTime) |
| | | { |
| | | return communityService.volunteerQueryList(pageNum, pageSize, name, acState, acType, actityBeginTime, actityEndTime); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/insertVolunteer") |
| | | R insertVolunteer(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | return communityService.insertVolunteer(volunteerActivityVO); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/updateById") |
| | | R updateById(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | return communityService.volunteerUpdateById(volunteerActivityVO); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/deleteById") |
| | | R deleteById(@RequestParam("id") String id) |
| | | { |
| | | return communityService.volunteerDeleteById(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/timedTaskVolunteerActivitiesJobHandler") |
| | | R timedTaskVolunteerActivitiesJobHandler() |
| | | { |
| | | return communityService.timedTaskVolunteerActivitiesJobHandler(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerTypeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 路北社区志愿者状态接口 |
| | | */ |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerType") |
| | | public class VolunteerTypeApi extends BaseController |
| | | { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return communityService.volunteerTypeGetList(pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/insertvolunteerType") |
| | | public R insertvolunteerType(@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()+""); |
| | | } |
| | | |
| | | return communityService.insertvolunteerType(volunteerTypeVO); |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param volunteerTypeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/volunteerTypeUpdate") |
| | | public R volunteerTypeUpdate(@RequestBody VolunteerTypeVO volunteerTypeVO) |
| | | { |
| | | if(volunteerTypeVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(volunteerTypeVO.getId())) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return communityService.volunteerTypeUpdate(volunteerTypeVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/volunteerTypeDelete") |
| | | public R volunteerTypeDelete(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return communityService.volunteerTypeDelete(id); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.MostBeautifulVolunteerService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/MostBeautifu") |
| | | public class MostBeautifulVolunteerApi |
| | | { |
| | | @Resource |
| | | private MostBeautifulVolunteerService mostBeautifulVolunteerService; |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryById") |
| | | public R queryById2(@RequestParam("id") String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return R.ok(mostBeautifulVolunteerService.queryById(id)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param name |
| | | * @param unmountType |
| | | * @return |
| | | */ |
| | | @GetMapping("/getqueryList") |
| | | public R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize")int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "unmountType", required = false) String unmountType) |
| | | { |
| | | return R.ok(mostBeautifulVolunteerService.queryList(pageNum,pageSize,name,unmountType)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/addMostBeautiful") |
| | | public R insertMostBeautifulVolunteer(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO) |
| | | { |
| | | int num= mostBeautifulVolunteerService.insertMostBeautifulVolunteer(mostBeautifulVolunteerVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/upMostBeautiful") |
| | | public R updateById(@RequestBody MostBeautifulVolunteerVO mostBeautifulVolunteerVO) |
| | | { |
| | | if(mostBeautifulVolunteerVO==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(mostBeautifulVolunteerVO.getId())) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(mostBeautifulVolunteerVO.getCommunityId())) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | |
| | | int num= mostBeautifulVolunteerService.updateById(mostBeautifulVolunteerVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delectVuId") |
| | | public R deleteById(@RequestParam("id") String Id) |
| | | { |
| | | int num= mostBeautifulVolunteerService.deleteById(Id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.service_community.service.VolunteerActivitiesPeopleService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerActivitiesPeople") |
| | | public class VolunteerActivitiesPeopleApi |
| | | { |
| | | @Resource |
| | | private VolunteerActivitiesPeopleService volunteerActivitiesPeople; |
| | | |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetById") |
| | | public R vapGetById(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(volunteerActivitiesPeople.vapGetById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/vapGetList") |
| | | public R vapGetList(@RequestParam("activityId") String activityId, |
| | | @RequestParam("communityId") String communityId) |
| | | { |
| | | return R.ok(volunteerActivitiesPeople.vapGetList(activityId, communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapInsert") |
| | | public R vapInsert(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | int num = volunteerActivitiesPeople.vapInsert(volunteerActivitiesPeopleVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/vapUpdate") |
| | | public R vapUpdate(@RequestBody VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) |
| | | { |
| | | int num = volunteerActivitiesPeople.vapUpdate(volunteerActivitiesPeopleVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/vapDelete") |
| | | public R vapDelete(@RequestParam("id") String id) |
| | | { |
| | | int num = volunteerActivitiesPeople.vapDelete(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/Volunteer") |
| | | public class VolunteerActivityApi |
| | | { |
| | | @Resource |
| | | private VolunteerActivityService volunteerActivityService; |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryById") |
| | | public R queryById(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(volunteerActivityService.queryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryList") |
| | | R queryList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "name", required = false) String name, |
| | | @RequestParam(value = "acState", required = false) String acState, |
| | | @RequestParam(value = "acType", required = false) String acType, |
| | | @RequestParam(value = "actityBeginTime", required = false) Date actityBeginTime, |
| | | @RequestParam(value = "actityEndTime", required = false) Date actityEndTime) |
| | | { |
| | | |
| | | return R.ok(volunteerActivityService.queryList(pageNum, pageSize, name, acState, acType, actityBeginTime, actityEndTime)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/insertVolunteer") |
| | | R insertVolunteer(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | int num = volunteerActivityService.insertVolunteer(volunteerActivityVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/updateById") |
| | | R updateById(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | int num = volunteerActivityService.updateById(volunteerActivityVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/deleteById") |
| | | R deleteById(@RequestParam("id") String id) |
| | | { |
| | | int num = volunteerActivityService.deleteById(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/timedTaskVolunteerActivitiesJobHandler") |
| | | R timedTaskVolunteerActivitiesJobHandler() |
| | | { |
| | | int num = volunteerActivityService.timedTaskVolunteerActivitiesJobHandler(); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerTypeVO; |
| | | import com.panzhihua.service_community.service.VolunteerTypeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerType") |
| | | public class VolunteerTypeApi |
| | | { |
| | | |
| | | @Resource |
| | | private VolunteerTypeService volunteerTypeService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/volunteerTypeGetList") |
| | | public R volunteerTypeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return volunteerTypeService.volunteerTypeGetList(pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/insertvolunteerType") |
| | | public R insertvolunteerType(@RequestBody VolunteerTypeVO volunteerTypeVO) |
| | | { |
| | | return volunteerTypeService.insertvolunteerType(volunteerTypeVO); |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param volunteerTypeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/volunteerTypeUpdate") |
| | | public R volunteerTypeUpdate(@RequestBody VolunteerTypeVO volunteerTypeVO) |
| | | { |
| | | return volunteerTypeService.volunteerTypeUpdate(volunteerTypeVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/volunteerTypeDelete") |
| | | public R volunteerTypeDelete(@RequestParam("id") String id) |
| | | { |
| | | return volunteerTypeService.volunteerTypeDelete(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO; |
| | | import com.panzhihua.service_community.entity.MostBeautifulVolunteer; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 用户表 后台用户+小程序用户(SysUser)表数据库访问层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 用户表 后台用户+小程序用户相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-06-10 15:34:17 |
| | | */ |
| | | @Mapper |
| | | public interface MostBeautifulVolunteerDao extends BaseMapper<MostBeautifulVolunteer> |
| | | { |
| | | //查询单个详情 |
| | | MostBeautifulVolunteer queryById(@Param("id") String id); |
| | | |
| | | |
| | | //获取列表 |
| | | IPage<MostBeautifulVolunteer> queryList(Page page, |
| | | @Param("name") String name, |
| | | @Param("unmountType") String unmountType); |
| | | |
| | | |
| | | int insertMostBeautifulVolunteer(@Param("mostBeautifulVolunteerVO") MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | int updateById(@Param("mostBeautifulVolunteerVO") MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | int deleteById(@Param("Id") String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivitiesPeople; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface VolunteerActivitiesPeopleDao extends BaseMapper<VolunteerActivitiesPeople> |
| | | { |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivitiesPeople vapGetById(@Param("id") String id); |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<VolunteerActivitiesPeople> vapGetList(@Param("activityId") String activityId, |
| | | @Param("communityId") String communityId); |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | int vapInsert(@Param("volunteerActivitiesPeopleVO") VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | int vapUpdate(@Param("volunteerActivitiesPeopleVO") VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int vapDelete(@Param("id") String id); |
| | | |
| | | |
| | | /*********************************************************************************** |
| | | * |
| | | * |
| | | * 定时任务内容 |
| | | * |
| | | */ |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface VolunteerActivityDao extends BaseMapper<VolunteerActivity> |
| | | { |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivity queryById(@Param("id") String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerActivity> queryList(Page page, |
| | | @Param("name") String name, |
| | | @Param("acState") String acState, |
| | | @Param("acType") String acType, |
| | | @Param("actityBeginTime") Date actityBeginTime, |
| | | @Param("actityEndTime") Date actityEndTime); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int insertVolunteer(@Param("volunteerActivityVO") VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | int updateById(@Param("volunteerActivityVO") VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | int deleteById(@Param("id") String id); |
| | | |
| | | List<VolunteerActivity> timedTaskList(); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerTypeVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.entity.VolunteerType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface VolunteerTypeDao extends BaseMapper<VolunteerType> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerType> volunteerTypeGetList(Page page); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int insertvolunteerType(@Param("volunteerTypeVO") VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | |
| | | int volunteerTypeUpdate(@Param("volunteerTypeVO") VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | |
| | | int volunteerTypeDelete(@Param("id") String id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("最美志愿者") |
| | | public class MostBeautifulVolunteer implements Serializable |
| | | { |
| | | |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 志愿者姓名 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者姓名") |
| | | private String name; |
| | | /** |
| | | * 志愿者证件url |
| | | */ |
| | | @ApiModelProperty(value = "志愿者证件url") |
| | | private String certificateUrl; |
| | | /** |
| | | * 自我介绍 |
| | | */ |
| | | @ApiModelProperty(value = "自我介绍") |
| | | private String selfIntroduction; |
| | | /** |
| | | * 志愿者风采 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者风采") |
| | | private String volunteerStyle; |
| | | /** |
| | | * 权重排序 |
| | | */ |
| | | @ApiModelProperty(value = "权重排序") |
| | | private String weightSorting; |
| | | /** |
| | | * 上下架状态( 0 下架 1 上架 ) |
| | | */ |
| | | @ApiModelProperty(value = "上下架状态( 0 下架 1 上架 )") |
| | | private String unmountType; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date creationTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("志愿者活动参与人员表") |
| | | public class VolunteerActivitiesPeople implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | /** |
| | | * 活动id |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String activityId; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者id") |
| | | private String volunteerId; |
| | | |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String contactPhone; |
| | | |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "奖励发放状态( 0 未发放 1已发放 )") |
| | | private String issueStatus; |
| | | |
| | | @ApiModelProperty(value = "发放积分") |
| | | private String issuePoints; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("路北社区志愿者活动表") |
| | | public class VolunteerActivity implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String acType; |
| | | /** |
| | | * 活动地址 |
| | | */ |
| | | @ApiModelProperty(value = "活动地址") |
| | | private String address; |
| | | /** |
| | | * 志愿者人数 |
| | | */ |
| | | @ApiModelProperty(value = "志愿者人数") |
| | | private String volunteerNum; |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String acState; |
| | | /** |
| | | * 奖励发放状态 |
| | | */ |
| | | @ApiModelProperty(value = "奖励发放状态") |
| | | private String awardState; |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | @ApiModelProperty(value = "发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date issueTime; |
| | | /** |
| | | * 报名开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "报名开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date applyBeginTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "报名结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date applyEndTime; |
| | | /** |
| | | * 活动开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actityBeginTime; |
| | | /** |
| | | * 活动结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actityEndTime; |
| | | /** |
| | | * 志愿者上限(0无限 大于0 就是限制) |
| | | */ |
| | | @ApiModelProperty(value = "志愿者上限(0无限 大于0 就是限制)") |
| | | private String volunteerLimit; |
| | | /** |
| | | * 奖励积分 |
| | | */ |
| | | @ApiModelProperty(value = "奖励积分") |
| | | private String bonusPoints; |
| | | /** |
| | | * 是否可以报名后取消(0 不可以 1可以) |
| | | */ |
| | | @ApiModelProperty(value = "是否可以报名后取消(0 不可以 1可以)") |
| | | private String isCancelled; |
| | | /** |
| | | * 联系人姓名 |
| | | */ |
| | | @ApiModelProperty(value = "联系人姓名") |
| | | private String contactName; |
| | | /** |
| | | * 联系人电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系人电话") |
| | | private String contactPhone; |
| | | /** |
| | | * 活动封面 |
| | | */ |
| | | @ApiModelProperty(value = "活动封面") |
| | | private String activitCoverUrl; |
| | | /** |
| | | * 活动内容 |
| | | */ |
| | | @ApiModelProperty(value = "活动内容") |
| | | private String activityContent; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("路北社区志愿者活动类型表") |
| | | public class VolunteerType implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String name; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date creationTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String communityId; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | * 所属物业公司id |
| | | * */ |
| | | private Long propertyId; |
| | | |
| | | /** |
| | | * 爱心积分 |
| | | */ |
| | | private String loveIntegral; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO; |
| | | import com.panzhihua.service_community.entity.MostBeautifulVolunteer; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface MostBeautifulVolunteerService extends IService<MostBeautifulVolunteer> |
| | | { |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | MostBeautifulVolunteer queryById(String Id); |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param name |
| | | * @param unmountType |
| | | * @return |
| | | */ |
| | | IPage<MostBeautifulVolunteer> queryList(int pageNum, |
| | | int pageSize, |
| | | String name, |
| | | String unmountType); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | int insertMostBeautifulVolunteer(MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param mostBeautifulVolunteerVO |
| | | * @return |
| | | */ |
| | | int updateById(MostBeautifulVolunteerVO mostBeautifulVolunteerVO); |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param Id |
| | | * @return |
| | | */ |
| | | int deleteById(String Id); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivitiesPeople; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface VolunteerActivitiesPeopleService |
| | | { |
| | | /** |
| | | * 志愿者单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivitiesPeople vapGetById(String id); |
| | | |
| | | /** |
| | | * 参与人员列表 |
| | | * @param activityId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<VolunteerActivitiesPeople> vapGetList(String activityId, |
| | | String communityId); |
| | | |
| | | /** |
| | | * 添加参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | int vapInsert(VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 修改参与人员 |
| | | * @param volunteerActivitiesPeopleVO |
| | | * @return |
| | | */ |
| | | int vapUpdate(VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO); |
| | | |
| | | /** |
| | | * 删除参与人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int vapDelete(String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public interface VolunteerActivityService extends IService<VolunteerActivity> |
| | | { |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerActivity queryById( String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerActivity> queryList(int pageNum,int pageSize, |
| | | String name, |
| | | String acState, |
| | | String acType, |
| | | Date actityBeginTime, |
| | | Date actityEndTime); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int insertVolunteer(VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | int updateById(VolunteerActivityVO volunteerActivityVO); |
| | | |
| | | |
| | | int deleteById(String id); |
| | | |
| | | |
| | | int timedTaskVolunteerActivitiesJobHandler(); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerTypeVO; |
| | | import com.panzhihua.service_community.entity.VolunteerType; |
| | | |
| | | public interface VolunteerTypeService extends IService<VolunteerType> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R volunteerTypeGetList(int pageNum,int pageSize); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R insertvolunteerType(VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | R volunteerTypeUpdate(VolunteerTypeVO volunteerTypeVO); |
| | | |
| | | R volunteerTypeDelete(String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO; |
| | | import com.panzhihua.service_community.dao.MostBeautifulVolunteerDao; |
| | | import com.panzhihua.service_community.entity.MostBeautifulVolunteer; |
| | | import com.panzhihua.service_community.service.MostBeautifulVolunteerService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class MostBeautifulVolunteerServiceImpl extends ServiceImpl<MostBeautifulVolunteerDao, |
| | | MostBeautifulVolunteer> implements MostBeautifulVolunteerService |
| | | { |
| | | |
| | | @Override |
| | | public MostBeautifulVolunteer queryById(String Id) { |
| | | return baseMapper.queryById(Id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MostBeautifulVolunteer> queryList(int pageNum,int pageSize, String name, String unmountType) |
| | | { |
| | | Page page = new Page<MostBeautifulVolunteer>(pageNum,pageSize); |
| | | return baseMapper.queryList(page, name,unmountType); |
| | | } |
| | | |
| | | @Override |
| | | public int insertMostBeautifulVolunteer(MostBeautifulVolunteerVO mostBeautifulVolunteerVO) { |
| | | return baseMapper.insertMostBeautifulVolunteer(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | @Override |
| | | public int updateById(MostBeautifulVolunteerVO mostBeautifulVolunteerVO) { |
| | | return baseMapper.updateById(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteById(String Id) { |
| | | return baseMapper.deleteById(Id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivitiesPeopleVO; |
| | | import com.panzhihua.service_community.dao.VolunteerActivitiesPeopleDao; |
| | | import com.panzhihua.service_community.entity.VolunteerActivitiesPeople; |
| | | import com.panzhihua.service_community.service.VolunteerActivitiesPeopleService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerActivitiesPeopleServiceImpl extends ServiceImpl<VolunteerActivitiesPeopleDao, |
| | | VolunteerActivitiesPeople> implements VolunteerActivitiesPeopleService |
| | | { |
| | | |
| | | @Override |
| | | public VolunteerActivitiesPeople vapGetById(String id) |
| | | { |
| | | return baseMapper.vapGetById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<VolunteerActivitiesPeople> vapGetList(String activityId, String communityId) { |
| | | return baseMapper.vapGetList(activityId,communityId); |
| | | } |
| | | |
| | | @Override |
| | | public int vapInsert(VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) { |
| | | return baseMapper.vapInsert(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | @Override |
| | | public int vapUpdate(VolunteerActivitiesPeopleVO volunteerActivitiesPeopleVO) { |
| | | return baseMapper.vapUpdate(volunteerActivitiesPeopleVO); |
| | | } |
| | | |
| | | @Override |
| | | public int vapDelete(String id) { |
| | | return baseMapper.vapDelete(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.VolunteerActivityDao; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerActivityServiceImpl extends ServiceImpl<VolunteerActivityDao, |
| | | VolunteerActivity> implements VolunteerActivityService |
| | | { |
| | | |
| | | @Override |
| | | public VolunteerActivity queryById(String Id) { |
| | | return baseMapper.queryById(Id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<VolunteerActivity> queryList(int pageNum,int pageSize, |
| | | String name, |
| | | String acState, |
| | | String acType, |
| | | Date actityBeginTime, |
| | | Date actityEndTime) |
| | | { |
| | | Page page = new Page<VolunteerActivity>(pageNum,pageSize); |
| | | return baseMapper.queryList(page, name, acState, acType, actityBeginTime, actityEndTime); |
| | | } |
| | | |
| | | @Override |
| | | public int insertVolunteer(VolunteerActivityVO mostBeautifulVolunteerVO) { |
| | | return baseMapper.insertVolunteer(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | @Override |
| | | public int updateById(VolunteerActivityVO mostBeautifulVolunteerVO) { |
| | | return baseMapper.updateById(mostBeautifulVolunteerVO); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteById(String Id) { |
| | | return baseMapper.deleteById(Id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时任务 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int timedTaskVolunteerActivitiesJobHandler() |
| | | { |
| | | List<VolunteerActivity> list = baseMapper.timedTaskList(); |
| | | Long newTiem=System.currentTimeMillis(); |
| | | if(list.size()>0) |
| | | { |
| | | for (VolunteerActivity itemDate:list) |
| | | { |
| | | String state = itemDate.getAcState(); |
| | | //2未开始 3报名中", 4进行中" |
| | | //活动报名开始时间 |
| | | Long applyBegintime = itemDate.getApplyBeginTime().getTime(); |
| | | //活动报名结束时间 |
| | | Long applyEndtime = itemDate.getApplyEndTime().getTime(); |
| | | |
| | | //活动开始时间 |
| | | Long actityBegintime = itemDate.getActityBeginTime().getTime(); |
| | | //活动结束时间 |
| | | Long actityEndtime = itemDate.getActityEndTime().getTime(); |
| | | |
| | | //判断是否在报名中 |
| | | if (newTiem >= applyBegintime && newTiem < applyEndtime) |
| | | { |
| | | state = "3"; |
| | | } |
| | | else if (newTiem>applyEndtime) |
| | | { |
| | | //报名如果截止 报名人数为0 结束活动 |
| | | Integer num=0; |
| | | if(!StringUtils.isEmpty(itemDate.getVolunteerNum())) |
| | | { |
| | | num=Integer.valueOf(itemDate.getVolunteerNum()); |
| | | } |
| | | if(num<=0) |
| | | { |
| | | state = "6"; |
| | | } |
| | | } |
| | | else if (newTiem >= actityBegintime && newTiem <= actityEndtime) |
| | | { |
| | | //判断是否活动进行中 |
| | | state = "4"; |
| | | } |
| | | else if(newTiem>actityEndtime) |
| | | { |
| | | //活动结束 |
| | | state = "5"; |
| | | } |
| | | |
| | | if(!StringUtils.equals(state,itemDate.getAcState())) |
| | | { |
| | | itemDate.setAcState(state); |
| | | |
| | | VolunteerActivityVO comActDynVO = new VolunteerActivityVO(); |
| | | comActDynVO.setId(itemDate.getId()); |
| | | BeanUtils.copyProperties(itemDate, comActDynVO); |
| | | baseMapper.updateById(comActDynVO); |
| | | } |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerTypeVO; |
| | | import com.panzhihua.service_community.dao.VolunteerTypeDao; |
| | | import com.panzhihua.service_community.entity.VolunteerActivity; |
| | | import com.panzhihua.service_community.entity.VolunteerType; |
| | | import com.panzhihua.service_community.service.VolunteerTypeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerTypeServiceImpl extends ServiceImpl<VolunteerTypeDao, |
| | | VolunteerType> implements VolunteerTypeService { |
| | | @Override |
| | | public R volunteerTypeGetList(int pageNum,int pageSize) |
| | | { |
| | | Page page = new Page<VolunteerActivity>(pageNum,pageSize); |
| | | return R.ok(baseMapper.volunteerTypeGetList(page)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R insertvolunteerType(VolunteerTypeVO volunteerTypeVO) |
| | | { |
| | | int num= baseMapper.insertvolunteerType(volunteerTypeVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R volunteerTypeUpdate(VolunteerTypeVO volunteerTypeVO) { |
| | | int num= baseMapper.volunteerTypeUpdate(volunteerTypeVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R volunteerTypeDelete(String id) { |
| | | int num= baseMapper.volunteerTypeDelete(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | } |
| | |
| | | <result column="org_id" property="orgId" /> |
| | | <result column="team_id" property="teamId" /> |
| | | <result column="skill_id" property="skillId" /> |
| | | <result column="love_integral" property="loveIntegral" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_at, state, name, phone, photo_path, political_face, reject_reson, apply_reson, address, age, job, integral, community_id, submit_user_id, id_card, org_id, team_id, skill_id |
| | | id, create_at, state, name, phone, photo_path, political_face, reject_reson, apply_reson, address, age, |
| | | job, integral, community_id, submit_user_id, id_card, org_id, team_id, skill_id,love_integral |
| | | </sql> |
| | | |
| | | <select id="pageVolunteer" resultType="com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO"> |
| | |
| | | cmvst.`name` as serviceTypeName, |
| | | cmvs.`name` as skillName, |
| | | cmvm.create_at, |
| | | cmvm.love_integral, |
| | | t.name as communityName |
| | | FROM |
| | | com_mng_volunteer_mng as cmvm |
New file |
| | |
| | | <?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.MostBeautifulVolunteer" id="MostBeautifulVolunteerMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="certificateUrl" column="certificate_url"/> |
| | | <result property="selfIntroduction" column="self_introduction"/> |
| | | <result property="volunteerStyle" column="volunteer_style"/> |
| | | <result property="weightSorting" column="weight_sorting"/> |
| | | <result property="unmountType" column="unmount_type"/> |
| | | <result property="creationTime" column="creation_time"/> |
| | | <result property="communityId" column="community_id"/> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultMap="MostBeautifulVolunteerMap"> |
| | | select |
| | | id, |
| | | name, |
| | | certificate_url, |
| | | self_introduction, |
| | | volunteer_style, |
| | | weight_sorting, |
| | | unmount_type, |
| | | creation_time, |
| | | community_id |
| | | from most_beautiful_volunteer |
| | | 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` like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="unmountType!=null "> |
| | | and unmount_type =# {unmountType} |
| | | </if> |
| | | |
| | | </where> |
| | | order by weight_sorting asc,creation_time desc |
| | | </select> |
| | | |
| | | <insert id="insertMostBeautifulVolunteer" parameterType="com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO"> |
| | | 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> |
| | | creation_time |
| | | </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> |
| | | |
| | | <update id="updateById" parameterType="com.panzhihua.common.model.vos.community.MostBeautifulVolunteerVO"> |
| | | update most_beautiful_volunteer |
| | | <set> |
| | | <if test="mostBeautifulVolunteerVO.id != null"> |
| | | id=#{mostBeautifulVolunteerVO.id}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.name != null"> |
| | | name=#{mostBeautifulVolunteerVO.name}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.certificateUrl != null"> |
| | | certificate_url=#{mostBeautifulVolunteerVO.certificateUrl}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.selfIntroduction != null"> |
| | | self_introduction=#{mostBeautifulVolunteerVO.selfIntroduction}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.volunteerStyle != null"> |
| | | volunteer_style=#{mostBeautifulVolunteerVO.volunteerStyle}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.weightSorting != null"> |
| | | weight_sorting=#{mostBeautifulVolunteerVO.weightSorting}, |
| | | </if> |
| | | <if test="mostBeautifulVolunteerVO.unmountType != null"> |
| | | unmount_type=#{mostBeautifulVolunteerVO.unmountType}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{mostBeautifulVolunteerVO.id} |
| | | |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteById" parameterType="String"> |
| | | delete from most_beautiful_volunteer where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.VolunteerActivitiesPeopleDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerActivitiesPeople" id="VolunteerActivitiesPeopleMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="volunteerId" column="volunteer_id" /> |
| | | <result property="issueStatus" column="issue_status" /> |
| | | <result property="issuePoints" column="issue_points" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | <result property="activityId" column="activity_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="vapGetById" resultMap="VolunteerActivitiesPeopleMap"> |
| | | select |
| | | id, |
| | | community_id, |
| | | volunteer_id, |
| | | issue_status, |
| | | issue_points, |
| | | (select cmvm.name from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactName, |
| | | (select cmvm.phone from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactPhone, |
| | | creation_time, |
| | | activity_id, |
| | | update_time |
| | | from volunteer_activities_people_involved |
| | | where id= #{id} |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="vapGetList" resultMap="VolunteerActivitiesPeopleMap"> |
| | | select |
| | | id, |
| | | community_id, |
| | | volunteer_id, |
| | | issue_status, |
| | | issue_points, |
| | | (select cmvm.name from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactName, |
| | | (select cmvm.phone from com_mng_volunteer_mng cmvm where cmvm.id=volunteer_id) as contactPhone, |
| | | creation_time, |
| | | activity_id, |
| | | update_time |
| | | from volunteer_activities_people_involved |
| | | <where> |
| | | 1=1 |
| | | <if test="communityId != null and communityId!='' "> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | |
| | | <if test="activityId != null and activityId != '' "> |
| | | and activity_id=#{activityId} |
| | | </if> |
| | | </where> |
| | | order by issue_status desc |
| | | </select> |
| | | |
| | | <insert id="vapInsert"> |
| | | insert into volunteer_activities_people_involved |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerActivitiesPeopleVO.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.volunteerId != null"> |
| | | volunteer_id, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.issueStatus != null"> |
| | | issue_status, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.issuePoints != null"> |
| | | issue_points, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | activity_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerActivitiesPeopleVO.id != null"> |
| | | #{volunteerActivitiesPeopleVO.id}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.volunteerId != null"> |
| | | #{volunteerActivitiesPeopleVO.volunteerId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.communityId != null"> |
| | | #{volunteerActivitiesPeopleVO.communityId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.issueStatus != null"> |
| | | #{volunteerActivitiesPeopleVO.issueStatus}, |
| | | </if> |
| | | <if test="vvolunteerActivitiesPeopleVO.issuePoints != null"> |
| | | #{volunteerActivitiesPeopleVO.issuePoints}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | #{volunteerActivitiesPeopleVO.activityId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="vapUpdate"> |
| | | update volunteer_activities_people_involved |
| | | <set> |
| | | <if test="volunteerActivitiesPeopleVO.id != null"> |
| | | id=#{volunteerActivitiesPeopleVO.id}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.volunteerId != null"> |
| | | volunteer_id=#{volunteerActivitiesPeopleVO.volunteerId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.communityId != null"> |
| | | community_id=#{volunteerActivitiesPeopleVO.communityId}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.issueStatus != null"> |
| | | issue_status=#{volunteerActivitiesPeopleVO.issueStatus}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.issuePoints != null"> |
| | | issue_points=#{volunteerActivitiesPeopleVO.issuePoints}, |
| | | </if> |
| | | <if test="volunteerActivitiesPeopleVO.activityId != null"> |
| | | activity_id=#{volunteerActivitiesPeopleVO.activityId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerActivitiesPeopleVO.id} |
| | | </update> |
| | | |
| | | <delete id="vapDelete" parameterType="String"> |
| | | delete from volunteer_activities_people_involved where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.VolunteerActivityDao"> |
| | | |
| | | <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" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="lat" column="lat" /> |
| | | <result property="lng" column="lng" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <!--查询单个--> |
| | | <select id="queryById" resultMap="VolunteerActivityMap"> |
| | | select |
| | | id, |
| | | name, |
| | | ac_type, |
| | | address, |
| | | (select count(id) from volunteer_activities_people_involved where activity_id=id) volunteerNum, |
| | | 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, |
| | | update_time, |
| | | lng, |
| | | lat |
| | | from volunteer_activity |
| | | where id= #{id} |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="queryList" resultMap="VolunteerActivityMap"> |
| | | 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, |
| | | update_time, |
| | | lng, |
| | | lat |
| | | from volunteer_activity |
| | | <where> |
| | | 1=1 |
| | | <if test="name!=null"> |
| | | and (`name` like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="acState!=null"> |
| | | and ac_state =#{acState} |
| | | </if> |
| | | <if test="acType!=null"> |
| | | and ac_type =#{acType} |
| | | </if> |
| | | <if test="actityBeginTime!=null"> |
| | | and actity_begin_time >= #{actityBeginTime} |
| | | </if> |
| | | <if test="actityEndTime!=null"> |
| | | and actity_end_time <![CDATA[ <= ]]> #{actityEndTime} |
| | | </if> |
| | | |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | <insert id="insertVolunteer"> |
| | | insert into volunteer_activity |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerActivityVO.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="volunteerActivityVO.name != null"> |
| | | name, |
| | | </if> |
| | | <if test="volunteerActivityVO.acType != null"> |
| | | ac_type, |
| | | </if> |
| | | <if test="volunteerActivityVO.address != null"> |
| | | address, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerNum != null"> |
| | | volunteer_num, |
| | | </if> |
| | | <if test="volunteerActivityVO.acState != null"> |
| | | ac_state, |
| | | </if> |
| | | <if test="volunteerActivityVO.awardState != null"> |
| | | award_state, |
| | | </if> |
| | | <if test="volunteerActivityVO.issueTime != null"> |
| | | issue_time, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyBeginTime != null"> |
| | | apply_begin_time, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyEndTime != null"> |
| | | apply_end_time, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityBeginTime != null"> |
| | | actity_begin_time, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityEndTime != null"> |
| | | actity_end_time, |
| | | </if> |
| | | <if test="volunteerActivityVO.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerLimit != null"> |
| | | volunteer_limit, |
| | | </if> |
| | | <if test="volunteerActivityVO.bonusPoints != null"> |
| | | bonus_points, |
| | | </if> |
| | | <if test="volunteerActivityVO.isCancelled != null"> |
| | | is_cancelled, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactName != null"> |
| | | contact_name, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactPhone != null"> |
| | | contact_phone, |
| | | </if> |
| | | <if test="volunteerActivityVO.activitCoverUrl != null"> |
| | | activity_cover_url, |
| | | </if> |
| | | <if test="volunteerActivityVO.activityContent != null"> |
| | | activity_content, |
| | | </if> |
| | | <if test="volunteerActivityVO.lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="volunteerActivityVO.lat != null"> |
| | | lat, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerActivityVO.id != null"> |
| | | #{volunteerActivityVO.id}, |
| | | </if> |
| | | <if test="volunteerActivityVO.name != null"> |
| | | #{volunteerActivityVO.name}, |
| | | </if> |
| | | <if test="volunteerActivityVO.acType != null"> |
| | | #{volunteerActivityVO.acType}, |
| | | </if> |
| | | <if test="volunteerActivityVO.address != null"> |
| | | #{volunteerActivityVO.address}, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerNum != null"> |
| | | #{volunteerActivityVO.volunteerNum}, |
| | | </if> |
| | | <if test="volunteerActivityVO.acState != null"> |
| | | #{volunteerActivityVO.acState}, |
| | | </if> |
| | | <if test="volunteerActivityVO.awardState != null"> |
| | | #{volunteerActivityVO.awardState}, |
| | | </if> |
| | | <if test="volunteerActivityVO.issueTime != null"> |
| | | #{volunteerActivityVO.issueTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyBeginTime != null"> |
| | | #{volunteerActivityVO.applyBeginTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyEndTime != null"> |
| | | #{volunteerActivityVO.applyEndTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityBeginTime != null"> |
| | | #{volunteerActivityVO.actityBeginTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityEndTime != null"> |
| | | #{volunteerActivityVO.actityEndTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.communityId != null"> |
| | | #{volunteerActivityVO.communityId}, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerLimit != null"> |
| | | #{volunteerActivityVO.volunteerLimit}, |
| | | </if> |
| | | <if test="volunteerActivityVO.bonusPoints != null"> |
| | | #{volunteerActivityVO.bonusPoints}, |
| | | </if> |
| | | <if test="volunteerActivityVO.isCancelled != null"> |
| | | #{volunteerActivityVO.isCancelled}, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactName != null"> |
| | | #{volunteerActivityVO.contactName}, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactPhone != null"> |
| | | #{volunteerActivityVO.contactPhone}, |
| | | </if> |
| | | <if test="volunteerActivityVO.activitCoverUrl != null"> |
| | | #{volunteerActivityVO.activitCoverUrl}, |
| | | </if> |
| | | <if test="volunteerActivityVO.activityContent != null"> |
| | | #{volunteerActivityVO.activityContent}, |
| | | </if> |
| | | <if test="volunteerActivityVO.lng != null"> |
| | | #{volunteerActivityVO.lng}, |
| | | </if> |
| | | <if test="volunteerActivityVO.lat != null"> |
| | | #{volunteerActivityVO.lat}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateById"> |
| | | update volunteer_activity |
| | | <set> |
| | | <if test="volunteerActivityVO.id != null"> |
| | | id=#{volunteerActivityVO.id}, |
| | | </if> |
| | | <if test="volunteerActivityVO.name != null"> |
| | | name=#{volunteerActivityVO.name}, |
| | | </if> |
| | | <if test="volunteerActivityVO.acType != null"> |
| | | ac_type=#{volunteerActivityVO.acType}, |
| | | </if> |
| | | <if test="volunteerActivityVO.address != null"> |
| | | address=#{volunteerActivityVO.address}, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerNum != null"> |
| | | volunteer_num=#{volunteerActivityVO.volunteerNum}, |
| | | </if> |
| | | <if test="volunteerActivityVO.acState != null"> |
| | | ac_state=#{volunteerActivityVO.acState}, |
| | | </if> |
| | | <if test="volunteerActivityVO.awardState != null"> |
| | | award_state=#{volunteerActivityVO.awardState}, |
| | | </if> |
| | | <if test="volunteerActivityVO.issueTime != null"> |
| | | issue_time=#{volunteerActivityVO.issueTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyBeginTime != null"> |
| | | apply_begin_time=#{volunteerActivityVO.applyBeginTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.applyEndTime != null"> |
| | | apply_end_time=#{volunteerActivityVO.applyEndTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityBeginTime != null"> |
| | | actity_begin_time=#{volunteerActivityVO.actityBeginTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.actityEndTime != null"> |
| | | actity_end_time=#{volunteerActivityVO.actityEndTime}, |
| | | </if> |
| | | <if test="volunteerActivityVO.communityId != null"> |
| | | community_id=#{volunteerActivityVO.communityId}, |
| | | </if> |
| | | <if test="volunteerActivityVO.volunteerLimit != null"> |
| | | volunteer_limit=#{volunteerActivityVO.volunteerLimit}, |
| | | </if> |
| | | <if test="volunteerActivityVO.bonusPoints != null"> |
| | | bonus_points=#{volunteerActivityVO.bonusPoints}, |
| | | </if> |
| | | <if test="volunteerActivityVO.isCancelled != null"> |
| | | is_cancelled=#{volunteerActivityVO.isCancelled}, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactName != null"> |
| | | contact_name=#{volunteerActivityVO.contactName}, |
| | | </if> |
| | | <if test="volunteerActivityVO.contactPhone != null"> |
| | | contact_phone=#{volunteerActivityVO.contactPhone}, |
| | | </if> |
| | | <if test="volunteerActivityVO.activitCoverUrl != null"> |
| | | activity_cover_url=#{volunteerActivityVO.activitCoverUrl}, |
| | | </if> |
| | | <if test="volunteerActivityVO.activityContent != null"> |
| | | activity_content=#{volunteerActivityVO.activityContent}, |
| | | </if> |
| | | <if test="volunteerActivityVO.lng != null"> |
| | | lng=#{volunteerActivityVO.lng}, |
| | | </if> |
| | | <if test="volunteerActivityVO.lat != null"> |
| | | lat=#{volunteerActivityVO.lat}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerActivityVO.id} |
| | | |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteById" parameterType="String"> |
| | | delete from volunteer_activity where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="timedTaskList" resultMap="VolunteerActivityMap"> |
| | | select |
| | | id, |
| | | ac_state, |
| | | (select count(id) from volunteer_activities_people_involved where activity_id=id) volunteerNum, |
| | | apply_begin_time, |
| | | apply_end_time, |
| | | actity_begin_time, |
| | | actity_end_time |
| | | from volunteer_activity |
| | | where ac_state in (2,3,4) |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.VolunteerTypeDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerType" id="VolunteerTypeMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | </resultMap> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="volunteerTypeGetList" resultMap="VolunteerTypeMap"> |
| | | select |
| | | id, |
| | | name, |
| | | creation_time, |
| | | community_id, |
| | | update_time |
| | | from volunteer_type |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | <insert id="insertvolunteerType"> |
| | | insert into volunteer_type |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerTypeVO.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="volunteerTypeVO.name != null"> |
| | | name, |
| | | </if> |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="volunteerTypeVO.id != null"> |
| | | #{volunteerTypeVO.id}, |
| | | </if> |
| | | <if test="volunteerTypeVO.name != null"> |
| | | #{volunteerTypeVO.name}, |
| | | </if> |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | #{volunteerTypeVO.communityId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="volunteerTypeUpdate"> |
| | | update volunteer_type |
| | | <set> |
| | | <if test="volunteerTypeVO.id != null"> |
| | | id=#{volunteerTypeVO.id}, |
| | | </if> |
| | | <if test="volunteerTypeVO.name != null"> |
| | | name=#{volunteerTypeVO.name}, |
| | | </if> |
| | | <if test="volunteerTypeVO.communityId != null"> |
| | | community_id=#{volunteerTypeVO.communityId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerTypeVO.id} |
| | | </update> |
| | | |
| | | <delete id="volunteerTypeDelete" parameterType="String"> |
| | | delete from volunteer_type where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.panzhihua.timejob.jobhandler; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.service.community.ComBatteryCommodityOrderFeign; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 路北社区任务定时器 |
| | | * @author lyq |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class LBJobHandler { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | |
| | | //定时任务 路北社区 |
| | | @XxlJob("timedTaskVolunteerActivitiesJobHandler") |
| | | public ReturnT<String> timedTaskVolunteerActivitiesJobHandler(String param) throws Exception { |
| | | log.info("定时任务 每半小时检测一次路北社区 活动任务状态"); |
| | | R r = communityService.timedTaskVolunteerActivitiesJobHandler(); |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |