【feat】 优化增量任务
This commit is contained in:
parent
09c58e109e
commit
e3c4b3dfdd
@ -262,8 +262,9 @@ public class DataDumpSpecialServiceImpl implements DataDumpSpecialService {
|
|||||||
// 判断是否存在要排除的id
|
// 判断是否存在要排除的id
|
||||||
salesforceParam.setMaxId(maxId);
|
salesforceParam.setMaxId(maxId);
|
||||||
salesforceParam.setBeginModifyDate(dataObject.getLastUpdateDate());
|
salesforceParam.setBeginModifyDate(dataObject.getLastUpdateDate());
|
||||||
|
salesforceParam.setUpdateField(dataFieldService.returnUpdateDateField(dataObject.getName()));
|
||||||
map.put("param", salesforceParam);
|
map.put("param", salesforceParam);
|
||||||
String sql = SqlUtil.showSql("com.celnet.datadump.mapper.SalesforceMapper.listOrderByIdNew", map);
|
String sql = SqlUtil.showSql("com.celnet.datadump.mapper.SalesforceMapper.listOrderByIdShare", map);
|
||||||
log.info("query sql: {}", sql);
|
log.info("query sql: {}", sql);
|
||||||
XxlJobLogger.log("query sql: {}", sql);
|
XxlJobLogger.log("query sql: {}", sql);
|
||||||
QueryResult queryResult = connect.queryAll(sql);
|
QueryResult queryResult = connect.queryAll(sql);
|
||||||
|
|||||||
@ -238,4 +238,43 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="listOrderByIdShare">
|
||||||
|
select ${param.select} from ${param.api}
|
||||||
|
<where>
|
||||||
|
<if test="param != null">
|
||||||
|
<if test="param.maxId != null">
|
||||||
|
AND id > #{param.maxId}
|
||||||
|
</if>
|
||||||
|
<if test="param.isDeleted != null">
|
||||||
|
AND IsDeleted = #{param.isDeleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.sql != null">
|
||||||
|
AND ${param.sql}
|
||||||
|
</if>
|
||||||
|
<!-- 判断 param.api 是否以 "Share" 结尾 -->
|
||||||
|
<if test="param.api != null and param.api.endsWith('Share')">
|
||||||
|
AND RowCause NOT IN (
|
||||||
|
'Owner', 'Rule', 'Territory', 'Team',
|
||||||
|
'ImplicitChild', 'ImplicitParent', 'TerritoryRule',
|
||||||
|
'ImplicitCallCenter', 'PortalRole', 'Portal',
|
||||||
|
'ImplicitPerson', 'ImplicitGrant'
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="param.beginModifyDate">
|
||||||
|
AND #{param.updateField} >= #{param.beginModifyDate}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
<if test="param != null">
|
||||||
|
<if test="param.idField != null">
|
||||||
|
order by ${param.idField} asc
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<if test="param != null and param.limit != null">
|
||||||
|
limit #{param.limit}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user