丽知:仅退款修加锁优化
This commit is contained in:
parent
577e1fe9c0
commit
a21799fa9b
|
@ -68,6 +68,9 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
*/
|
||||
private List<String> referenceShopList = ProfilesActiveConstant.REFERENCE_SHOP_LIST;
|
||||
|
||||
private static final Object OBJECT_LOCK = new Object();
|
||||
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(RefundOnlyPluginInitializerToB.class);
|
||||
|
||||
@Override
|
||||
|
@ -160,6 +163,7 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
|
||||
public void start() {
|
||||
try {
|
||||
synchronized (OBJECT_LOCK) {
|
||||
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
|
@ -186,8 +190,7 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:售后订单(ToB仅退款)--->U8C红字应收单,start()方法报错:" + e);
|
||||
}
|
||||
|
@ -199,6 +202,8 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
public void start(String ofsCode) {
|
||||
String[] split = ofsCode.split("_");
|
||||
try {
|
||||
synchronized (OBJECT_LOCK) {
|
||||
|
||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||
queryReturnOrderRequestVO.setCode(split[0]);
|
||||
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
||||
|
@ -219,7 +224,7 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:售后订单(ToB仅退款)--->U8C红字应收单,start(String ofsCode)方法报错:" + e);
|
||||
|
@ -231,6 +236,8 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
*/
|
||||
public void start(String startTime, String endTime) {
|
||||
try {
|
||||
synchronized (OBJECT_LOCK) {
|
||||
|
||||
LocalDate start_parse = LocalDate.parse(startTime);
|
||||
LocalDate end_parse = LocalDate.parse(endTime).plusDays(1);
|
||||
|
||||
|
@ -258,8 +265,7 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:售后订单(ToB仅退款)--->U8C红字应收单,start(String startTime, String endTime)方法报错:" + e);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,8 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
* 需要去存货管理档案参考售价的店铺
|
||||
*/
|
||||
private List<String> referenceShopList = ProfilesActiveConstant.REFERENCE_SHOP_LIST;
|
||||
private static final Object OBJECT_LOCK = new Object();
|
||||
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(RefundOnlyPluginInitializerToC.class);
|
||||
|
||||
|
@ -163,6 +165,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
|
||||
public void start() {
|
||||
try {
|
||||
synchronized (OBJECT_LOCK) {
|
||||
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
|
@ -189,6 +192,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -202,6 +206,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
public void start(String ofsCode) {
|
||||
String[] split = ofsCode.split("_");
|
||||
try {
|
||||
synchronized (OBJECT_LOCK) {
|
||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||
queryReturnOrderRequestVO.setCode(split[0]);
|
||||
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
||||
|
@ -222,6 +227,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -234,7 +240,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
*/
|
||||
public void start(String startTime, String endTime) {
|
||||
try {
|
||||
|
||||
synchronized (OBJECT_LOCK) {
|
||||
LocalDate start_parse = LocalDate.parse(startTime);
|
||||
LocalDate end_parse = LocalDate.parse(endTime).plusDays(1);
|
||||
|
||||
|
@ -261,8 +267,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
|||
}
|
||||
//推送
|
||||
implement(filterReturnGoodsOrders);
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:售后订单(ToC仅退款)--->U8C红字应收单,start(String startTime, String endTime)方法报错:" + e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue