feature/jp-0331 #526

Open
jungpyo2001 wants to merge 998 commits from feature/jp-0331 into main
5 changed files with 32 additions and 0 deletions
Showing only changes of commit 2b43fad252 - Show all commits

View File

@ -63,6 +63,13 @@ public class ObjectController {
return objectService.selectSaleStoreList(saleStoreId, firstFlg, userId);
}
@Operation(description = "1차점 ID 및 판매점명을 조회한다. (saleStoreLevel=2 인 경우)")
@GetMapping("/saleStore/{saleStoreId}/firstAgent")
@ResponseStatus(HttpStatus.OK)
public SaleStoreResponse selectFirstAgentInfo(@PathVariable String saleStoreId) throws Exception {
return objectService.selectFirstAgentInfo(saleStoreId);
}
@Operation(description = "물건정보 목록을 조회한다.")
@GetMapping("/list")
@ResponseStatus(HttpStatus.OK)

View File

@ -25,6 +25,9 @@ public interface ObjectMapper {
// 판매점 정보 조회
public SaleStoreResponse selectSaleStoreInfo(String saleStoreId);
// 1차점 ID/ 조회 (saleStoreLevel = '2' 경우)
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId);
// 물건정보 메인 목록 조회
public List<ObjectResponse> selectObjectMainList(ObjectRequest objectRequest);

View File

@ -166,6 +166,14 @@ public class ObjectService {
return objectMapper.selectSaleStoreInfo(saleStoreId);
}
public SaleStoreResponse selectFirstAgentInfo(String saleStoreId) throws Exception {
SaleStoreResponse result = objectMapper.selectFirstAgentInfo(saleStoreId);
if (result == null) {
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
}
return result;
}
/**
* 물건정보 메인 목록 조회
*

View File

@ -24,6 +24,9 @@ public class SaleStoreResponse {
@Schema(description = "1차점판매점ID")
private String firstAgentId;
@Schema(description = "1차점판매점명")
private String firstAgentName;
@Schema(description = "영업사원명")
private String businessCharger;

View File

@ -140,6 +140,17 @@
WHERE A.SALE_STORE_ID = #{saleStoreId}
</select>
<select id="selectFirstAgentInfo" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
/* sqlid : com.interplug.qcast.biz.object.selectFirstAgentInfo */
SELECT
A.FIRST_AGENT_ID
, (SELECT SALE_STORE_NAME FROM M_SALES_STORE WITH(NOLOCK) WHERE SALE_STORE_ID = A.FIRST_AGENT_ID AND APPROVE_FLG = '2' AND DEL_FLG = '0') AS FIRST_AGENT_NAME
FROM M_SALES_STORE A WITH(NOLOCK)
WHERE A.SALE_STORE_ID = #{saleStoreId}
AND A.SALE_STORE_LEVEL = '2'
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 */