- store lng and lat.

This commit is contained in:
gazebo
2018-10-30 22:37:53 +08:00
parent 47d6c6cf13
commit 0e7285efbd
2 changed files with 5 additions and 2 deletions

View File

@@ -284,8 +284,11 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
return num, err
}
func CreateStore(ctx *jxcontext.Context, store *model.Store, userName string) (id int, err error) {
func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (id int, err error) {
store := &storeExt.Store
existingID := store.ID
storeExt.Lng = jxutils.StandardCoordinate2Int(storeExt.FloatLng)
storeExt.Lat = jxutils.StandardCoordinate2Int(storeExt.FloatLat)
dao.WrapAddIDCULDEntity(store, userName)
store.ID = existingID
if err = dao.CreateEntity(nil, store); err == nil {