// 商品管理模块

// // 商品相关
// // 获取商品列表
// export const getGoodList = {
//     url: '/goods/goods/page',
//     method: 'GET',
//     dealReqData: ({ seriesId, addTimeHead, addTimeTail, goodsName, pageNum, pageSize }) => {
//         return { seriesId, addTimeHead, addTimeTail, goodsName, pageNum, pageSize }
//     }
// }

// // 编辑商品
// export const updateGood = {
//     url: '/goods/goods/update',
//     method: 'PUT',
//     dealReqData: ({ goodsNo, seriesId, name, introduction, properties, sku, detailPictures, video, videoThumb, thumb, detailDescribe, expressTemplateNo, shareProfitTemplate, rate, typeCode }) => {
//         return { goodsNo, seriesId, name, introduction, properties, sku, detailPictures, video, videoThumb, thumb, detailDescribe, expressTemplateNo, shareProfitTemplate, rate, typeCode }
//     }
// }

// // 获取商品详情
// export const getGoodDetail = {
//     url: '/goods/common/detailGoods',
//     method: 'GET',
//     dealReqData: ({ goodsNo }) => {
//         return { goodsNo }
//     }
// }

// // 上架下架商品
// export const onOffGoods = {
//     url: '/goods/goods/onOff',
//     method: 'PUT',
//     dealReqData: ({ goodsNo, type }) => {
//         return { goodsNo, type }
//     }
// }

// // 删除商品
// export const deleteGood = {
//     url: '/goods/goods/delete',
//     method: 'DELETE',
//     dealReqData: ({ goodsNo }) => {
//         return { goodsNo }
//     }
// }

// // 根据seriesId获取商品列表
// export const getGoodsBySeriesId = {
//     url: '/goods/series/detailGoodsByBatch',
//     method: 'GET',
//     dealReqData: ({ seriesId }) => {
//         return { seriesId }
//     }
// }

// // 商品系列相关
// // 分页获取系列列表
// export const getSeriesPageList = {
//     url: '/goods/series/page',
//     method: 'GET',
//     dealReqData: ({ addTimeHead, addTimeTail, keyword, pageNum, pageSize }) => {
//         return { addTimeHead, addTimeTail, keyword, pageNum, pageSize }
//     }
// }

// // 获取系列列表
// export const getSeriesList = {
//     url: '/goods/common/seriesList',
//     method: 'GET'
// }

// // 上下架商品系列
// export const onOffSeries = {
//     url: '/goods/series/onOff',
//     method: 'PUT',
//     dealReqData: ({ seriesId, type }) => {
//         return { seriesId, type }
//     }
// }

// // 新增商品系列
// export const addSeries = {
//     url: '/goods/series/add',
//     method: 'POST',
//     dealReqData: ({ seriesName }) => {
//         return { seriesName }
//     }
// }

// // 更新商品系列
// export const updateSeries = {
//     url: '/goods/series/update',
//     method: 'PUT',
//     dealReqData: ({ seriesId, seriesName }) => {
//         return { seriesId, seriesName }
//     }
// }

// // 快递相关
// // 分页获取快递模板列表
// export const getExpressPageList = {
//     url: '/goods/express/page',
//     method: 'GET',
//     dealReqData: ({ pageNum, pageSize }) => {
//         return { pageNum, pageSize }
//     }
// }

// // 新增快递模板列表
// export const addExpress = {
//     url: '/goods/express/add',
//     method: 'POST',
//     dealReqData: ({ templateName, expressCompany, price }) => {
//         return { templateName, expressCompany, price }
//     }
// }

// // 编辑快递模板列表
// export const updateExpress = {
//     url: '/goods/express/update',
//     method: 'PUT',
//     dealReqData: ({ templateNo, templateName, expressCompany, price }) => {
//         return { templateNo, templateName, expressCompany, price }
//     }
// }

// // 删除快递模板列表
// export const deleteExpress = {
//     url: '/goods/deleteExpress',
//     method: 'DELETE',
//     dealReqData: ({ templateNo }) => {
//         return { templateNo }
//     }
// }

// // 获取快递模板详情
// export const getExpressDetail = {
//     url: '/goods/express/detail',
//     method: 'GET',
//     dealReqData: ({ templateNo }) => {
//         return { templateNo }
//     }
// }

// // 获取省份列表
// export const getProvinceList = {
//     url: '/goods/common/provinceList',
//     method: 'GET'
// }

// // 获取城市列表
// export const getCityList = {
//     url: '/goods/common/cityList',
//     method: 'GET',
//     dealReqData: ({ code }) => {
//         return { code }
//     }
// }

// // 导出证书
// export const exportGoodCer = {
//     url: '/goods/common/exportCert',
//     method: 'GET',
//     dealReqData: ({ skuId }) => {
//         return { skuId }
//     }
// }

