package cn.pluss.platform.controller.merchantComplaintRecord;


import cn.pluss.platform.api.PageInfo;
import cn.pluss.platform.api.Result;
import cn.pluss.platform.api.ResultGenerator;
import cn.pluss.platform.base.BaseModelController;
import cn.pluss.platform.entity.MerchantComplaintRecord;
import cn.pluss.platform.merchantComplaintRecord.MerchantComplaintRecordService;
import cn.pluss.platform.util.PageUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  商户投诉控制器
 * </p>
 *
 * @author bzg
 * @since 2021-09-14
 */
@Controller
@RequestMapping("/merchantComplaintRecord")
public class MerchantComplaintRecordController extends BaseModelController<MerchantComplaintRecordService, MerchantComplaintRecord> {

    @RequestMapping(method = {RequestMethod.GET, RequestMethod.POST}, value = "/index")
    public String index() {
        return "merchantComplaintRecord/list";
    }

    /**
     * @description:分页查询
     * @date: 2021/9/15 13:39
     * @param page:
     * @param record:
     * @return cn.pluss.platform.api.Result<cn.pluss.platform.api.PageInfo<cn.pluss.platform.entity.MerchantComplaintRecord>>
     */
    @GetMapping("pageData")
    @ResponseBody
    public Result<Page<MerchantComplaintRecord>> pageData(Page<MerchantComplaintRecord> page, MerchantComplaintRecord record) {
        Page<MerchantComplaintRecord> pageData = baseService.pageData(page,record);
        return ResultGenerator.genSuccessResult(pageData);
    }
}
