哈哈
This commit is contained in:
@@ -1584,6 +1584,33 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// fmt.Println("updateList2", utils.Format4Output(updateList, false))
|
||||
// fmt.Println("deleteList2", deleteList)
|
||||
// cms.DeletedDuplicateWaitAuditData(ctx, dao.GetDB())
|
||||
type tmp struct {
|
||||
jdID string
|
||||
s float64
|
||||
}
|
||||
var (
|
||||
ss []*tmp
|
||||
)
|
||||
storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJD}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
|
||||
for _, v := range storeMaps {
|
||||
station, _ := jd.GetAPI("320406").GetDeliveryRangeByStationNo2(v.VendorStoreID)
|
||||
if station.DeliveryRangeType == 2 {
|
||||
ss = append(ss, &tmp{
|
||||
jdID: v.VendorStoreID,
|
||||
s: jxutils.ComputeSignedArea(strings.Split(station.DeliveryRange, ";")),
|
||||
})
|
||||
}
|
||||
}
|
||||
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 {
|
||||
temp := ss[j]
|
||||
ss[j] = ss[j+1]
|
||||
ss[j+1] = temp
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("111111111111111111111111111111111111111", utils.Format4Output(ss, false))
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user