| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.model.dtos.community.ComActWorkGuideDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideService; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComActWorkGuideDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @auther llming |
| | |
| | | public class WorkGuideApi extends BaseController { |
| | | @Resource |
| | | private ComActWorkGuideService workGuideService; |
| | | |
| | | /** |
| | | * 办事指南_新增 |
| | | * @param workGuideDTO 新增信息 |
| | | * |
| | | * @param workGuideDTO |
| | | * 新增信息 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("addworkguide") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addWorkGuide(@RequestBody ComActWorkGuideDTO workGuideDTO, @RequestParam("userId")Long userId) { |
| | | return workGuideService.addWorkGuide(workGuideDTO,userId); |
| | | public R addWorkGuide(@RequestBody ComActWorkGuideDTO workGuideDTO, @RequestParam("userId") Long userId) { |
| | | return workGuideService.addWorkGuide(workGuideDTO, userId); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南_编辑 |
| | | * |
| | | * @param workGuideDTO |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("editworkguide") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putWorkGuide(@RequestBody ComActWorkGuideDTO workGuideDTO, @RequestParam("userId")Long userId) { |
| | | return workGuideService.editWorkGuide(workGuideDTO,userId); |
| | | public R putWorkGuide(@RequestBody ComActWorkGuideDTO workGuideDTO, @RequestParam("userId") Long userId) { |
| | | return workGuideService.editWorkGuide(workGuideDTO, userId); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南_详情 |
| | | * |
| | | * @param workGuideId |
| | | * @return 详情 |
| | | */ |
| | | @GetMapping("detailworkguide") |
| | | public R detailWorkGuide(@RequestParam("workGuideId")Long workGuideId , @RequestParam("conmunityId")Long conmunityId) { |
| | | return workGuideService.detailWorkGuide(workGuideId, conmunityId); |
| | | public R detailWorkGuide(@RequestParam("workGuideId") Long workGuideId, |
| | | @RequestParam("communityId") Long communityId) { |
| | | return workGuideService.detailWorkGuide(workGuideId, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南_分页 |
| | | * @param pageActWorkGuideDTO 查询参数 |
| | | * |
| | | * @param pageActWorkGuideDTO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | @PostMapping("pageworkguide") |
| | | public R pageWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return workGuideService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南_删除 |
| | | * @param workGuideId 办事指南id |
| | | * |
| | | * @param workGuideId |
| | | * 办事指南id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("delectworkguide") |
| | | R delectWorkGuide(@RequestParam("workGuideId") Long workGuideId){ |
| | | R delectWorkGuide(@RequestParam("workGuideId") Long workGuideId) { |
| | | return workGuideService.delectWorkGuide(workGuideId); |
| | | } |
| | | |