CeDo
2021-06-04 eb3920d7d07bbe8c85ef41c0b7f05fb4073d6226
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.panzhihua.grid_app.api;
 
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoHandleDTO;
import com.panzhihua.common.model.dtos.grid.PageEasyAppDTO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.service.grid.GridService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * @author lyq
 */
@RestController
@RequestMapping("/easy/")
@Api(tags = {"网格综治APP随手拍模块@lyq"})
public class EasyPhotoApi extends BaseController {
 
    @Resource
    private GridService gridService;
 
    @ApiOperation(value = "随手拍列表-lyq",response = ComActEasyPhotoVO.class)
    @PostMapping("list")
    public R list(@RequestBody PageEasyAppDTO easyAppDTO){
        LoginUserInfoVO userInfoVO = this.getLoginUserInfo();
        if(userInfoVO == null){
            return R.fail("请先登录");
        }
        easyAppDTO.setCommunityId(userInfoVO.getCommunityId());
        return gridService.easyList(easyAppDTO);
    }
 
    @ApiOperation(value = "随手拍详情-lyq",response = ComActEasyPhotoVO.class)
    @PostMapping("detail")
    public R detail(@RequestParam("easyId") Long easyId){
        return gridService.easyDetailByApp(easyId);
    }
 
    @ApiOperation(value = "随手拍类型列表-lyq",response = ComActEasyPhotoVO.class)
    @PostMapping("type/list")
    public R typeList(){
        return gridService.easyTypeListByApp();
    }
 
    @ApiOperation(value = "随手拍处理-lyq")
    @PostMapping("handle")
    public R handle(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){
        LoginUserInfoVO userInfoVO = this.getLoginUserInfo();
        if(userInfoVO == null){
            return R.fail("请先登录");
        }
        photoHandleDTO.setHandlerId(userInfoVO.getUserId());
        return gridService.easyHandle(photoHandleDTO);
    }
 
    @ApiOperation(value = "随手拍切换公示状态-lyq")
    @PostMapping("publicity")
    public R publicity(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){
        return gridService.easyPublicity(photoHandleDTO);
    }
 
    @ApiOperation(value = "随手拍上报社区-lyq")
    @PostMapping("report")
    public R report(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){
        return gridService.easyReport(photoHandleDTO);
    }
 
}