aa
This commit is contained in:
@@ -1037,3 +1037,17 @@ func polarTriangleArea(tan1, lng1, tan2, lng2 float64) (s float64) {
|
||||
t := tan1 * tan2
|
||||
return 2 * math.Atan2(t*math.Sin(deltaLng), 1+t*math.Cos(deltaLng))
|
||||
}
|
||||
|
||||
func IntListToStrList(i []int) (s []string) {
|
||||
for _, v := range i {
|
||||
s = append(s, utils.Int2Str(v))
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func StrListToIntList(s []string) (i []int) {
|
||||
for _, v := range s {
|
||||
i = append(i, utils.Str2Int(v))
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ func isPushSMS(order *model.GoodsOrder) bool {
|
||||
|
||||
func updateStoreSMSNotifyMark(order *model.GoodsOrder) (err error) {
|
||||
var db = dao.GetDB()
|
||||
stores, _ := dao.GetStoreList(db, []int{order.StoreID}, nil, nil, nil, "")
|
||||
stores, _ := dao.GetStoreList(db, []int{order.StoreID}, nil, nil, nil, nil, "")
|
||||
if len(stores) > 0 {
|
||||
stores[0].SMSNotifyMark = model.YES
|
||||
_, err = dao.UpdateEntity(db, stores[0], "SMSNotifyMark")
|
||||
@@ -148,7 +148,7 @@ func NotifyNewUserOrder(order *model.GoodsOrder) (err error) {
|
||||
if order.ConsigneeMobile2 != "" {
|
||||
mobile = order.ConsigneeMobile2
|
||||
uoSMS, err := dao.GetUserOrderSMS(db, mobile, "")
|
||||
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "")
|
||||
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, nil, "")
|
||||
if len(stores) > 0 {
|
||||
if stores[0].Tel1 == "" {
|
||||
storeTel = stores[0].Tel2
|
||||
@@ -205,7 +205,7 @@ func NotifyNewCourierOrder(bill *model.Waybill) (err error) {
|
||||
} else {
|
||||
storeID = order.StoreID
|
||||
}
|
||||
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "")
|
||||
stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, nil, "")
|
||||
if len(stores) > 0 {
|
||||
if stores[0].Tel1 == "" {
|
||||
storeTel = stores[0].Tel2
|
||||
|
||||
Reference in New Issue
Block a user