mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.panzhihua.service_dangjian.api;
 
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO;
import com.panzhihua.service_dangjian.entity.NewFightConvenientMerchant;
import com.panzhihua.service_dangjian.service.NewFightConvenientMerchantService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@Slf4j
@RestController
@RequestMapping("/FightConvenient")
public class NewFightConvenientMerchantApi {
    @Resource
    private NewFightConvenientMerchantService merchantService;
 
 
    /**
     * 删除便民服务商家
     *
     * @param merchantId
     * @param operator
     * @return
     */
    @DeleteMapping("/deleteMerchantById")
    public R deleteMerchantById(@RequestParam("communityId") String merchantId) {
        return merchantService.deleteMerchantById(merchantId);
    }
 
    /**
     * 编辑状态
     *
     * @param merchantId
     * @param status
     * @return
     */
    @GetMapping("/editMerchantStatus")
    public R editMerchantStatus(@RequestParam("communityId") String merchantId,
                                @RequestParam("status") String status) {
        return merchantService.editStatus(merchantId, status);
    }
 
    /**
     * 分页查询便民服务商家 运营后台
     *
     * @return
     */
    @GetMapping("/pageMerchant")
    public R pageMerchant(@RequestParam("pageNum") int pageNum,
                          @RequestParam("pageSize") int pageSize,
                          @RequestParam("communityId") String communityId,
                          @RequestParam(value = "isDel", required = false) String isDel,
                          @RequestParam(value = "keyword", required = false)String keyword,
                          @RequestParam(value = "status", required = false)String status) {
        return merchantService.pageMerchant(pageNum, pageSize, isDel, keyword, status, communityId);
    }
 
    /**
     * 查询商家信息
     *
     * @param merchantId
     * @return
     */
    @GetMapping("/selectMerchantById")
    public R selectMerchantById(@RequestParam("merchantId") String merchantId) {
        return R.ok(merchantService.selectMerchantById(merchantId));
    }
 
    @PostMapping("/addMerchantData")
    public R addMerchantData(@RequestBody NewFightConvenientMerchantVO item) {
        return merchantService.addData(item);
    }
 
    @PostMapping("/editMerchantData")
    public R editMerchantData(@RequestBody NewFightConvenientMerchantVO item)
    {
        return merchantService.editData(item);
    }
 
    @GetMapping("/selectUserList")
    public R selectUserList(@RequestParam("communityId") String communityId,
                            @RequestParam("phoneOrname") String phoneOrname)
    {
        return merchantService.selectUserList(communityId,phoneOrname);
    }
 
    @GetMapping("/selectUserListB")
    public R selectUserListB(@RequestParam("communityId") String communityId,
                            @RequestParam("phoneOrname") String phoneOrname)
    {
        return merchantService.selectUserListB(communityId,phoneOrname);
    }
 
 
    @GetMapping("/selectUserBind")
    public R selectUserBind(@RequestParam("communityId") String communityId,
                            @RequestParam("userId") String userId)
    {
        return merchantService.selectUserBind(communityId,userId);
    }
 
}