diff --git a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml index 939e32f..662df6e 100644 --- a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml +++ b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml @@ -342,14 +342,14 @@ UPDATE epidemic_user_info SET age = IFNULL( ( - YEAR (now()) - YEAR (substring(ID_CARD, 7, 8)) + YEAR (now()) - IFNULL(substring(ID_CARD, 7, 4), 0) ), 0 ) WHERE DEL_FLAG = '0' AND ID_CARD IS NOT NULL - AND REVISION = 0 + AND REVISION = '0' AND LENGTH(ID_CARD) = 18 \ No newline at end of file