const system = require("../../../system");
const ServiceBase = require("../../svems.base")
const settings = require("../../../../config/settings")
class OrderService extends ServiceBase {
  constructor() {
    super();
    this.pushapiSve = system.getObject("service.push.pushapiSve");
  }

  async allProcess(params) {
    try {
      return await this.callms("order", "allProcess", params);
    } catch (error) {
      return system.getResult(null, `系统错误 错误信息 ${error}`);
    }
  }

  async orders(params) {
    var rs = await this.callms("order", "orders", params);
    await this.setUcUser(rs.data.rows);
    return rs;
  }

  async handleStatus(params) {
    return await this.callms("order", "handleStatus", params);
  }

  async orderInfo(params) {
    var rs = await this.callms("order", "orderInfo", params);
    return rs;
  }

  async orderInfoAll(params) {
    var rs = await this.callms("order", "orderInfoAll", params);
    await this.setUcUser([rs.data.order]);
    return rs;
  }

  async productDics(params) {
    var rs = await this.callms("order", "productDics", params);
    return rs;
  }
}
module.exports = OrderService;
// var task=new UserService();
// task.getUserStatisticGroupByApp().then(function(result){
//   console.log((result));
// }).catch(function(e){
//   console.log(e);
// });