批量美团

This commit is contained in:
richboo111
2023-03-22 17:57:32 +08:00
parent 165753575c
commit a28f4545c8
4 changed files with 111 additions and 4 deletions

View File

@@ -1620,6 +1620,40 @@ func (c *StoreController) BindJxPrinter() {
}
// @Title 批量获取美团门店logo图片
// @Description 批量获取美团门店logo图片
// @Param token header string true "认证token"
// @Param vendorOrgCode query string true "美团平台账号"
// @Param storeIDs query string true "美团门店IDs"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /BatchGetMTStoreLogos [get]
func (c *StoreController) BatchGetMTStoreLogos() {
c.callBatchGetMTStoreLogos(func(params *tStoreBatchGetMTStoreLogosParams) (interface{}, string, error) {
mtStoreIDs := cms.String2ArrayString(params.StoreIDs)
retVal := cms.BatchGetMTStoreLogos(params.VendorOrgCode, mtStoreIDs)
return retVal, "", nil
})
}
// @Title 批量修改美团门店logo图片
// @Description 批量修改美团门店logo图片
// @Param token header string true "认证token"
// @Param vendorOrgCode query string true "美团平台账号"
// @Param relInfos query string true "美团门店与logo链接的map"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /BatchUpdateMTStoreLogos [post]
func (c *StoreController) BatchUpdateMTStoreLogos() {
c.callBatchUpdateMTStoreLogos(func(params *tStoreBatchUpdateMTStoreLogosParams) (retVal interface{}, hint string, err error) {
mtRelInfos := make([]cms.MtRelInfo, 0)
if err := utils.UnmarshalUseNumber([]byte(params.RelInfos), &mtRelInfos); err == nil {
hint = cms.BatchUpdateMTStoreLogos(params.VendorOrgCode, mtRelInfos)
}
return nil, hint, nil
})
}
// @Title 测试操作freight_template
// @Description 测试操作freight_template
// @Param token header string true "认证token"