fo bo 머지작업(mngr)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.wb.domainserver.domain.gcone.promtn.coupon.service;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.nimbusds.jose.shaded.gson.Gson;
|
||||
import com.nimbusds.jose.shaded.gson.reflect.TypeToken;
|
||||
@@ -20,6 +22,7 @@ import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndVO;
|
||||
import com.wb.domainserver.domain.gcone.promtn.coupon.mapper.BOCouponMapper;
|
||||
import com.wb.domainserver.domain.gcone.promtn.coupon.vo.*;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import com.wb.domainserver.exception.code.ErrorCode;
|
||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||
import com.wb.domainserver.util.string.StringUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -1972,9 +1975,16 @@ public class BOCouponService {
|
||||
* @param mbrSrchVO
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void setValuesFromJson(String srchParam, BOMbrSrchVO mbrSrchVO) throws Exception {
|
||||
public static void setValuesFromJson(String srchParam, BOMbrSrchVO mbrSrchVO){
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
List<Map<String, String>> params = mapper.readValue(srchParam, new TypeReference<List<Map<String, String>>>(){});
|
||||
List<Map<String, String>> params = null;
|
||||
try{
|
||||
params = mapper.readValue(srchParam, new TypeReference<List<Map<String, String>>>(){});
|
||||
|
||||
}catch(JsonProcessingException jpe){
|
||||
log.error("쿠폰 대상자 쿼리 검색 조건 파싱 에러"+jpe.getMessage());
|
||||
new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
for (Map<String, String> param : params) {
|
||||
String fieldName = param.get("name");
|
||||
@@ -1986,6 +1996,9 @@ public class BOCouponService {
|
||||
field.set(mbrSrchVO, fieldValue);
|
||||
} catch (NoSuchFieldException e) {
|
||||
log.debug("No such field: {}", fieldName);
|
||||
} catch (IllegalAccessException e) {
|
||||
log.error("쿠폰 대상자 쿼리 검색 조건 파싱 에러"+e.getMessage());
|
||||
new WnbtRestException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user