同步数据增加参数,可以手动调节同步数据范围
continuous-integration/drone/push Build is passing Details

沃森川job同步飞书
YXY 1 year ago
parent 7d5468a0c6
commit 39a910eb1f

@ -221,7 +221,7 @@ public class CJTCreateLarkTableJob{
private LarkCompanyRelation getCompanyRelation(AppType appType){ private LarkCompanyRelation getCompanyRelation(AppType appType){
LarkCompanyRelation companyRelationQuery = new LarkCompanyRelation(); LarkCompanyRelation companyRelationQuery = new LarkCompanyRelation();
companyRelationQuery.setAppType(appType.getCode()); companyRelationQuery.setAppType(appType.getCode());
companyRelationQuery.setFlag(FlagStatus.DELETED.getCode()); companyRelationQuery.setFlag(FlagStatus.OK.getCode());
List<LarkCompanyRelation> larkCompanyRelations = larkCompanyRelationMapper.selectLarkCompanyRelationList(companyRelationQuery); List<LarkCompanyRelation> larkCompanyRelations = larkCompanyRelationMapper.selectLarkCompanyRelationList(companyRelationQuery);
return larkCompanyRelations.get(0); return larkCompanyRelations.get(0);
} }

@ -160,8 +160,6 @@ public abstract class SyncAccountsJobAbstract {
String queryKey = String.format("%s.AuditedTime",getQueryKey()); String queryKey = String.format("%s.AuditedTime",getQueryKey());
jsonObject.put(queryKey,timeRange); jsonObject.put(queryKey,timeRange);
log.info("++++++++++++++++++++++++");
log.info(jsonObject.toJSONString());
return jsonObject; return jsonObject;
} }
@ -203,8 +201,6 @@ public abstract class SyncAccountsJobAbstract {
total = response.getTotalPageNum(); total = response.getTotalPageNum();
//实际返回数据 //实际返回数据
List<List<String>> rows = response.getRows(); List<List<String>> rows = response.getRows();
log.info(String.valueOf(total));
log.info(JSONArray.toJSONString(rows));
if (CollectionUtils.isEmpty(rows)){ if (CollectionUtils.isEmpty(rows)){
return; return;
} }

@ -39,9 +39,13 @@ public class ProductProductJob extends OdooAbstrackob {
@Override @Override
protected Map<String, List<String>> getQueryFieldMap() { protected Map<String, List<String>> getQueryFieldMap() {
// return new HashMap() {{
// put("fields", Arrays.asList("id","default_code", "name", "description_purchase"
// , "qty_available", "incoming_qty","cost","categ_id.name", "packaging_ids"));
// }};
return new HashMap() {{ return new HashMap() {{
put("fields", Arrays.asList("id","default_code", "name", "description_purchase" put("fields", Arrays.asList("id","default_code", "name", "description_purchase"
, "qty_available", "incoming_qty","cost","categ_id.name", "packaging_ids")); , "qty_available", "incoming_qty", "packaging_ids"));
}}; }};
} }
@ -62,6 +66,6 @@ public class ProductProductJob extends OdooAbstrackob {
@Override @Override
protected TableRelationTypeEnum syncLarkType() { protected TableRelationTypeEnum syncLarkType() {
return TableRelationTypeEnum.SYNC_ODOO_ACCOUNT_MOVE_LINE; return TableRelationTypeEnum.SYNC_ODOO_PRODUCT_PRODUCT;
} }
} }

Loading…
Cancel
Save