|
@@ -31,9 +31,7 @@ import com.ruixuan.isc.service.ISupplyChainService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
-import org.springframework.data.mongodb.core.MongoTemplate;
|
|
|
|
-import org.springframework.data.mongodb.core.query.Criteria;
|
|
|
|
-import org.springframework.data.mongodb.core.query.Query;
|
|
|
|
|
|
+
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -56,8 +54,7 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
|
|
private IAccessTokenService accessTokenService;
|
|
private IAccessTokenService accessTokenService;
|
|
@Value("${ownership.id}")
|
|
@Value("${ownership.id}")
|
|
private String ownershipId;
|
|
private String ownershipId;
|
|
- @Autowired
|
|
|
|
- private MongoTemplate mongoTemplate;
|
|
|
|
|
|
+
|
|
|
|
|
|
// 获取订单数据
|
|
// 获取订单数据
|
|
@Override
|
|
@Override
|
|
@@ -803,13 +800,13 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
|
|
KuaishouSupplyChain supplyChain = new KuaishouSupplyChain(info);
|
|
KuaishouSupplyChain supplyChain = new KuaishouSupplyChain(info);
|
|
log.info("订单新增消息订阅,oid:{}", supplyChain.getOid());
|
|
log.info("订单新增消息订阅,oid:{}", supplyChain.getOid());
|
|
String ownership = null;
|
|
String ownership = null;
|
|
- Criteria criteria = new Criteria();
|
|
|
|
|
|
+ /* Criteria criteria = new Criteria();
|
|
criteria = Criteria.where("_id").is(supplyChain.getItemId());
|
|
criteria = Criteria.where("_id").is(supplyChain.getItemId());
|
|
Query query = new Query(criteria);
|
|
Query query = new Query(criteria);
|
|
- ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
|
|
|
|
- if (!Check.isNull(itemCheck)) {
|
|
|
|
|
|
+ ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);*/
|
|
|
|
+ /* if (!Check.isNull(itemCheck)) {
|
|
ownership = itemCheck.getOwnership();
|
|
ownership = itemCheck.getOwnership();
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
supplyChainMapper.replaceOne(ownership, supplyChain);
|
|
supplyChainMapper.replaceOne(ownership, supplyChain);
|
|
} //更新
|
|
} //更新
|
|
else if (2 == messageType) {
|
|
else if (2 == messageType) {
|
|
@@ -1353,10 +1350,10 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
Long itemId = itemJson.getLong("itemId");
|
|
Long itemId = itemJson.getLong("itemId");
|
|
- Criteria criteria = new Criteria();
|
|
|
|
|
|
+ /* Criteria criteria = new Criteria();
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
- Query query = new Query(criteria);
|
|
|
|
- ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
|
|
|
|
|
|
+ Query query = new Query(criteria);*/
|
|
|
|
+ ItemCheck itemCheck =null;
|
|
if (Check.isNull(itemCheck)) {
|
|
if (Check.isNull(itemCheck)) {
|
|
rocketList.add(info.getLong("oid"));
|
|
rocketList.add(info.getLong("oid"));
|
|
}
|
|
}
|
|
@@ -1575,10 +1572,10 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
Long itemId = itemJson.getLong("itemId");
|
|
Long itemId = itemJson.getLong("itemId");
|
|
- Criteria criteria = new Criteria();
|
|
|
|
|
|
+ /* Criteria criteria = new Criteria();
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
- Query query = new Query(criteria);
|
|
|
|
- ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
|
|
|
|
|
|
+ Query query = new Query(criteria);*/
|
|
|
|
+ ItemCheck itemCheck = null;
|
|
if (Check.isNull(itemCheck)) {
|
|
if (Check.isNull(itemCheck)) {
|
|
yuxiuList.add(info.getLong("oid"));
|
|
yuxiuList.add(info.getLong("oid"));
|
|
}
|
|
}
|
|
@@ -1685,10 +1682,10 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONArray cpsOrderProductView = info.getJSONArray("cpsOrderProductView");
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
JSONObject itemJson = cpsOrderProductView.getJSONObject(0);
|
|
Long itemId = itemJson.getLong("itemId");
|
|
Long itemId = itemJson.getLong("itemId");
|
|
- Criteria criteria = new Criteria();
|
|
|
|
|
|
+ /* Criteria criteria = new Criteria();
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
criteria = Criteria.where("_id").is(itemId);
|
|
- Query query = new Query(criteria);
|
|
|
|
- ItemCheck itemCheck = mongoTemplate.findOne(query, ItemCheck.class);
|
|
|
|
|
|
+ Query query = new Query(criteria);*/
|
|
|
|
+ ItemCheck itemCheck =null;
|
|
if (Check.isNull(itemCheck)) {
|
|
if (Check.isNull(itemCheck)) {
|
|
zhishuiList.add(info.getLong("oid"));
|
|
zhishuiList.add(info.getLong("oid"));
|
|
}
|
|
}
|