text: 'use strict';
  module.exports = {
  	/**
  	 * 此函数名称
  	 * @url product/kh/types/add 前端调用的url参数地址
  	 * data 请求参数
  	 * @params {String} params1  参数1
  	 */
  	main: async (event) =>
  	{
  		let { data = {}, userInfo, util, originalParam } = event;
  		//处理子账户父账户关系
  		userInfo.pid && (data.uid = userInfo.pid);
  		let { customUtil, config, pubFun, vk, db, _ } = util;
  		let { uid, _id, code } = data;
  		let res = { code: 0, msg: '操作成功！' };
  		// 业务逻辑开始-----------------------------------------------------------
  		// 可写与数据库的交互逻辑等等
  		let orderStatus = await vk.baseDao.findById(
  		{
  			dbName: "jwvdp-pointsmall-order", // 表名
  			id: _id // id
  		});
  		if (orderStatus.status != 1)
  		{
  			return {
  				code: -1,
  				msg: "发货失败，订单已被取消或删除！"
  			}
  		}
  
  		delete data._id;
  		res.updateInfo = await vk.baseDao.updateById(
  		{
  			dbName: "jwvdp-pointsmall-order",
  			id: _id,
  			dataJson:
  			{
  				express: code, //修改快递单号
  				status: 2, //修改发货状态
  				expressDate: vk.pubfn.timeFormat(new Date(), "yyyy-MM-dd hh:mm:ss")
  			},
  			getUpdateData: true
  		});
  		// 业务逻辑结束-----------------------------------------------------------
  		return res;
  	}
  }
  