| | |
| | | import cn.gistack.sm.exam.entity.ExamPlan; |
| | | import cn.gistack.sm.sjztmd.entity.AttAdBase; |
| | | import cn.gistack.sm.sjztmd.service.IAttAdBaseService; |
| | | import cn.gistack.sm.sjztmd.vo.AttAdBaseVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.node.ForestNodeMerger; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName AttAdBaseController |
| | |
| | | return R.data(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 懒加载列表 懒加载待优化 |
| | | */ |
| | | @GetMapping("/lazy-tree") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "code", value = "区划编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "区划名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @ApiOperation(value = "懒加载列表", notes = "传入code") |
| | | public R<List<AttAdBaseVO>> lazyTree(String parentCode, @ApiIgnore @RequestParam Map<String, Object> obj) { |
| | | List<AttAdBaseVO> list = attAdBaseService.lazyTree(parentCode, obj); |
| | | return R.data(listNodeLazyVO(list)); |
| | | } |
| | | |
| | | private List<AttAdBaseVO> listNodeLazyVO(List<AttAdBaseVO> list) { |
| | | return ForestNodeMerger.merge(list); |
| | | } |
| | | |
| | | } |