|
|
@@ -9,6 +9,8 @@ import com.uas.eis.utils.Constant;
|
|
|
import com.uas.eis.utils.HttpUtil;
|
|
|
import com.uas.eis.utils.JacksonUtil;
|
|
|
import com.uas.eis.utils.LogUtil;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -22,6 +24,8 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Service
|
|
|
public class SaleServiceImpl implements SaleService{
|
|
|
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
+
|
|
|
public static final String getSaleFromYundingUrl = "http://dc.oclean.com/getoutstorage";
|
|
|
//public static final String getSaleFromYundingUrl = "http://127.0.0.1:8008/test/getoutstorage";
|
|
|
|
|
|
@@ -78,6 +82,7 @@ public class SaleServiceImpl implements SaleService{
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
ediLogDao.save(LogUtil.getSaleFailLog(responseText,e.getMessage()));
|
|
|
}
|
|
|
}
|
|
|
@@ -111,6 +116,7 @@ public class SaleServiceImpl implements SaleService{
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
ediLogDao.save(LogUtil.getSaleFailLog(code,responseText,e.getMessage()));
|
|
|
}
|
|
|
}
|