// API 层
moment = require("moment"),
startDate: moment(params.startDate).format('YYYY-MM-DD'),
//查找时间段:
if (typeof(appointment_time) != "undefined" && appointment_time != null && appointment_time != '') {
//query.appointment_time = {};
query.appointment_time = {$gte:moment(appointment_time).format('YYYY-MM-DD'),
$lt: moment(appointment_time).add(1, 'days').format('YYYY-MM-DD')};
}
//Dao 层
var query = this.model.find(param).skip(skipFrom).limit(resultsPerPage).populate('merchant').populate('principal').populate('store');