Commit cc82f27f by zhiwj

营业时间时区问题

parent 4a24ba05
package com.gic.store.web.controller;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
......@@ -32,7 +30,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -67,15 +64,8 @@ public class StoreController {
}
String businessTimes = storeQO.getBusinessTimes();
if (StringUtils.isNotBlank(businessTimes)) {
ObjectMapper mapper = new ObjectMapper();
try {
List<StoreBusinessTimeDTO> businessTimeList = mapper.readValue(businessTimes, new TypeReference<List<StoreBusinessTimeDTO>>() {});
storeDTO.setBusinessTimeList(businessTimeList);
} catch (IOException e) {
// e.printStackTrace();
logger.warn("营业时间转换失败", e);
}
// List<StoreBusinessTimeDTO> businessTimeList = JSON.parseArray(businessTimes, StoreBusinessTimeDTO.class);
List<StoreBusinessTimeDTO> businessTimeList = JSON.parseArray(businessTimes, StoreBusinessTimeDTO.class);
storeDTO.setBusinessTimeList(businessTimeList);
}
storeDTO.setCreateType(CreateTypeEnum.BACKGROUND_ADD.getCode());
String fieldJson = storeQO.getStoreExtends();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment