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);
|
}
|
|
}
|