| | |
| | | import org.springblade.modules.catalog.entitly.catalog; |
| | | import org.springblade.modules.catalog.service.catalogService; |
| | | import org.springblade.modules.catalog.vo.catalogVO; |
| | | import org.springblade.modules.deploy.entity.Deploy; |
| | | import org.springblade.modules.deploy.service.IDeployService; |
| | | import org.springblade.modules.deploy.vo.DeployVO; |
| | | import org.springblade.modules.catalog.wrapper.catalogWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | return R.data(catalogService.selectCatalogList()); |
| | | } |
| | | List<Map<String, Object>> list = catalogService.selectCatalogList(); |
| | | for (int i=0;i<list.size();i++){ |
| | | Object pId = list.get(i).get("pId"); |
| | | String s = pId.toString(); |
| | | int i1 = Integer.parseInt(s); |
| | | if (i1==0){ |
| | | list.get(i).put("isParent","true"); |
| | | } |
| | | } |
| | | |
| | | return R.data(list); |
| | | } |
| | | |
| | | } |