审核门店
This commit is contained in:
@@ -3570,6 +3570,19 @@ func CreateStoreAudit(ctx *jxcontext.Context, storeAudit *model.StoreAudit) (err
|
|||||||
if len(storeAudits) > 0 {
|
if len(storeAudits) > 0 {
|
||||||
return fmt.Errorf("您已申请过入驻,请不要重复申请!")
|
return fmt.Errorf("您已申请过入驻,请不要重复申请!")
|
||||||
}
|
}
|
||||||
|
if storeAudit.Address == "" {
|
||||||
|
return fmt.Errorf("门店地址必填!")
|
||||||
|
}
|
||||||
|
if storeAudit.Lng == 0 || storeAudit.Lat == 0 {
|
||||||
|
lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddressByPage(storeAudit.Address)
|
||||||
|
if lng != 0 && lat != 0 {
|
||||||
|
storeAudit.Lng = jxutils.StandardCoordinate2Int(lng)
|
||||||
|
storeAudit.Lat = jxutils.StandardCoordinate2Int(lat)
|
||||||
|
} else {
|
||||||
|
return fmt.Errorf("请填写正确的门店地址!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if storeAudit.UserID == "" {
|
if storeAudit.UserID == "" {
|
||||||
storeAudit.UserID = ctx.GetUserID()
|
storeAudit.UserID = ctx.GetUserID()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user