selectParentAgentInfo 관련 생성
This commit is contained in:
parent
b230529537
commit
fd2703ba15
@ -63,13 +63,20 @@ public class ObjectController {
|
||||
return objectService.selectSaleStoreList(saleStoreId, firstFlg, userId);
|
||||
}
|
||||
|
||||
@Operation(description = "1차점 ID 및 판매점명을 조회한다. (saleStoreLevel=2 인 경우)")
|
||||
@Operation(description = "1차점 ID 및 판매점명을 조회한다. (saleStoreLevel > 1 인 경우)")
|
||||
@GetMapping("/saleStore/{saleStoreId}/firstAgent")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public SaleStoreResponse selectFirstAgentInfo(@PathVariable String saleStoreId) throws Exception {
|
||||
return objectService.selectFirstAgentInfo(saleStoreId);
|
||||
}
|
||||
|
||||
@Operation(description = "상위 판매점 정보를 조회한다.")
|
||||
@GetMapping("/saleStore/{saleStoreId}/parentInfo")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public SaleStoreResponse selectParentAgentInfo(@PathVariable String saleStoreId, String storeLvl) throws Exception {
|
||||
return objectService.selectParentAgentInfo(saleStoreId, storeLvl);
|
||||
}
|
||||
|
||||
@Operation(description = "물건정보 목록을 조회한다.")
|
||||
@GetMapping("/list")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
@ -28,6 +28,9 @@ public interface ObjectMapper {
|
||||
// 1차점 ID/명 조회 (saleStoreLevel = '2' 인 경우)
|
||||
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId);
|
||||
|
||||
// 상위 판매점 정보 조회
|
||||
public SaleStoreResponse selectParentAgentInfo(String saleStoreId, String storeLvl);
|
||||
|
||||
// 물건정보 메인 목록 조회
|
||||
public List<ObjectResponse> selectObjectMainList(ObjectRequest objectRequest);
|
||||
|
||||
|
||||
@ -174,6 +174,14 @@ public class ObjectService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public SaleStoreResponse selectParentAgentInfo(String saleStoreId, String storeLvl) throws Exception {
|
||||
SaleStoreResponse result = objectMapper.selectParentAgentInfo(saleStoreId, storeLvl);
|
||||
if (result == null) {
|
||||
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 물건정보 메인 목록 조회
|
||||
*
|
||||
|
||||
@ -27,6 +27,12 @@ public class SaleStoreResponse {
|
||||
@Schema(description = "1차점판매점명")
|
||||
private String firstAgentName;
|
||||
|
||||
@Schema(description = "상위판매점ID")
|
||||
private String parentSaleAgentId;
|
||||
|
||||
@Schema(description = "상위판매점명")
|
||||
private String parentAgentName;
|
||||
|
||||
@Schema(description = "영업사원명")
|
||||
private String businessCharger;
|
||||
|
||||
|
||||
@ -151,6 +151,17 @@
|
||||
AND A.DEL_FLG = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectParentAgentInfo" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
||||
/* sqlid : com.interplug.qcast.biz.object.selectParentAgentInfo */
|
||||
SELECT
|
||||
A.PARENT_SALE_AGENT_ID
|
||||
, (SELECT SALE_STORE_NAME FROM M_SALES_STORE WITH(NOLOCK) WHERE SALE_STORE_ID = A.PARENT_SALE_AGENT_ID AND APPROVE_FLG = '2' AND DEL_FLG = '0') AS PARENT_AGENT_NAME
|
||||
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||
WHERE A.SALE_STORE_ID = #{saleStoreId}
|
||||
AND A.SALE_STORE_LEVEL = #{storeLvl}
|
||||
AND A.DEL_FLG = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectObjectMainList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
|
||||
/* sqlid : com.interplug.qcast.biz.object.selectObjectMainList */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user