package com.panzhihua.service_jinhui_community.api;
|
|
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.common.model.vos.jinhui.JinghuiMerchantEvaluateVO;
|
import com.panzhihua.service_jinhui_community.service.JinghuiMerchantEvaluateService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
/**
|
* @auther llming
|
* @describe 金汇商家评价
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/jinghuiMerchantEvaluate")
|
public class JinghuiMerchantEvaluateApi
|
{
|
@Resource
|
private JinghuiMerchantEvaluateService evaluateService;
|
|
|
/**
|
* 商家评论列表
|
* @param pageNum
|
* @param pageSize
|
* @param merchantId
|
* @return
|
*/
|
@GetMapping("/getList")
|
public R merchantEvaluateGetList(@RequestParam("pageNum") int pageNum,
|
@RequestParam("pageSize") int pageSize,
|
@RequestParam("merchantId") String merchantId)
|
{
|
return evaluateService.getList(pageNum,pageSize,merchantId);
|
}
|
|
/**
|
* 商家评论列单个详情
|
* @param id
|
* @return
|
*/
|
@GetMapping("/getDetails")
|
public R merchantEvaluateGetDetails(@RequestParam("id") String id)
|
{
|
return R.ok(evaluateService.getDetails(id));
|
}
|
/**
|
* 商家评论列添加
|
* @param
|
* @return
|
*/
|
@PostMapping("/addData")
|
public R merchantEvaluateAddData(@RequestBody JinghuiMerchantEvaluateVO item)
|
{
|
return evaluateService.addData(item);
|
}
|
|
/**
|
* 商家评论列编辑
|
* @param item
|
* @return
|
*/
|
@PostMapping("/editData")
|
public R merchantEvaluateEditData(@RequestBody JinghuiMerchantEvaluateVO item)
|
{
|
return evaluateService.editData(item);
|
}
|
|
/**
|
* 商家评论列删除
|
* @param id
|
* @return
|
*/
|
@PostMapping("/expurgateData")
|
public R merchantEvaluateExpurgateData(@RequestParam("id") String id)
|
{
|
return evaluateService.expurgateData(id);
|
}
|
|
}
|