Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rebate_shop_04(query , params , sendData){
// params.plan_type = "ALL";
params.plan_name = "ALL";
params.rebate_level = "ALL";
params.rebate_type = "ALL";
params.plan_id = "ALL";
params.unique_plan_id_num = orm.gt(0);
return params;
},
rebate_shop_04_f(data, query, dates){
return (req , res , next)=>{
let query = req.query;
let ep = new eventproxy();
req.models.ads2_new_rebate_order_shop_info.find({
date : orm.between(query.startTime , query.endTime),
day_type : query.day_type,
rebate_type : orm.not_in(["ALL"]),
plan_id : orm.not_in(["ALL"]),
unique_plan_id_num : orm.gt(0)
} , {
limit : query.limit / 1 || 20,
offset : query.limit * (query.page - 1) / 1 || 0,
order : ["-unique_is_rebate_order_num"]
} , (err , data) => {
ep.emit("one" , data);
});
req.models.ads2_new_rebate_order_shop_info.find({
date : orm.between(query.startTime , query.endTime),
day_type : query.day_type,
}).count((err , data) => {
ep.emit("two" , data);
});
req.models.TypeFlow.find({
rebate_total_05(query , params , sendData){
params.rebate_type = orm.gt(-1);
return params;
},
rebate_total_05_second(query , params , sendData){
group.checkSecret(name, secret, function(err) {
if (err) return res.send({err: err, data: []});
req.models.mesg.find({group: name, id: orm.gt(req.query.last)},
'id', function(err, mesgs) {
if (err) return res.send({err: err, data: []});
else {
var mesglist = mesg.getRawInfo(mesgs);
return res.send({err: null, data: mesglist});
}
});
});
};