package digital.laboratory.platform.imr.controller;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.imr.entity.DrugCaseInfo;
import digital.laboratory.platform.imr.service.DrugCaseInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/drugCase")
@Api(value = "DrugCaseInfoController", tags = "毒品案件信息相关接口")
public class DrugCaseInfoController {

    @Resource
    private DrugCaseInfoService drugCaseInfoService;

    @ApiOperation("根据送缴的申请id去查询关联案件id")
    @GetMapping("/getCaseInfoByApplyId")
    public R getCaseInfoByApplyId(String applyId) {
        return R.ok(drugCaseInfoService.list(Wrappers.<DrugCaseInfo>lambdaQuery().eq(DrugCaseInfo::getApplyId, applyId)));
    }

}
