This commit is contained in:
richboo111
2022-10-25 09:45:12 +08:00
parent 1cd24373b6
commit 8b54cc9f23
2 changed files with 8 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ func SplicingTimeToDoudian(openTime1, closeTime1, openTime2, closeTime2 int16) (
)
if openTime1 != 0 && closeTime1 != 0 {
tOpenTime1 := utils.Int64ToStr(int64(openTime1))
len1 := len(tOpenTime1) - 2
len1 := len(tOpenTime1) - 1
if utils.Str2Int(tOpenTime1[:len1]) <= 9 {
ts1 = "0"
}
@@ -171,7 +171,7 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
} else {
fences := []string{utils.Int2Str(storeDetail.Store.ID)}
if err := BindFenceByStore(storeDetail.VendorOrgCode, resp.ResultList[0].Store.StoreId, fences); err != nil {
errList.AddErr(fmt.Errorf("门店:%d 绑定电子围栏:%d 失败:%v", resp.ResultList[0].Store.StoreId, fenceID, err))
errList.AddErr(fmt.Errorf("门店:%d 绑定电子围栏:%s 失败:%v", resp.ResultList[0].Store.StoreId, fenceID, err))
} else {
FreightTemplate.FenceID = fenceID
if err := dao.CreateEntity(db, FreightTemplate); err != nil {

View File

@@ -11,3 +11,9 @@ func TestCreateFreight(t *testing.T) {
fmt.Println(data)
fmt.Println(err)
}
//营业时间格式
func TestSplicingTimeToDoudian(t *testing.T) {
data := SplicingTimeToDoudian(1130, 1200, 1430, 1500)
fmt.Println(data)
}