{"size": 2812, "ext": "js", "max_stars_repo_path": "template/fed-server/server/routes/demo/demo.js", "max_stars_repo_name": "Yatou901007/webpackzx", "max_stars_repo_stars_event_min_datetime": "2019-07-14T10:01:12.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-14T10:01:12.000Z", "max_issues_repo_path": "template/fed-server/server/routes/demo/demo.js", "max_issues_repo_name": "Yatou901007/webpackzx-sider-tabs", "max_issues_repo_issues_event_min_datetime": "2020-07-17T18:20:55.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-10T01:25:51.000Z", "max_forks_repo_path": "template/fed-server/server/routes/demo/demo.js", "max_forks_repo_name": "Yatou901007/webpackzx", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 25.1071428571, "max_line_length": 53, "alphanum_fraction": 0.4263869132}
"use strict";

const express = require("express");
const _ = require("lodash");
const router = express.Router();
const { resultData } = require("../../common/utils");

router.post("/query", function(req, res) {
  res.type("json");
  let params = req.body, ret = {};

  Object.assign(ret, resultData, {
    "data": {
        "page": {
            "pageNum": 1,
            "pageSize": 20,
            "total": 2
        },
        "standardLogisticsCosts": [
            {
                "id": 1,
                "dcType": "非FDC/城市仓/本地仓",
                "businessTypeID": 1,
                "businessType": "仓配一体-普通",
                "endCity": "天津市",
                "endProvince": "天津",
                "endProvinceID": "2",
                "endRegion": "华北",
                "endCityID": 3,
                "operater": "liuhua",
                "routeType": "一区（同省）",
                "startCity": "北京市",
                "startCityID": 72,
                "startProvince": "北京",
                "startProvinceID": "1",
                "startRegion": "华北",
                "firstWeight": "1.00",
                "firstPrice": "1.00",
                "additionalWeight": "1.00",
                "additionalPrice": "1.00",
                "createTime": "2018-10-10",
                "updateTime": "2018-10-10",
            },
            {
                "id": 2,
                "dcType": "非FDC/城市仓/本地仓",
                "businessTypeID": 2,
                "businessType": "仓配一体-普通",
                "endCity": "天津市",
                "endProvince": "天津",
                "endProvinceID": "2",
                "endRegion": "华北",
                "endCityID": 3,
                "operater": "liuhua",
                "routeType": "一区（同省）",
                "startCity": "北京市",
                "startCityID": 72,
                "startProvince": "北京",
                "startProvinceID": "1",
                "startRegion": "华北",
                "firstWeight": "1.00",
                "firstPrice": "1.00",
                "additionalWeight": "1.00",
                "additionalPrice": "1.00",
                "createTime": "2018-10-10",
                "updateTime": "2018-10-10",
            }
        ]
    }
  });

  res.send(ret);
});

router.post('/create', function(req, res) {
  res.type('json');
  let params = req.body,
    ret = {};

  Object.assign(ret, resultData, {
    data: null
  });

  res.send(ret);
});

router.post('/update', function(req, res) {
  res.type('json');
  let params = req.body,
    ret = {};

  Object.assign(ret, resultData, {
    data: null
  });

  res.send(ret);
});

router.post('/delete', function(req, res) {
  res.type('json');
  let params = req.body,
    ret = {};

  Object.assign(ret, resultData, {
    data: null
  });

  res.send(ret);
});

module.exports = router;
