Commit fb705293 by 徐高华

定时删除

parent 5a8c58d0
...@@ -53,7 +53,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService { ...@@ -53,7 +53,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
public void deleteForTimer() { public void deleteForTimer() {
log.info("删除临时活码定时开始"); log.info("删除临时活码定时开始");
List<TabHmQrcodeTemp> list = this.hmQrcodeTempMapper.listAll(); List<TabHmQrcodeTemp> list = this.hmQrcodeTempMapper.listAll();
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
for (TabHmQrcodeTemp item : list) { for (TabHmQrcodeTemp item : list) {
this.del(item); this.del(item);
} }
...@@ -67,7 +67,9 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService { ...@@ -67,7 +67,9 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
String configId = item.getWxConfigId(); String configId = item.getWxConfigId();
QywxResponseDTO resp = this.qywxUserApiService.delContactWay(corpid, suiteId, configId); QywxResponseDTO resp = this.qywxUserApiService.delContactWay(corpid, suiteId, configId);
log.info("删除临时活码={}{},返回={}", configId, corpid, JSON.toJSONString(resp)); log.info("删除临时活码={}{},返回={}", configId, corpid, JSON.toJSONString(resp));
this.hmQrcodeTempMapper.deleteByPrimaryKey(item.getId()); if(resp.getErrcode()==0) {
this.hmQrcodeTempMapper.deleteByPrimaryKey(item.getId());
}
} catch (Exception e) { } catch (Exception e) {
log.info("删除临时活码异常={}", e); log.info("删除临时活码异常={}", e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment