package com.panzhihua.service_dangjian.api;
|
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO;
|
import com.panzhihua.service_dangjian.service.NewFightShoppingOrderService;
|
import io.swagger.annotations.Api;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
|
@Slf4j
|
@Api(tags = {"新增双争双评"})
|
@RestController
|
@RequestMapping("/NewFightOrder")
|
public class NewFightShoppingOrderApi
|
{
|
|
@Resource
|
private NewFightShoppingOrderService orderService;
|
|
/**
|
* 分页查询
|
* @param
|
* @return
|
*/
|
@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 = "communityId", required = false) String communityId,
|
@RequestParam(value = "merchantId", required = false) String merchantId,
|
@RequestParam(value = "orderType", required = false) String orderType)
|
{
|
return orderService.getList(pageNum,pageSize,userId,goodsId,orderNumber,
|
goodName,name,cancelType,communityId,merchantId,orderType);
|
}
|
|
/**
|
* 分页详情
|
* @param
|
* @return
|
*/
|
@GetMapping("/orderGetDetails")
|
public R orderGetDetails(@RequestParam("id") String id,
|
@RequestParam(value = "communityId") String communityId)
|
{
|
return R.ok(orderService.getDetails(id,communityId));
|
}
|
|
/**
|
* 新增
|
* @param
|
* @return
|
*/
|
@PostMapping("/orderAddData")
|
public R orderAddData(@RequestBody NewFightShoppingOrderVO item)
|
{
|
return orderService.addData(item);
|
}
|
|
|
/**
|
* 编辑
|
* @param
|
* @return
|
*/
|
@PostMapping("/orderEditData")
|
public R orderEditData(@RequestBody NewFightShoppingOrderVO item)
|
{
|
return orderService.editData(item);
|
}
|
|
|
/**
|
* 取消
|
* @param
|
* @return
|
*/
|
@GetMapping("/orderCancelOrder")
|
public R orderCancelOrder(@RequestParam("orderId") String orderId,
|
@RequestParam(value = "communityId") String communityId)
|
{
|
return orderService.cancelOrder(orderId,communityId);
|
}
|
|
|
/**
|
* 删除
|
* @param
|
* @return
|
*/
|
@DeleteMapping("/orderExpurgateData")
|
public R orderExpurgateData(@RequestParam("id") String id,
|
@RequestParam(value = "communityId") String communityId)
|
{
|
return orderService.expurgateData(id,communityId);
|
}
|
|
|
}
|