사용하지 않는 코드 제거
This commit is contained in:
parent
dcc5e6818e
commit
e6172117ac
@ -1,24 +0,0 @@
|
||||
package com.interplug.qcast.biz.module;
|
||||
|
||||
import com.interplug.qcast.biz.module.dto.ModuleInfoResponse;
|
||||
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
|
||||
@RequestMapping("/api/module/module-infos")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "ModuleInfoController", description = "모듈 정보 API")
|
||||
public class ModuleInfoController {
|
||||
private final ModuleInfoService moduleService;
|
||||
|
||||
@Operation(description = "지붕재 ID와 가대 ID에 따라 설치 가능한 모듈 목록을 조회한다.")
|
||||
@GetMapping
|
||||
public List<ModuleInfoResponse> getModulesByRoofMaterialIdAndTrestleId(
|
||||
@RequestParam("roofMaterialId") Integer roofMaterialId,
|
||||
@RequestParam("trestleId") Integer trestleId) {
|
||||
return moduleService.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.interplug.qcast.biz.module;
|
||||
|
||||
import com.interplug.qcast.biz.module.dto.ModuleInfoResponse;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface ModuleInfoMapper {
|
||||
|
||||
List<ModuleInfoResponse> getModulesByRoofMaterialIdAndTrestleId(
|
||||
@Param("roofMaterialId") Integer roofMaterialId, @Param("trestleId") Integer trestleId);
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
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,15 +0,0 @@
|
||||
package com.interplug.qcast.biz.module.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ModuleInfoResponse {
|
||||
private Integer id;
|
||||
private String name;
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
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();
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
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,16 +0,0 @@
|
||||
package com.interplug.qcast.biz.roofmaterial.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RoofMaterialInfoResponse {
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
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 +0,0 @@
|
||||
package com.interplug.qcast.biz.trestle;
|
||||
|
||||
import com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TrestleInfoService {
|
||||
|
||||
private final TrestleInfoMapper trestleMapper;
|
||||
|
||||
public List<TrestleInfoResponse> getTrestlesByRoofMaterialId(Integer roofMaterialId) {
|
||||
return trestleMapper.getTrestlesByRoofMaterialId(roofMaterialId);
|
||||
}
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package com.interplug.qcast.biz.trestle.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TrestleInfoResponse {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Integer manufacturerId;
|
||||
private String manufacturerName;
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
<?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">
|
||||
|
||||
<mapper namespace="com.interplug.qcast.biz.module.ModuleInfoMapper">
|
||||
<select id="getModulesByRoofMaterialIdAndTrestleId" parameterType="integer" resultType="com.interplug.qcast.biz.module.dto.ModuleInfoResponse">
|
||||
SELECT B.ID
|
||||
, B.NAME
|
||||
FROM TB_MAP_ROOF_MATERIAL_TRESTLE_MODULE A
|
||||
JOIN TB_MODULE B
|
||||
ON A.MODULE_ID = B.ID
|
||||
WHERE A.ROOF_MATERIAL_ID = #{roofMaterialId}
|
||||
AND A.TRESTLE_ID = #{trestleId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,10 +0,0 @@
|
||||
<?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">
|
||||
|
||||
<mapper namespace="com.interplug.qcast.biz.roofmaterial.RoofMaterialInfoMapper">
|
||||
<select id="getRoofMaterials" resultType="com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialInfoResponse">
|
||||
SELECT ID
|
||||
, NAME
|
||||
FROM TB_ROOF_MATERIAL
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,18 +0,0 @@
|
||||
<?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">
|
||||
|
||||
<mapper namespace="com.interplug.qcast.biz.trestle.TrestleInfoMapper">
|
||||
<select id="getTrestlesByRoofMaterialId" parameterType="integer"
|
||||
resultType="com.interplug.qcast.biz.trestle.dto.TrestleInfoResponse">
|
||||
SELECT A.TRESTLE_ID AS ID
|
||||
, B.NAME AS NAME
|
||||
, C.ID AS MANUFACTURERID
|
||||
, C.NAME AS MANUFACTURERNAME
|
||||
FROM TB_MAP_ROOF_MATERIAL_TRESTLE A
|
||||
JOIN TB_TRESTLE B
|
||||
ON A.TRESTLE_ID = B.ID
|
||||
JOIN TB_MANUFACTURER C
|
||||
ON B.MANUFACTURER_ID = C.ID
|
||||
WHERE A.ROOF_MATERIAL_ID = #{roofMaterialId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user