(req, res, next)
| 92 | } |
| 93 | } |
| 94 | async adminCount(req, res, next){ |
| 95 | const date = req.params.date; |
| 96 | if (!date) { |
| 97 | console.log('参数错误') |
| 98 | res.send({ |
| 99 | status: 0, |
| 100 | type: 'ERROR_PARAMS', |
| 101 | message: '参数错误' |
| 102 | }) |
| 103 | return |
| 104 | } |
| 105 | try{ |
| 106 | const count = await AdminModel.find({create_time: eval('/^' + date + '/gi')}).count() |
| 107 | res.send({ |
| 108 | status: 1, |
| 109 | count, |
| 110 | }) |
| 111 | }catch(err){ |
| 112 | console.log('获取当天注册管理员人数失败'); |
| 113 | res.send({ |
| 114 | status: 0, |
| 115 | type: 'ERROR_GET_ADMIN_REGISTE_COUNT', |
| 116 | message: '获取当天注册管理员人数失败' |
| 117 | }) |
| 118 | } |
| 119 | } |
| 120 | async orderCount(req, res, next){ |
| 121 | const date = req.params.date; |
| 122 | if (!date) { |
nothing calls this directly
no outgoing calls
no test coverage detected