| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.building.IntegratingTaskVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingOrderVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | |
| | | @GetMapping("/NeedProblem/getList") |
| | | public R getNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "search", required = false)String search, |
| | | @RequestParam(value = "classifyId", required = false)String classifyId, |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "userId", required = false)String userId) |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,kind,userId,getCommunityId()+""); |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return newStriveForFeign.getNeedProblemList(pageNum,pageSize,search,classifyId,status,kind,userId,getUserId()+"",communityId,"1",start,end); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "任务需求清单我认领的列表", response = NeedProblemInventoryDTO.class) |
| | | @GetMapping("/getMyJoinNeedProblemList") |
| | | public R getMyJoinNeedProblemList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "search", required = false)String search, |
| | | @RequestParam(value = "status", required = false)String status, |
| | | @RequestParam(value = "kind", required = false)String kind, |
| | | @RequestParam(value = "isDisplay", required = false)String isDisplay, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime) |
| | | { |
| | | Date start=null; |
| | | Date end=null; |
| | | |
| | | try { |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | start = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime); |
| | | } |
| | | if(!StringUtils.isEmpty(startTime)) { |
| | | end = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | |
| | | return newStriveForFeign.getMyJoinNeedProblemList(pageNum,pageSize,search,status,kind,getUserId()+"",getUserId()+"",isDisplay,start,end); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "任务需求清单详情", response = NeedProblemInventoryDTO.class) |
| | | @GetMapping("/NeedProblem/getDetails") |
| | | public R getNeedProblemDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getNeedProblemDetails(id); |
| | | return newStriveForFeign.getNeedProblemDetails(id,getUserId()+""); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增任务需求") |
| | |
| | | *******************************************************************************************************/ |
| | | @ApiOperation(value = "任务报名列表", response = NeedProblemClaimDTO.class) |
| | | @GetMapping("/getNeedClaimList") |
| | | public R getNeedClaimList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | public R getNeedClaimList(@RequestParam(value = "taskId", required = false) String taskId, |
| | | @RequestParam(value = "userId", required = false) String userId, |
| | | @RequestParam(value = "unitId", required = false) String unitId) |
| | | { |
| | | return newStriveForFeign.getNeedClaimList(pageNum,pageSize,kind,userId,unitId); |
| | | return newStriveForFeign.getNeedClaimList(taskId,userId,unitId); |
| | | } |
| | | |
| | | @ApiOperation(value = "任务报名详情", response = NeedProblemClaimDTO.class) |
| | | @GetMapping("/getNeedClaimDetails") |
| | | public R getNeedClaimDetails(@RequestParam("id") String id) |
| | | public R getNeedClaimDetails(@RequestParam(value = "id", required = false) String id, |
| | | @RequestParam(value = "taskId", required = false) String taskId, |
| | | @RequestParam(value = "userId", required = false) String userId) |
| | | { |
| | | return newStriveForFeign.getNeedClaimDetails(id); |
| | | return newStriveForFeign.getNeedClaimDetails(id,taskId,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "任务报名") |
| | |
| | | |
| | | @ApiOperation(value = "取消报名") |
| | | @DeleteMapping("/expurgateNeedClaimData") |
| | | public R expurgateNeedClaimData(@RequestParam("id") String id) |
| | | public R expurgateNeedClaimData(@RequestParam(value = "id", required = false) String id, |
| | | @RequestParam(value = "taskId", required = false) String taskId, |
| | | @RequestParam(value = "userId", required = false) String userId) |
| | | { |
| | | return newStriveForFeign.expurgateNeedClaimData(id); |
| | | return newStriveForFeign.expurgateNeedClaimData(id,taskId,userId); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiOperation(value = "代单位任务报名列表", response = NeedProblemUnitTaskDTO.class) |
| | | @GetMapping("/getNeedTaskList") |
| | | public R getNeedTaskList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageNum") int pageSize, |
| | | @RequestParam(value = "unitId", required = false) String unitId) |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "unitId", required = false) String unitId, |
| | | @RequestParam(value = "kind", required = false) String kind, |
| | | @RequestParam(value = "status", required = false) String status) |
| | | { |
| | | return newStriveForFeign.getNeedTaskList(pageNum,pageSize,unitId); |
| | | return newStriveForFeign.getNeedTaskList(pageNum,pageSize,unitId,kind,status); |
| | | } |
| | | |
| | | @ApiOperation(value = "代单位任务报名详情", response = NeedProblemUnitTaskDTO.class) |
| | |
| | | @ApiOperation(value = "社区共建项目列表", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/getNewFightCommunityList") |
| | | public R getNewFightCommunityList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId", required = false) String communityId) |
| | | { |
| | | return newStriveForFeign.getNewFightCommunityList(pageNum,pageSize); |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | communityId=getCommunityId()+""; |
| | | } |
| | | return newStriveForFeign.getNewFightCommunityList(pageNum,pageSize, |
| | | communityId,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目删除", response = NewFightCommunityConstructionDTO.class) |
| | | @ApiOperation(value = "社区共建项目详情", response = NewFightCommunityConstructionDTO.class) |
| | | @GetMapping("/getNewFightCommunityDetails") |
| | | public R getNewFightCommunityDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getNewFightCommunityDetails(id); |
| | | return newStriveForFeign.getNewFightCommunityDetails(id,getUserId()+""); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区共建项目添加") |
| | |
| | | |
| | | @ApiOperation(value = "社区共建项目删除") |
| | | @DeleteMapping("/expurgateNewFightCommunityData") |
| | | public R expurgateNewFightCommunityData(@RequestParam("id") String id) |
| | | public R expurgateNewFightCommunityData(@RequestParam(value = "id", required = false) String id) |
| | | { |
| | | return newStriveForFeign.expurgateNewFightCommunityData(id); |
| | | } |
| | |
| | | @PostMapping("/editProjectPlanAccomplish") |
| | | public R editProjectPlanAccomplish(@RequestParam("id") String id) |
| | | { |
| | | NewFightProjectPlanDTO item =new NewFightProjectPlanDTO(); |
| | | item.setId(id); |
| | | item.setAffirmTime(new Date()); |
| | | item.setAccomplish("1"); |
| | | return newStriveForFeign.editProjectPlanData(item); |
| | | return newStriveForFeign.editProjectPlanAccomplish(id); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************** |
| | | * |
| | | * 项目参与 |
| | | * |
| | | ******************************************************************************************************/ |
| | | |
| | | @ApiOperation(value = "项目参与人员列表", response = NewFightProjectJoinDTO.class) |
| | | @GetMapping("/getJoinList") |
| | | public R getJoinList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("projectId") String projectId) |
| | | { |
| | | return newStriveForFeign.getJoinList(pageNum,pageSize,projectId); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目参与人员详情", response = NewFightProjectJoinDTO.class) |
| | | @GetMapping("/getJoinDetails") |
| | | public R getJoinDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getJoinDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目参与人员报名") |
| | | @PostMapping("/addJoinData") |
| | | public R addJoinData(@RequestBody NewFightProjectJoinDTO item) |
| | | { |
| | | return newStriveForFeign.addJoinData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目参与人员修改") |
| | | @PostMapping("/editJoinData") |
| | | public R editJoinData(@RequestBody NewFightProjectJoinDTO item) |
| | | { |
| | | return newStriveForFeign.editJoinData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目参与人员取消报名") |
| | | @DeleteMapping("/expurgateJoinData") |
| | | public R expurgateJoinData(@RequestParam(value = "id", required = false) String id, |
| | | @RequestParam(value = "projectId", required = false) String projectId, |
| | | @RequestParam(value = "userId", required = false) String userId) |
| | | { |
| | | return newStriveForFeign.expurgateJoinData(id,projectId,userId); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************** |
| | | * |
| | | * 项目评论 |
| | | * |
| | | ******************************************************************************************************/ |
| | | |
| | | @ApiOperation(value = "项目评论列表", response = NewFightProjectEvaluateDTO.class) |
| | | @GetMapping("/getEvaluateList") |
| | | public R getEvaluateList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("projectId") String projectId) |
| | | { |
| | | return newStriveForFeign.getEvaluateList(pageNum,pageSize,projectId); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目评论详情", response = NewFightProjectEvaluateDTO.class) |
| | | @GetMapping("/getEvaluateDetails") |
| | | public R getEvaluateDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getEvaluateDetails(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目评论新增") |
| | | @PostMapping("/addEvaluateData") |
| | | public R addEvaluateData(@RequestBody NewFightProjectEvaluateDTO item) |
| | | { |
| | | return newStriveForFeign.addEvaluateData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目评论编辑") |
| | | @PostMapping("/editEvaluateData") |
| | | public R editEvaluateData(@RequestBody NewFightProjectEvaluateDTO item) |
| | | { |
| | | return newStriveForFeign.editEvaluateData(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "项目评论删除") |
| | | @DeleteMapping("/expurgateEvaluateData") |
| | | public R expurgateEvaluateData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.expurgateEvaluateData(id); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 微心愿app |
| | | * |
| | | * ****************************************************************************************************************/ |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "微心愿app一键认领") |
| | | @PutMapping("/putmicrowish") |
| | | public R putlMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | Long id = comActMicroWishVO.getId(); |
| | | Long userId = this.getUserId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("心愿主键不能为空"); |
| | | } |
| | | Integer type = comActMicroWishVO.getType(); |
| | | if (ObjectUtils.isEmpty(type) || type > 5 || type < 1) { |
| | | return R.fail("操作类型不对"); |
| | | } |
| | | comActMicroWishVO.setUserId(userId); |
| | | R r = communityService.putlMicroWish(comActMicroWishVO); |
| | | if (R.isOk(r)) { |
| | | if (R.isOk(r)) { |
| | | // 1 审核通过 2驳回 3分配人员 4发起活动 5反馈 |
| | | R r1 = communityService.detailMicroWish(id, userId); |
| | | Object data = r1.getData(); |
| | | ComActMicroWishVO comActMicroWishVO1 = |
| | | JSONObject.parseObject(JSONObject.toJSONString(data), ComActMicroWishVO.class); |
| | | // 查询用户openid |
| | | R userResult = userService.getUserOpenId(comActMicroWishVO1.getSponsorId()); |
| | | if (R.isOk(r1)) { |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(comActMicroWishVO1.getSponsorId()); |
| | | sysUserNoticeVO.setType(2); |
| | | sysUserNoticeVO.setBusinessType(3); |
| | | sysUserNoticeVO.setBusinessTitle(comActMicroWishVO1.getWishName()); |
| | | sysUserNoticeVO.setBusinessTime(comActMicroWishVO1.getExamineAt()); |
| | | sysUserNoticeVO.setBusinessId(id); |
| | | sysUserNoticeVO.setStatus(0); |
| | | if (type.intValue() == 2) { |
| | | sysUserNoticeVO.setTitle("微心愿未通过审核"); |
| | | sysUserNoticeVO |
| | | .setBusinessContent(String.format("驳回原因:%s", comActMicroWishVO1.getRejectReason())); |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("新增微心愿未通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | if (R.isOk(userResult)) { |
| | | String openid = userResult.getData().toString(); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | String result = comActMicroWishVO1.getRejectReason(); |
| | | if (StringUtils.isNotEmpty(result)) { |
| | | result = result.substring(0, 4); |
| | | result += "…"; |
| | | } |
| | | R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "微心愿", |
| | | DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format), |
| | | result,sysTemplateConfigVO.getData().getTemplateId()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } else if (type.intValue() == 5) { |
| | | sysUserNoticeVO.setTitle("微心愿已完成"); |
| | | sysUserNoticeVO.setBusinessContent(comActMicroWishVO.getFeedback()); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("新增微心愿已完成通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } else if (type.intValue() == 3) { |
| | | sysUserNoticeVO.setTitle("微心愿已分配负责人"); |
| | | sysUserNoticeVO.setBusinessContent("负责人会在近日和你联系,请保持电话畅通"); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("新增微心愿已分配负责人通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } else if (type.intValue() == 4) { |
| | | sysUserNoticeVO.setTitle("微心愿发起了活动"); |
| | | sysUserNoticeVO.setBusinessContent("请关注活动页面及时参加,并邀请你的朋友一起支持我们的活动"); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("新增微心愿发起了活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } |
| | | |
| | | // if (type.equals(1)) {// 审核通过给用户增加积分 |
| | | // communityService.addIntegralTradeAdmin( |
| | | // new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbwxy, |
| | | // this.getCommunityId(), comActMicroWishVO1.getSponsorId())); |
| | | // if (R.isOk(userResult)) { |
| | | // String openid = userResult.getData().toString(); |
| | | // WxXCXTempSend util = new WxXCXTempSend(); |
| | | // R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); |
| | | // try { |
| | | // WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "微心愿", |
| | | // DateUtils.format(comActMicroWishVO1.getExamineAt(), DateUtils.ymdhms_format), |
| | | // "审核通过",sysTemplateConfigVO.getData().getTemplateId()); |
| | | // } catch (Exception e) { |
| | | // log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************************ |
| | | * |
| | | * 资源共享 |
| | | * |
| | | *************************************************************************************************************/ |
| | | |
| | | @ApiOperation(value = "资源共享列表", response = NewFightResourceSharingDTO.class) |
| | | @GetMapping("/getResourceSharingList") |
| | | public R getResourceSharingList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId", required = false)String communityId, |
| | | @RequestParam(value = "unitId", required = false)String unitId, |
| | | @RequestParam(value = "meritId", required = false) String meritId) |
| | | { |
| | | return newStriveForFeign.getResourceSharingList(pageNum,pageSize,communityId,unitId,meritId); |
| | | } |
| | | |
| | | @ApiOperation(value = "资源共享详情", response = NewFightResourceSharingDTO.class) |
| | | @GetMapping("/getResourceSharingDetails") |
| | | public R getResourceSharingDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getResourceSharingDetails(id); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************* |
| | | * |
| | | * 积分商城 |
| | | * |
| | | *******************************************************************************************************/ |
| | | @ApiOperation(value = "积分商品列表", response = NewFightShoppingVO.class) |
| | | @GetMapping("/getFightShoppingList") |
| | | public R getFightShoppingList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "goodType", required = false)String goodType, |
| | | @RequestParam(value = "id", required = false)String id) |
| | | { |
| | | return newStriveForFeign.getFightShoppingList(pageNum,pageSize,getCommunityId()+"", |
| | | goodName,goodType,id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "积分商品详情", response = NewFightShoppingVO.class) |
| | | @GetMapping("/getFightShoppingDetails") |
| | | public R getFightShoppingDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.getFightShoppingDetails(id); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************* |
| | | * |
| | | * 商家模块 |
| | | * |
| | | * ********************************************************************************************************/ |
| | | |
| | | @ApiOperation(value = "商家列表", response = NewFightConvenientMerchantVO.class) |
| | | @GetMapping("/pageMerchant") |
| | | public R pageMerchant(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "keyword", required = false)String keyword) |
| | | { |
| | | return newStriveForFeign.pageMerchant(pageNum,pageSize,getCommunityId()+"","0", |
| | | keyword,"1"); |
| | | } |
| | | |
| | | /** |
| | | * 查询商家信息 |
| | | * |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家详情", response = NewFightConvenientMerchantVO.class) |
| | | @GetMapping("/selectMerchantById") |
| | | public R selectMerchantById(@RequestParam("merchantId") String merchantId) |
| | | { |
| | | return newStriveForFeign.selectMerchantById(merchantId); |
| | | } |
| | | |
| | | |
| | | |
| | | /***************************************************************************************************** |
| | | * |
| | | * 用户积分任务完成情况 |
| | | * |
| | | *******************************************************************************************************/ |
| | | /** |
| | | * 列表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "用户积分任务列表", response = IntegratingTaskVO.class) |
| | | @GetMapping("/getTaskList") |
| | | public R getIntegratingTaskList() |
| | | { |
| | | return newStriveForFeign.getIntegratingTaskList(getUserId()+"", |
| | | getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "用户积分任务去完成 只传 status ") |
| | | @PostMapping("/addIntegratingTaskData") |
| | | public R addIntegratingTaskData(@RequestBody IntegratingTaskVO item) |
| | | { |
| | | item.setIsDraw("1"); |
| | | item.setUserId(getUserId()+""); |
| | | item.setCommunityId(getCommunityId()+""); |
| | | return newStriveForFeign.addIntegratingTaskData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 每日签到记录列表 前15条 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "每日签到记录列表 前15条", response = IntegratingTaskVO.class) |
| | | @GetMapping("/IntegratingTask/getEverydayList") |
| | | public R getEverydayList() |
| | | { |
| | | return newStriveForFeign.getEverydayList(getUserId()+"",getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加或者修改积分 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "用户领取积分") |
| | | @PostMapping("/IntegratingTask/upIntegral") |
| | | public R upIntegral(@RequestBody NewFightIntegral item) |
| | | { |
| | | return newStriveForFeign.upIntegral(item); |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 商品订单 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单列表", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetList") |
| | | public R orderGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "goodsId", required = false)String goodsId, |
| | | @RequestParam(value = "orderNumber", required = false)String orderNumber, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "name", required = false)String name, |
| | | @RequestParam(value = "cancelType", required = false)String cancelType, |
| | | @RequestParam(value = "merchantId", required = false) String merchantId, |
| | | @RequestParam(value = "orderType", required = false) String orderType) |
| | | { |
| | | return newStriveForFeign.orderGetList(pageNum,pageSize,userId,goodsId,orderNumber, |
| | | goodName,name,cancelType,getCommunityId()+"",merchantId,orderType); |
| | | } |
| | | |
| | | /** |
| | | * 分页详情 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单详情", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetDetails") |
| | | public R orderGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderGetDetails(id,getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单添加") |
| | | @PostMapping("/orderAddData") |
| | | public R orderAddData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | // item.setCommunityId(getCommunityId()+""); |
| | | // item.setUserId(getUserId()+""); |
| | | // item.setOrderType("1"); |
| | | return newStriveForFeign.orderAddData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单编辑", response = NewFightShoppingOrderVO.class) |
| | | @PostMapping("/NewFightOrder/orderEditData") |
| | | public R orderEditData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | return newStriveForFeign.orderEditData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单取消") |
| | | @GetMapping("/orderCancelOrder") |
| | | public R orderCancelOrder(@RequestParam("orderId") String orderId) |
| | | { |
| | | return newStriveForFeign.orderCancelOrder(orderId,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单删除") |
| | | @DeleteMapping("/orderExpurgateData") |
| | | public R orderExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderExpurgateData(id,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "订单核销") |
| | | @GetMapping("/orderCheck") |
| | | public R orderEditData(@RequestParam("id") String id) |
| | | { |
| | | |
| | | if(org.apache.commons.lang3.StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | |
| | | NewFightShoppingOrderVO vo=new NewFightShoppingOrderVO(); |
| | | vo.setId(id); |
| | | vo.setCancelType("1"); |
| | | vo.setCancelTime(new Date()); |
| | | return newStriveForFeign.orderEditData(vo); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取社区积分排名") |
| | | @GetMapping("/getIntegralUserRank") |
| | | public R getIntegralUserRank() |
| | | { |
| | | return communityService.getIntegralUserRank(getCommunityId(),getUserId()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "是否是商家 如果是商家返回商家id") |
| | | @GetMapping("/selectUserBind") |
| | | public R selectUserBind() |
| | | { |
| | | return newStriveForFeign.selectUserBind(getCommunityId()+"",getUserId()+""); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "搜索用户", response = SysUserVO.class) |
| | | @GetMapping("/selectUserList") |
| | | public R selectUserList(@RequestParam("phoneOrname") String phoneOrname) |
| | | { |
| | | return newStriveForFeign.selectUserList(getCommunityId()+"",phoneOrname); |
| | | } |
| | | |
| | | |
| | | } |