// export const getAllGoodList = {
//     url: '/goods/common/goodsList',
//     method: 'GET'
// }

// 查询商品类目
export const categoryList = {
  url: '/category/categoryPermission/list',
  method: 'GET'
}
// 删除商品类目
export const categoryDelete = {
  url: '/category/categoryPermission/delete',
  method: 'DELETE',
  dealUrl: (url, categoryId) => {
    return `${url}/${categoryId}`
  }
}
// 新增商品类目
export const categorySave = {
  url: '/category/categoryPermission/save',
  method: 'POST',
  dealReqData: (addCate) => {
    return addCate
  }
}
// 修改商品类目
export const categoryUpdate = {
  url: '/category/categoryPermission/update',
  method: 'PUT',
  dealReqData: (eidtCate) => {
    return eidtCate
  }
}
// 获取快递模板列表
export const templateList = {
  url: '/template/templatePermission/list',
  method: 'GET'
}
// 获取外部未绑定token
export const unbindToken = {
  url: '/goods/unbindToken',
  method: 'GET'
}
// 获取商品Token前缀
export const getMerchantPrefix = {
  url: '/goods/merchantPrefix',
  method: 'GET'
}
// 新增商品
export const addGood = {
  url: '/goods/releaseGoods/add',
  method: 'POST',
  // dealReqData: ({ auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }) => {
  //     return { auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }
  // }
  dealReqData: (form) => {
    return form
  }
}
// 存为草稿
export const draftGood = {
  url: '/goods/releaseGoods/draft',
  method: 'POST',
  // dealReqData: ({ auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }) => {
  //     return { auctionDTO, categoryId, description, detail, imgList, name, note, pointsExchangeDTO, preSaleDTO, prop, returnReason, returnType, skuList, templateId, thumb, type, video, videoPoster }
  // }
  dealReqData: (form) => {
    return form
  }
}
// 获取商品列表
export const getGoodList = {
  url: '/goodsList/page',
  method: 'GET',
  dealReqData: ({ goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }) => {
    return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }
  }
}
// 获取商品审核列表
export const getGoodCheckList = {
  url: '/goods/goodsList/pagecheck',
  method: 'GET',
  dealReqData: ({ goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }) => {
    return { goodsId, goodsName, goodsType, status, addTimeHead, addTimeTail, pageNum, pageSize }
  }
}
// 上下架商品系列
export const onOffSeries = {
  url: '/goodsList/onOff',
  method: 'PUT',
  dealReqData: ({ goodsId, type, preheatEndTime,autoOff }) => {
    return { goodsId, type, preheatEndTime,autoOff }
  }
}

// 删除商品
export const deleteGood = {
  url: '/goodsList/deleteBatch',
  method: 'DELETE'
}

// 获取商品详情
export const getGoodDetail = {
  url: '/goodsList/detail',
  method: 'GET',
  dealReqData: ({ id }) => {
    return { goodsId: id }
  }
}
// 获取商品详情
export const getGoodDetailforouttoken = {
  url: '/goods/goodsList/detailforouttoken',
  method: 'GET',
  dealReqData: ({ id }) => {
    return { commodityPassId: id }
  }
}
// 查询是否已建模板或店铺
export const templateorshopquery = {
  url: '/goods/releaseGoods/templateorshopquery',
  method: 'GET'
}
// 打包商品-根据商品编号或名称获取商品信息
export const spugetbyvague = {
  url: '/goods/releaseGoods/spugetbyvague',
  method: 'GET',
  dealUrl: (url, goodsInfo) => {
    return `${url}?goodsInfo=${goodsInfo}`
  }
}
// 打包商品-根据商品编号获取商品规格
export const skugetbygoodsId = {
  url: '/goods/releaseGoods/skugetbygoodsId',
  method: 'GET',
  dealUrl: (url, goodsId) => {
    return `${url}?goodsId=${goodsId}`
  }
}
// 编辑商品
export const updateGood = {
  url: '/goods/goodsList/edit',
  method: 'PUT',
  dealReqData: (form) => {
    return form
  }
}
// 重新发布商品
export const republishGood = {
  url: '/goods/goodsList/republish',
  method: 'PUT',
  dealReqData: (form) => {
    return form
  }
}

// 商品审核
export const checkGood = {
  url: '/goods/goodsList/check',
  method: 'PUT',
  dealReqData: ({ checkFailReason, goodsId, status }) => {
    return { checkFailReason, goodsId, status }
  }
}
// 商品批量审核
export const checkAllGood = {
  url: '/goods/goodsList/checkBatch',
  method: 'PUT',
  dealReqData: (form) => {
    return form
  }
}

// 取消审核
export const cancelCheckGood = {
  url: '/goodsList/cancelCheck',
  method: 'PUT',
  dealUrl: (url, goodsId) => {
    return `${url}/${goodsId}`
  }
}
// 撤回审核
export const withdrawGood = {
  url: '/goods/releaseGoods/withdraw',
  method: 'GET',
  dealUrl: (url, goodsId) => {
    return `${url}?goodsId=${goodsId}`
  }
}

