查询京东门店范围
This commit is contained in:
@@ -1585,8 +1585,8 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// fmt.Println("deleteList2", deleteList)
|
||||
// cms.DeletedDuplicateWaitAuditData(ctx, dao.GetDB())
|
||||
type tmp struct {
|
||||
jdID string
|
||||
s float64
|
||||
JdID string `json:"jdID"`
|
||||
S float64 `json:"s"`
|
||||
}
|
||||
var (
|
||||
ss []*tmp
|
||||
@@ -1601,15 +1601,14 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
if station.DeliveryRangeType == 2 {
|
||||
strs := strings.Split(station.DeliveryRange, ";")
|
||||
ss = append(ss, &tmp{
|
||||
jdID: v.VendorStoreID,
|
||||
s: jxutils.ComputeSignedArea(strs[:len(strs)-1]),
|
||||
JdID: v.VendorStoreID,
|
||||
S: jxutils.ComputeSignedArea(strs[:len(strs)-1]),
|
||||
})
|
||||
}
|
||||
}
|
||||
fmt.Println("2222222222222222222222222222222222222222", utils.Format4Output(ss, false))
|
||||
for i := 0; i < len(ss)-1; i++ {
|
||||
for j := 0; j < len(ss)-1-i; j++ {
|
||||
if ss[j].s > ss[j+1].s {
|
||||
if ss[j].S > ss[j+1].S {
|
||||
temp := ss[j]
|
||||
ss[j] = ss[j+1]
|
||||
ss[j+1] = temp
|
||||
|
||||
Reference in New Issue
Block a user