package com.goldenwater.web.controller.hzz;
import com.goldenwater.common.core.controller.BaseController;
import com.goldenwater.common.core.domain.AjaxResult;
import com.goldenwater.hzz.service.AdTreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hzz/adtree")
public class AdTreeController extends BaseController {
    @Autowired private AdTreeService service;
    @GetMapping("/children") public AjaxResult children(@RequestParam(defaultValue="000000000000") String adCode) { return success(service.getChildren(adCode)); }
    @GetMapping("/info") public AjaxResult info(@RequestParam String adCode) { return success(service.getByCode(adCode)); }
}
