xiaoCJ 8 months ago
parent 8783beb041
commit d2a134b976

@ -5,9 +5,7 @@ import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.sztzjy.resource_center.annotation.AnonymousAccess; import com.sztzjy.resource_center.annotation.AnonymousAccess;
import com.sztzjy.resource_center.entity.SysOneCatalog; import com.sztzjy.resource_center.entity.*;
import com.sztzjy.resource_center.entity.SysOneCatalogExample;
import com.sztzjy.resource_center.entity.SysResourceAndCourseExample;
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper; import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
import com.sztzjy.resource_center.mapper.SysResourceAndCourseMapper; import com.sztzjy.resource_center.mapper.SysResourceAndCourseMapper;
import com.sztzjy.resource_center.mapper.SysThreeCatalogMapper; import com.sztzjy.resource_center.mapper.SysThreeCatalogMapper;
@ -23,7 +21,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Author xcj * @Author xcj
@ -79,8 +76,10 @@ public class CourseManageController {
@AnonymousAccess @AnonymousAccess
@ApiOperation("课程下拉框/资源标签管理展示") @ApiOperation("课程下拉框/资源标签管理展示")
@PostMapping("getAllOneCatalogListByDropDown") @PostMapping("getAllOneCatalogListByDropDown")
public ResultEntity<List<Map<String, String>>> getAllOneCatalogListByDropDown() { public ResultEntity<List<SysOneCatalog>> getAllOneCatalogListByDropDown() {
return new ResultEntity<>(sysOneCatalogMapper.getAllOneCatalogListByDropDown()); SysOneCatalogExample example = new SysOneCatalogExample();
List<SysOneCatalog> sysOneCatalogs = sysOneCatalogMapper.selectByExample(example);
return new ResultEntity<>(sysOneCatalogs);
} }
@ -99,16 +98,22 @@ public class CourseManageController {
@AnonymousAccess @AnonymousAccess
@ApiOperation("章下拉框/资源标签管理展示") @ApiOperation("章下拉框/资源标签管理展示")
@PostMapping("getAllTwoCatalogListByDropDown") @PostMapping("getAllTwoCatalogListByDropDown")
public ResultEntity<List<Map<String, String>>> getAllTwoCatalogList(@RequestParam String oneId) { public ResultEntity<List<SysTwoCatalog>> getAllTwoCatalogList(@RequestParam String oneId) {
return new ResultEntity<>(sysTwoCatalogMapper.getAllTwoCatalogList(oneId)); SysTwoCatalogExample example = new SysTwoCatalogExample();
example.createCriteria().andOneIdEqualTo(oneId);
List<SysTwoCatalog> sysTwoCatalogs = sysTwoCatalogMapper.selectByExample(example);
return new ResultEntity<>(sysTwoCatalogs);
} }
@AnonymousAccess @AnonymousAccess
@ApiOperation("节下拉框/资源标签管理展示") @ApiOperation("节下拉框/资源标签管理展示")
@PostMapping("getAllThreeCatalogListByDropDown") @PostMapping("getAllThreeCatalogListByDropDown")
public ResultEntity<List<Map<String, String>>> getAllThreeCatalogList(@RequestParam String oneId, @RequestParam String twoId) { public ResultEntity<List<SysThreeCatalog>> getAllThreeCatalogList(@RequestParam String oneId, @RequestParam String twoId) {
return new ResultEntity<>(sysThreeCatalogMapper.getAllThreeCatalogList(oneId, twoId)); SysThreeCatalogExample example = new SysThreeCatalogExample();
example.createCriteria().andOntIdEqualTo(oneId).andTwoIdEqualTo(twoId);
List<SysThreeCatalog> sysThreeCatalogs = sysThreeCatalogMapper.selectByExample(example);
return new ResultEntity<>(sysThreeCatalogs);
} }

Loading…
Cancel
Save