package cn.iocoder.yudao.module.inspection.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.inspection.entity.InspectionBusinessMeetAddressRecord;
import cn.iocoder.yudao.module.inspection.service.InspectionBusinessMeetAddressRecordService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inspection-business-meet-address-record")
@RequiredArgsConstructor
public class InspectionBusinessMeetAddressRecordController {

    private final InspectionBusinessMeetAddressRecordService inspectionBusinessMeetAddressRecordService;

    /**
     * 获取地址列表
     *
     * @param userId 用户ID
     * @return 列表
     */
    @GetMapping("/list")
    public CommonResult<?> list(Long userId) {
        return CommonResult.success(inspectionBusinessMeetAddressRecordService.list(Wrappers.<InspectionBusinessMeetAddressRecord>lambdaQuery()
                .eq(InspectionBusinessMeetAddressRecord::getUserId, userId)));
    }
}
