package com.huimv.admin.controller;


import com.huimv.admin.common.utils.Result;
import com.huimv.admin.common.utils.ResultCode;
import com.huimv.admin.service.IBillIsolateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 * 隔离 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-07-21
 */
@RestController
@RequestMapping("/bill-isolate")
@CrossOrigin
public class BillIsolateController {
    @Autowired
    private IBillIsolateService billIsolateService;

    @PostMapping("/listPersonalIsolate")
    public Result listPersonalIsolate(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap){
        return billIsolateService.listPersonalIsolate(httpServletRequest,paramsMap);
    }

    @PostMapping("/getDetail")
    public Result getDetail(@RequestBody Map<String, String> paramsMap){
        return new Result(ResultCode.SUCCESS,billIsolateService.getById(paramsMap.get("id")));
    }

}
