Commit 83f0055d by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents e85f0f48 17a29d5c
var APIBase = require("../../api.base"); var APIBase = require("../../api.base");
var system = require("../../../system"); var system = require("../../../system");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
const axios = require("axios");
class edi extends APIBase { class edi extends APIBase {
constructor() { constructor() {
super(); super();
...@@ -11,6 +12,18 @@ class edi extends APIBase { ...@@ -11,6 +12,18 @@ class edi extends APIBase {
} }
async create(pobj,query,req) { async create(pobj,query,req) {
if(settings.env != "dev") {
axios.post('https://oapi.dingtalk.com/robot/send?access_token=2995a6336bbddb3a4704fdb201ad244784e625b8af7ac5f0877c86e5a58ae164',{
msgtype: 'text',
text:{
content: "磐农来服务单啦!" + JSON.stringify(pobj)
},
at: {
atMobiles: ["13911391996"]
},
isAtAll:false
})
}
console.log(pobj); console.log(pobj);
this.logCtl.info({ this.logCtl.info({
op: "service/impl/utilsSve/service.js/create", op: "service/impl/utilsSve/service.js/create",
......
...@@ -168,7 +168,8 @@ class UtilsFqAliyunService extends AppServiceBase { ...@@ -168,7 +168,8 @@ class UtilsFqAliyunService extends AppServiceBase {
"productId":productInfo.price_item.service_code,// 云服产品skuid,必填 "productId":productInfo.price_item.service_code,// 云服产品skuid,必填
"goodsId":pobj.actionBody.goodsId,// 官网产品id "goodsId":pobj.actionBody.goodsId,// 官网产品id
"customerId":pobj.actionBody.customerId, //客户Id,必填 "customerId":pobj.actionBody.customerId, //客户Id,必填
"product_item":pobj.actionBody.product_item "product_item":pobj.actionBody.product_item,
"device_token":pobj.actionBody.device_token //设备编号参数
} }
pobj.params = icOrderParams; pobj.params = icOrderParams;
var result = await this.opICClientPost(pobj, interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, icOrderParams); var result = await this.opICClientPost(pobj, interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, icOrderParams);
......
...@@ -561,6 +561,10 @@ class UtilsNeedService2 extends AppServiceBase { ...@@ -561,6 +561,10 @@ class UtilsNeedService2 extends AppServiceBase {
PageSize: pobj.actionBody.pageSize || 10, PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2019-05-08" }, apiVersion: "2019-05-08"
}); });
for(var i=0;i<res.data.Data.length;i++){
res.data.Data[i]['createTime'] = new Date(res.data.Data[i].CreateTime).toISOString()
res.data.Data[i]['content'] = res.data.Data[i].Note
}
} }
if (result.data.uapp_id == uappId.baidu) { if (result.data.uapp_id == uappId.baidu) {
......
...@@ -1318,12 +1318,12 @@ class UtilsOrderService extends AppServiceBase { ...@@ -1318,12 +1318,12 @@ class UtilsOrderService extends AppServiceBase {
if (!actionBody.quantity || Number(actionBody.quantity) <= 0) { if (!actionBody.quantity || Number(actionBody.quantity) <= 0) {
return system.getResult(null, "订单数量为空或有误,100030"); return system.getResult(null, "订单数量为空或有误,100030");
} }
// if (!actionBody.goodsId) { if (!actionBody.goodsId) {
// return system.getResult(null, "官网产品id不能为空") return system.getResult(null, "官网产品id不能为空")
// } }
// if (!actionBody.customerId) { if (!actionBody.customerId) {
// return system.getResult(null, '客户Id不能为空') return system.getResult(null, '客户Id不能为空')
// } }
if (actionBody.deliveryData.nclones.length <= 0) { if (actionBody.deliveryData.nclones.length <= 0) {
return system.getResult(null, '尼斯不能为空') return system.getResult(null, '尼斯不能为空')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment