aa
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package fn
|
package fn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/fnpsapi"
|
"git.rosy.net.cn/baseapi/platformapi/fnpsapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
@@ -63,14 +65,20 @@ func (c *DeliveryHandler) IsErrStoreNotExist(err error) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
||||||
err = api.FnAPI.UpdateStore(&fnpsapi.CreateStoreParam{
|
params := &fnpsapi.CreateStoreParam{
|
||||||
ChainStoreCode: utils.Int2Str(storeDetail.ID),
|
ChainStoreCode: utils.Int2Str(storeDetail.ID),
|
||||||
ChainStoreName: globals.StoreName + "-" + storeDetail.Name,
|
// ChainStoreName: globals.StoreName + "-" + storeDetail.Name,
|
||||||
ContactPhone: storeDetail.Tel1,
|
ContactPhone: storeDetail.Tel1,
|
||||||
Address: storeDetail.Address,
|
Address: storeDetail.Address,
|
||||||
PositionSource: 3,
|
PositionSource: 3,
|
||||||
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng)),
|
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng)),
|
||||||
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat)),
|
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat)),
|
||||||
})
|
}
|
||||||
|
if !strings.Contains(storeDetail.Name, globals.StoreName+"-") {
|
||||||
|
params.ChainStoreName = globals.StoreName + "-" + storeDetail.Name
|
||||||
|
} else {
|
||||||
|
params.ChainStoreName = storeDetail.Name
|
||||||
|
}
|
||||||
|
err = api.FnAPI.UpdateStore(params)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user