// 添加积分商品
export const addIntegralGood = {
  url: '/integralExchange/releaseIntegral/add',
  method: 'POST',
  dealReqData: (form) => {
    return form
  }
}

// 积分商品列表
export const getIntegralList = {
  url: '/integralExchange/integralList/page',
  method: 'GET',
  dealReqData: ({ goodsId, goodsName, addTimeHead, addTimeTail, pageNum, pageSize }) => {
    return { goodsId, goodsName, addTimeHead, addTimeTail, pageNum, pageSize }
  }
}

// 删除积分商品
export const delIntegralGood = {
  url: '/integralExchange/integralList/deleteBatch',
  method: 'DELETE'
}

// 修改积分值
export const updateIntegralValue = {
  url: '/integralExchange/integralList/repairIntegral',
  method: 'PUT',
  dealReqData: ({ goodsId, integral }) => {
    return { goodsId, integral }
  }
}

// 修改库存
export const undateIntegralStock = {
  url: '/integralExchange/integralList/repairStock',
  method: 'PUT',
  dealReqData: ({ goodsId, stock }) => {
    return { goodsId, stock }
  }
}

// 上下架积分商品
export const undateIntegralStatus = {
  url: '/integralExchange/integralList/onOff',
  method: 'PUT',
  dealReqData: ({ goodsId, type }) => {
    return { goodsId, type }
  }
}
// 分页查询-商品评论
export const getGoodsCommentList = {
  url: '/goodsComment/page',
  method: 'GET',
  dealReqData: ({ evaluateType, goodsId, goodsName, replyStatus, pageNum, pageSize }) => {
    return { evaluateType, goodsId, goodsName, replyStatus, pageNum, pageSize }
  }
}
// 商品评价详情
export const commentDetail = {
  url: '/goodsComment/commentDetail',
  method: 'GET',
  dealReqData: ({ commentId }) => {
    return { commentId }
  }
}
// 商品追评详情
export const appendCommentDetail = {
  url: '/goodsComment/appendCommentDetail',
  method: 'GET',
  dealReqData: ({ commentId }) => {
    return { commentId }
  }
}
// 商品回复
export const reply = {
  url: '/goodsComment/reply',
  method: 'PUT',
  dealReqData: ({ commentId, replyContent }) => {
    return { commentId, replyContent }
  }
}
// 商品追评
export const appendReply = {
  url: '/goodsComment/appendReply',
  method: 'PUT',
  dealReqData: ({ commentId, replyContent }) => {
    return { commentId, replyContent }
  }
}
// 删除商品回复
export const deleteReply = {
  url: '/goodsComment/delete',
  method: 'DELETE',
  dealUrl: (url, commentId) => {
    return `${url}/${commentId}`
  }
}
// 删除商品追评
export const appendDelete = {
  url: '/goodsComment/appendDelete',
  method: 'DELETE',
  dealUrl: (url, commentId) => {
    return `${url}/${commentId}`
  }
}

// 外部商品通证--列表
export const externalTokenList = {
  url: '/externalToken/list',
  method: 'GET'
}

// 外部商品通证--交易记录
export const externalTokenTradeList = {
  url: '/externalTokenTrade/list',
  method: 'GET'
}

// 外部商品通证--地址--二维码
export const externalTokenRead = {
  url: '/externalToken/read',
  method: 'GET'
}

// 商品配置--商户详情
export const goodsConfigureMerchantDetail = {
  url: '/goodsConfigure/merchantDetail',
  method: 'GET'
}
// 商品配置--商户
export const goodsConfigureMerchantConfigure = {
  url: '/goodsConfigure/merchantConfigure',
  method: 'PUT',
  dealUrl: (url, { delayDelivery }) => {
    return `${url}?delayDelivery=${delayDelivery}`
  }
}

// 商品配置--平台详情
export const goodsConfigurePlatDetail = {
  url: '/goodsConfigure/platDetail',
  method: 'GET'
}
// 商品配置--平台
export const goodsConfigurePlatConfigure = {
  url: '/goodsConfigure/platConfigure',
  method: 'PUT',
  dealUrl: (url, { delayDelivery }) => {
    return `${url}?delayDelivery=${delayDelivery}`
  }
}
// 商户发布商品是否允许延后提货
export const merchantDelayDelivery = {
  url: '/goods/releaseGoods/merchantDelayDelivery',
  method: 'GET'
}
// 查询外部nft
export const externnftlist = {
  url: '/goods/releaseGoods/externnftlist',
  method: 'GET'
}

// 查询商品规格信息
export const getGoodsSkuInfo = {
  url: "/goods/sku",
  method: 'GET'
}