|
|
@@ -65,8 +65,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getCategoryWeeklySellBestGoodsList(int size, Integer cate1No) {
|
|
|
- String requestUrl = apiUrl + "/m060?cuid=" + cuid + "&size=" + size + "&incids=" + cate1No;
|
|
|
+ public Collection<Result> getCategoryWeeklySellBestGoodsList(int size, Integer cate1No, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m060?cuid=" + cuid + "&size=" + size + "&incids=" + cate1No + "&rccode="+gb+"_main_m60";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -141,8 +142,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getWeeklySellBestGoodsList(int size) {
|
|
|
- String requestUrl = apiUrl + "/m061?cuid=" + cuid + "&size=" + size;
|
|
|
+ public Collection<Result> getWeeklySellBestGoodsList(int size, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m061?cuid=" + cuid + "&size=" + size + "&rccode="+gb+"_best_m61";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -162,8 +164,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Result> getBrandWeeklySellBestGoodsList(int size, Integer brandGroupNo) {
|
|
|
- String requestUrl = apiUrl + "/m061?cuid=" + cuid + "&size=" + size + "&inbids=" + brandGroupNo;
|
|
|
+ public Collection<Result> getBrandWeeklySellBestGoodsList(int size, Integer brandGroupNo, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m061?cuid=" + cuid + "&size=" + size + "&inbids=" + brandGroupNo + "&rccode="+gb+"_brand_m61";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -182,8 +185,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Result> getOutletWeeklySellBestGoodsList(int size) {
|
|
|
- String requestUrl = apiUrl + "/m064?cuid=" + cuid + "&size=" + size;
|
|
|
+ public Collection<Result> getOutletWeeklySellBestGoodsList(int size, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m064?cuid=" + cuid + "&size=" + size + "&rccode="+gb+"_outlet_m64";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -203,8 +207,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Result> getBrandMonthlyClickBestGoodsList(int size, Integer brandGroupNo) {
|
|
|
- String requestUrl = apiUrl + "/m062?cuid=" + cuid + "&size=" + size + "&inbids=" + brandGroupNo;
|
|
|
+ public Collection<Result> getBrandMonthlyClickBestGoodsList(int size, Integer brandGroupNo, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m062?cuid=" + cuid + "&size=" + size + "&inbids=" + brandGroupNo + "&rccode="+gb+"_brand_m62";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -223,8 +228,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Result> getOutletMonthlyClickBestGoodsList(int size) {
|
|
|
- String requestUrl = apiUrl + "/m065?cuid=" + cuid + "&cids=" + "" + "&size=" + size;
|
|
|
+ public Collection<Result> getOutletMonthlyClickBestGoodsList(int size, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/m065?cuid=" + cuid + "&cids=" + "" + "&size=" + size + "&rccode="+gb+"_outlet_m65";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -245,10 +251,11 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Item> getRealtimeViewGoodsList(int size) {
|
|
|
+ public Collection<Item> getRealtimeViewGoodsList(int size, String frontGb, String menuGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
Collection<Item> dataList = new ArrayList<Item>();
|
|
|
|
|
|
- String requestUrl = rtsApiUrl + "/stream?cuid=" + cuid + "&size=" + size + "&type=view";
|
|
|
+ String requestUrl = rtsApiUrl + "/stream?cuid=" + cuid + "&size=" + size + "&type=view" + "&rccode=rts_"+gb+"_"+menuGb+"&rtscode="+gb+"_"+menuGb;
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getItems() != null && !eigeneai.getItems().isEmpty()) {
|
|
|
@@ -290,12 +297,13 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 6. 30
|
|
|
*/
|
|
|
- public Collection<Item> getRealtimeViewBestGoodsList(int size , String cate1No) {
|
|
|
+ public Collection<Item> getRealtimeViewBestGoodsList(int size , String cate1No, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
String requestUrl = "";
|
|
|
if(cate1No.equals(null) || "null".equals(cate1No) || "".equals(cate1No)){
|
|
|
- requestUrl = rtsApiUrl + "/stats-transition?cuid=" + cuid + "&size=" + size + "&type=view&interval=30&span=30&offset=0&categoryid1=";
|
|
|
+ requestUrl = rtsApiUrl + "/stats-transition?cuid=" + cuid + "&size=" + size + "&type=view&interval=30&span=30&offset=0&categoryid1=" + "&rccode=rts_"+gb+"_best&rtscode="+gb+"_best";
|
|
|
}else{
|
|
|
- requestUrl = rtsApiUrl + "/stats-transition?cuid=" + cuid + "&size=" + size + "&type=view&interval=30&span=30&offset=0&categoryid1="+cate1No;
|
|
|
+ requestUrl = rtsApiUrl + "/stats-transition?cuid=" + cuid + "&size=" + size + "&type=view&interval=30&span=30&offset=0&categoryid1="+cate1No + "&rccode=rts_"+gb+"_best&rtscode="+gb+"_best";
|
|
|
}
|
|
|
//&type=view&interval=5&span=10
|
|
|
|
|
|
@@ -330,7 +338,7 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Eigeneai> getCustomerKeywordGoodsList() {
|
|
|
+ public Collection<Eigeneai> getCustomerKeywordGoodsList(String frontGb) {
|
|
|
Collection<Eigeneai> dataList = new ArrayList<>();
|
|
|
|
|
|
// 고객별 최근검색어 목록. TODO: 아이겐에서 미개발
|
|
|
@@ -345,7 +353,7 @@ public class EigeneaiApi {
|
|
|
try {
|
|
|
// 고객별 최근검색어 기준 검색어연관상품 목록 조회
|
|
|
for (Eigeneai.Result result : resultList) {
|
|
|
- dataList.add(this.getKeywordGoodsList(10, result.getCategoryId()));
|
|
|
+ dataList.add(this.getKeywordGoodsList(10, result.getCategoryId(), frontGb));
|
|
|
}
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
// Do nothing
|
|
|
@@ -365,8 +373,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- private Eigeneai getKeywordGoodsList(int size, String keyword) throws UnsupportedEncodingException {
|
|
|
- String requestUrl = apiUrl + "/s003?cuid=" + cuid + "&size=" + size + "&st=" + URLEncoder.encode(keyword, "UTF-8") + "&cps=true&cpt=m004";
|
|
|
+ private Eigeneai getKeywordGoodsList(int size, String keyword, String frontGb) throws UnsupportedEncodingException {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/s003?cuid=" + cuid + "&size=" + size + "&st=" + URLEncoder.encode(keyword, "UTF-8") + "&cps=true&cpt=m004" + "&rccode="+gb+"_search_s3";
|
|
|
return this.getEigeneaiInfo(requestUrl);
|
|
|
}
|
|
|
|
|
|
@@ -380,8 +389,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getRelatedGoodsList(String goodsCd, int size) {
|
|
|
- String requestUrl = apiUrl + "/a037?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=m001";
|
|
|
+ public Collection<Result> getRelatedGoodsList(String goodsCd, int size, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/a037?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=m001" + "&rccode="+gb+"_detail_a37";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -401,7 +411,8 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getRelatedGoodsList(Collection<Cart> cartList, int size) {
|
|
|
+ public Collection<Result> getRelatedGoodsList(Collection<Cart> cartList, int size, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
if (cartList != null && !cartList.isEmpty()) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
int idx = 0;
|
|
|
@@ -413,7 +424,7 @@ public class EigeneaiApi {
|
|
|
sb.append(cart.getGoodsCd());
|
|
|
}
|
|
|
|
|
|
- String requestUrl = apiUrl + "/a037?cuid=" + cuid + "&size=" + size + "&iids=" + sb.toString() + "&cps=true&cpt=m001";
|
|
|
+ String requestUrl = apiUrl + "/a037?cuid=" + cuid + "&size=" + size + "&iids=" + sb.toString() + "&cps=true&cpt=m001" + "&rccode="+gb+"_cart_a37";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -435,8 +446,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getBrandRelatedGoodsList(int size, String goodsCd, Integer brandGroupNo) {
|
|
|
- String requestUrl = apiUrl + "/a038?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=b004&bids=" + brandGroupNo;
|
|
|
+ public Collection<Result> getBrandRelatedGoodsList(int size, String goodsCd, Integer brandGroupNo, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/a038?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=b004&bids=" + brandGroupNo + "&rccode="+gb+"_detail_a38";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -456,8 +468,9 @@ public class EigeneaiApi {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 14
|
|
|
*/
|
|
|
- public Collection<Result> getSameCategoryRelatedGoodsList(int size, String goodsCd, int cate3No) {
|
|
|
- String requestUrl = apiUrl + "/a039?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=c001&cpcids="+cate3No;
|
|
|
+ public Collection<Result> getSameCategoryRelatedGoodsList(int size, String goodsCd, int cate3No, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
+ String requestUrl = apiUrl + "/a039?cuid=" + cuid + "&size=" + size + "&iids=" + goodsCd + "&cps=true&cpt=c001&cpcids="+cate3No + "&rccode="+gb+"_detail_a39";
|
|
|
|
|
|
Eigeneai eigeneai = this.getEigeneaiInfo(requestUrl);
|
|
|
if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
|
|
|
@@ -519,13 +532,14 @@ public class EigeneaiApi {
|
|
|
* @author bin2107
|
|
|
* @since 2021. 7. 26
|
|
|
*/
|
|
|
- public Collection<Result> getRecommendItemList(int size, String keyword) {
|
|
|
+ public Collection<Result> getRecommendItemList(int size, String keyword, String frontGb) {
|
|
|
+ String gb = "M".equals(frontGb) ? "mo" : "pc";
|
|
|
String requestUrl = "";
|
|
|
|
|
|
// 2021.09.02 공백처리
|
|
|
try {
|
|
|
keyword = URLEncoder.encode(keyword, "UTF-8");
|
|
|
- requestUrl = apiUrl + "/s003?size="+size+"&cuid=" + cuid + "&st=" + keyword + "&cps=true&cpt=m004";
|
|
|
+ requestUrl = apiUrl + "/s003?size="+size+"&cuid=" + cuid + "&st=" + keyword + "&cps=true&cpt=m004" + "&rccode="+gb+"_search_s3";
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
// TODO Auto-generated catch block
|
|
|
e.printStackTrace();
|