wlyy.user.repo.js 781 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * 家庭医生平台-用户,包含医生与患者。
  3. */
  4. "use strict";
  5. var log = require('../../util/log');
  6. var wlyyRepo = require("./../mysql/wlyy.db.js");
  7. class WlyyDoctorRepo{
  8. constructor(){
  9. }
  10. /**
  11. * 获取指定时间之后更新的医生数据。
  12. *
  13. * @param timestamp
  14. */
  15. static getUpdatedUsers(timestamp, handler){
  16. wlyyRepo.execQuery({
  17. "sql": "SELECT code, name, sex, birthday, photo, level, 'doctor' 'type' FROM wlyy.wlyy_doctor d where d.czrq > ? UNION " +
  18. "SELECT code, name, sex, birthday, photo, '', 'patient' 'type' FROM wlyy.wlyy_patient p where p.czrq > ?",
  19. "args": [timestamp, timestamp],
  20. "handler": handler
  21. });
  22. }
  23. }
  24. module.exports = WlyyDoctorRepo;