批量美团logo
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -1647,9 +1649,17 @@ func (c *StoreController) BatchGetMTStoreLogos() {
|
||||
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 {
|
||||
b := bytes.NewBufferString(params.RelInfos)
|
||||
decoder := json.NewDecoder(b)
|
||||
if err = decoder.Decode(&mtRelInfos); err == nil {
|
||||
hint = cms.BatchUpdateMTStoreLogos(params.VendorOrgCode, mtRelInfos)
|
||||
}
|
||||
//if err = mapstructure.Decode(params.RelInfos, &mtRelInfos); err == nil {
|
||||
// hint = cms.BatchUpdateMTStoreLogos(params.VendorOrgCode, mtRelInfos)
|
||||
//}
|
||||
//if err := utils.UnmarshalUseNumber([]byte(params.RelInfos), &mtRelInfos); err == nil {
|
||||
// hint = cms.BatchUpdateMTStoreLogos(params.VendorOrgCode, mtRelInfos)
|
||||
//}
|
||||
return nil, hint, nil
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user