api 주소 변경
This commit is contained in:
parent
f8cae128a0
commit
338e9678a7
@ -1,6 +1,6 @@
|
|||||||
package com.interplug.qcast.biz.module;
|
package com.interplug.qcast.biz.module;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.module.dto.ModuleResponse;
|
import com.interplug.qcast.biz.module.dto.ModuleInfoResponse;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -8,17 +8,17 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/module")
|
@RequestMapping("/api/module/module-infos")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Tag(name = "ModuleController", description = "모듈 관련 API")
|
@Tag(name = "ModuleInfoController", description = "모듈 정보 API")
|
||||||
public class ModuleController {
|
public class ModuleInfoController {
|
||||||
private final ModuleService moduleService;
|
private final ModuleInfoService moduleService;
|
||||||
|
|
||||||
@Operation(description = "지붕재 ID와 가대 ID에 따라 설치 가능한 모듈 목록을 조회한다.")
|
@Operation(description = "지붕재 ID와 가대 ID에 따라 설치 가능한 모듈 목록을 조회한다.")
|
||||||
@GetMapping("/v1.0/modules/{roofMaterialId}/{trestleId}")
|
@GetMapping
|
||||||
public List<ModuleResponse> getModulesByRoofMaterialIdAndTrestleId(
|
public List<ModuleInfoResponse> getModulesByRoofMaterialIdAndTrestleId(
|
||||||
@PathVariable("roofMaterialId") Integer roofMaterialId,
|
@RequestParam("roofMaterialId") Integer roofMaterialId,
|
||||||
@PathVariable("trestleId") Integer trestleId) {
|
@RequestParam("trestleId") Integer trestleId) {
|
||||||
return moduleService.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
|
return moduleService.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,13 +1,13 @@
|
|||||||
package com.interplug.qcast.biz.module;
|
package com.interplug.qcast.biz.module;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.module.dto.ModuleResponse;
|
import com.interplug.qcast.biz.module.dto.ModuleInfoResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface ModuleMapper {
|
public interface ModuleInfoMapper {
|
||||||
|
|
||||||
List<ModuleResponse> getModulesByRoofMaterialIdAndTrestleId(
|
List<ModuleInfoResponse> getModulesByRoofMaterialIdAndTrestleId(
|
||||||
@Param("roofMaterialId") Integer roofMaterialId, @Param("trestleId") Integer trestleId);
|
@Param("roofMaterialId") Integer roofMaterialId, @Param("trestleId") Integer trestleId);
|
||||||
}
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.interplug.qcast.biz.module;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.module.dto.ModuleInfoResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ModuleInfoService {
|
||||||
|
|
||||||
|
private final ModuleInfoMapper moduleMapper;
|
||||||
|
|
||||||
|
public List<ModuleInfoResponse> getModulesByRoofMaterialIdAndTrestleId(
|
||||||
|
Integer roofMaterialId, Integer trestleId) {
|
||||||
|
return moduleMapper.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.module;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.module.dto.ModuleResponse;
|
|
||||||
import java.util.List;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class ModuleService {
|
|
||||||
|
|
||||||
private final ModuleMapper moduleMapper;
|
|
||||||
|
|
||||||
public List<ModuleResponse> getModulesByRoofMaterialIdAndTrestleId(Integer roofMaterialId, Integer trestleId) {
|
|
||||||
return moduleMapper.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -9,7 +9,7 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ModuleResponse {
|
public class ModuleInfoResponse {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
}
|
}
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.roofmaterial;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import java.util.List;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/api/roof-material")
|
|
||||||
@Tag(name = "RoofMaterialController", description = "지붕재 관련 API")
|
|
||||||
public class RoofMaterialController {
|
|
||||||
private final RoofMaterialService roofService;
|
|
||||||
|
|
||||||
@Operation(description = "지붕재 목록을 조회한다.")
|
|
||||||
@GetMapping("/v1.0/roof-materials")
|
|
||||||
public List<RoofMaterialResponse> getRoofMaterials() {
|
|
||||||
return roofService.getRoofMaterials();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.interplug.qcast.biz.roofmaterial;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialInfoResponse;
|
||||||
|
import com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/roof-material/roof-material-infos")
|
||||||
|
@Tag(name = "RoofMaterialInfoController", description = "지붕재 정보 API")
|
||||||
|
public class RoofMaterialInfoController {
|
||||||
|
private final RoofMaterialInfoService roofMaterialInfoService;
|
||||||
|
|
||||||
|
@Operation(description = "지붕재 목록들을 조회한다.")
|
||||||
|
@GetMapping
|
||||||
|
public List<RoofMaterialInfoResponse> getRoofMaterials() {
|
||||||
|
return roofMaterialInfoService.getRoofMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "지붕재ID에 따라 설치 가능한 가대 목록을 가져온다.")
|
||||||
|
@GetMapping("/{roofMaterialId}/trestles")
|
||||||
|
public List<TrestleInfoResponse> getTrestlesByRoofMaterialId(
|
||||||
|
@PathVariable Integer roofMaterialId) {
|
||||||
|
return roofMaterialInfoService.getTrestlesByRoofMaterialId(roofMaterialId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.interplug.qcast.biz.roofmaterial;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialInfoResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface RoofMaterialInfoMapper {
|
||||||
|
List<RoofMaterialInfoResponse> getRoofMaterials();
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.interplug.qcast.biz.roofmaterial;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialInfoResponse;
|
||||||
|
import com.interplug.qcast.biz.trestle.TrestleInfoService;
|
||||||
|
import com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RoofMaterialInfoService {
|
||||||
|
private final RoofMaterialInfoMapper roofMapper;
|
||||||
|
private final TrestleInfoService trestleInfoService;
|
||||||
|
|
||||||
|
public List<RoofMaterialInfoResponse> getRoofMaterials() {
|
||||||
|
return roofMapper.getRoofMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrestleInfoResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId) {
|
||||||
|
return trestleInfoService.getTrestlesByRoofMaterialId(roofMaterialId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.roofmaterial;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse;
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface RoofMaterialMapper {
|
|
||||||
List<RoofMaterialResponse> getRoofMaterials();
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.roofmaterial;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse;
|
|
||||||
import java.util.List;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class RoofMaterialService {
|
|
||||||
private final RoofMaterialMapper roofMapper;
|
|
||||||
|
|
||||||
public List<RoofMaterialResponse> getRoofMaterials() {
|
|
||||||
return roofMapper.getRoofMaterials();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -9,7 +9,7 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class RoofMaterialResponse {
|
public class RoofMaterialInfoResponse {
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.trestle;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.trestle.dto.TrestleResponse;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import java.util.List;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/api/trestle")
|
|
||||||
@Tag(name = "TrestleController", description = "가대 관련 API")
|
|
||||||
public class TrestleController {
|
|
||||||
private final TrestleService trestleService;
|
|
||||||
|
|
||||||
@Operation(description = "지붕재 ID에 따라 가대 목록을 조회한다.")
|
|
||||||
@GetMapping("/v1.0/trestles/{roofMaterialId}")
|
|
||||||
public List<TrestleResponse> getTrestlesByRoofMaterialId(@PathVariable Integer roofMaterialId) {
|
|
||||||
return trestleService.getTrestlesByRoofMaterialId(roofMaterialId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.interplug.qcast.biz.trestle;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TrestleInfoMapper {
|
||||||
|
List<TrestleInfoResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId);
|
||||||
|
}
|
||||||
@ -1,17 +1,17 @@
|
|||||||
package com.interplug.qcast.biz.trestle;
|
package com.interplug.qcast.biz.trestle;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.trestle.dto.TrestleResponse;
|
import com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class TrestleService {
|
public class TrestleInfoService {
|
||||||
|
|
||||||
private final TrestleMapper trestleMapper;
|
private final TrestleInfoMapper trestleMapper;
|
||||||
|
|
||||||
public List<TrestleResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId) {
|
public List<TrestleInfoResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId) {
|
||||||
return trestleMapper.getTrestlesByRoofMaterialId(roofMaterialId);
|
return trestleMapper.getTrestlesByRoofMaterialId(roofMaterialId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package com.interplug.qcast.biz.trestle;
|
|
||||||
|
|
||||||
import com.interplug.qcast.biz.trestle.dto.TrestleResponse;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TrestleMapper {
|
|
||||||
List<TrestleResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId);
|
|
||||||
}
|
|
||||||
@ -9,7 +9,7 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TrestleResponse {
|
public class TrestleInfoResponse {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private String name;
|
private String name;
|
||||||
private Integer manufacturerId;
|
private Integer manufacturerId;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.module.ModuleMapper">
|
<mapper namespace="com.interplug.qcast.biz.module.ModuleInfoMapper">
|
||||||
<select id="getModulesByRoofMaterialIdAndTrestleId" parameterType="integer" resultType="com.interplug.qcast.biz.module.dto.ModuleResponse">
|
<select id="getModulesByRoofMaterialIdAndTrestleId" parameterType="integer" resultType="com.interplug.qcast.biz.module.dto.ModuleInfoResponse">
|
||||||
SELECT B.ID
|
SELECT B.ID
|
||||||
, B.NAME
|
, B.NAME
|
||||||
FROM TB_MAP_ROOF_MATERIAL_TRESTLE_MODULE A
|
FROM TB_MAP_ROOF_MATERIAL_TRESTLE_MODULE A
|
||||||
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.roofmaterial.RoofMaterialMapper">
|
<mapper namespace="com.interplug.qcast.biz.roofmaterial.RoofMaterialInfoMapper">
|
||||||
<select id="getRoofMaterials" resultType="com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse">
|
<select id="getRoofMaterials" resultType="com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialInfoResponse">
|
||||||
SELECT ID
|
SELECT ID
|
||||||
, NAME
|
, NAME
|
||||||
FROM TB_ROOF_MATERIAL
|
FROM TB_ROOF_MATERIAL
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.trestle.TrestleMapper">
|
<mapper namespace="com.interplug.qcast.biz.trestle.TrestleInfoMapper">
|
||||||
<select id="getTrestlesByRoofMaterialId" parameterType="integer"
|
<select id="getTrestlesByRoofMaterialId" parameterType="integer"
|
||||||
resultType="com.interplug.qcast.biz.trestle.dto.TrestleResponse">
|
resultType="com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse">
|
||||||
SELECT A.TRESTLE_ID AS ID
|
SELECT A.TRESTLE_ID AS ID
|
||||||
, B.NAME AS NAME
|
, B.NAME AS NAME
|
||||||
, C.ID AS MANUFACTURERID
|
, C.ID AS MANUFACTURERID
|
||||||
Loading…
x
Reference in New Issue
Block a user