package com.ruoyi.benyun.controller;

import com.ruoyi.benyun.entity.vo.AddrCategoryBody;
import com.ruoyi.benyun.entity.vo.TypeByBody;
import com.ruoyi.benyun.service.CommonService;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/common")
public class CommonController {
    @Autowired
    CommonService commonService;
    //获取网点标签
    @GetMapping("/tag")
    public R tag(){
        List<TypeByBody> tag = commonService.tag();
        return R.ok(tag);
    }

    //获取网点标签
    @GetMapping("/addrCodeMap")
    public R addrCodeMap(){
        List<AddrCategoryBody> addrCategoryBodies = commonService.addrCodeMap();
        return R.ok(addrCategoryBodies);
    }
}
