Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
08c56eec
Commit
08c56eec
authored
Sep 21, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时器 取消订单
parent
9fe65747
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
8 deletions
+82
-8
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+3
-3
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+79
-5
No files found.
Mall.Module.Product/OrderModule.cs
View file @
08c56eec
...
@@ -6281,7 +6281,7 @@ namespace Mall.Module.Product
...
@@ -6281,7 +6281,7 @@ namespace Mall.Module.Product
{
{
continue
;
continue
;
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
)
||
item
.
OrderType
==
OrderTypeEnum
.
SDGoods
)
{
{
if
(
gmodel
.
IsCustomSpecification
==
1
)
if
(
gmodel
.
IsCustomSpecification
==
1
)
{
{
...
@@ -8794,7 +8794,7 @@ namespace Mall.Module.Product
...
@@ -8794,7 +8794,7 @@ namespace Mall.Module.Product
{
{
continue
;
continue
;
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
)
||
item
.
OrderType
==
OrderTypeEnum
.
SDGoods
)
{
{
if
(
gmodel
.
IsCustomSpecification
==
1
)
if
(
gmodel
.
IsCustomSpecification
==
1
)
{
{
...
@@ -9121,7 +9121,7 @@ namespace Mall.Module.Product
...
@@ -9121,7 +9121,7 @@ namespace Mall.Module.Product
{
{
continue
;
continue
;
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
if
(
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
)
||
item
.
OrderType
==
OrderTypeEnum
.
SDGoods
)
{
{
if
(
gmodel
.
IsCustomSpecification
==
1
)
if
(
gmodel
.
IsCustomSpecification
==
1
)
{
{
...
...
Mall.WindowsService/Module/FinanceModule.cs
View file @
08c56eec
...
@@ -135,6 +135,10 @@ namespace Mall.WindowsService.Module
...
@@ -135,6 +135,10 @@ namespace Mall.WindowsService.Module
/// vip购买仓储层
/// vip购买仓储层
/// </summary>
/// </summary>
private
static
readonly
RB_Vip_BuyRepository
vipBuyRepository
=
new
RB_Vip_BuyRepository
();
private
static
readonly
RB_Vip_BuyRepository
vipBuyRepository
=
new
RB_Vip_BuyRepository
();
/// <summary>
/// 商品可预定日期
/// </summary>
private
static
readonly
RB_Goods_TargetDateRepository
goods_TargetDateRepository
=
new
RB_Goods_TargetDateRepository
();
#
region
收入
#
region
收入
...
@@ -450,7 +454,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -450,7 +454,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
{
{
continue
;
continue
;
}
}
if
(
string
.
IsNullOrEmpty
(
ditem
.
SpecificationSort
))
if
(
string
.
IsNullOrEmpty
(
ditem
.
SpecificationSort
)
||
ditem
.
OrderType
==
OrderTypeEnum
.
SDGoods
)
{
{
if
(
gmodel
.
IsCustomSpecification
==
1
)
if
(
gmodel
.
IsCustomSpecification
==
1
)
{
{
...
@@ -481,6 +485,75 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -481,6 +485,75 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
};
};
goods_SpecificationPriceRepository
.
Update
(
keyValues2
,
wheres2
);
goods_SpecificationPriceRepository
.
Update
(
keyValues2
,
wheres2
);
}
}
if
(
ditem
.
OrderType
==
OrderTypeEnum
.
SDGoods
)
{
//更新商品可预定日期
var
tdlist
=
goods_TargetDateRepository
.
GetList
(
new
RB_Goods_TargetDate_Extend
()
{
GoodsId
=
ditem
.
GoodsId
??
0
,
StartTime
=
ditem
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
),
EndTime
=
ditem
.
TripETime
.
Value
.
ToString
(
"yyyy-MM-dd"
)
});
if
(
ditem
.
CarType
==
GuideCarGoodsTypeEnum
.
Line
&&
ditem
.
IsSpell
==
1
)
{
//只调整第一天的 其他天 直接表示已预订了
var
fristModel
=
tdlist
.
Where
(
x
=>
x
.
Date
==
Convert
.
ToDateTime
(
ditem
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
))).
FirstOrDefault
();
//第一条更新数量 如果OK咯 更新已预定
if
(
fristModel
!=
null
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
),
1
},
{
nameof
(
RB_Goods_TargetDate
.
ReserveNum
),
(
fristModel
.
ReserveNum
)
-
(
ditem
.
Number
??
0
)
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_TargetDate
.
Id
),
FiledValue
=
fristModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_TargetDateRepository
.
Update
(
keyValues1
,
wheres1
);
if
((
fristModel
.
ReserveNum
)
-
(
ditem
.
Number
??
0
)
<=
0
)
{
//其他的直接改未预定
foreach
(
var
q1item
in
tdlist
.
Where
(
x
=>
x
.
Date
!=
Convert
.
ToDateTime
(
ditem
.
TripSTime
.
Value
.
ToString
(
"yyyy-MM-dd"
))
&&
x
.
IsReserve
==
2
))
{
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
),
1
},
{
nameof
(
RB_Goods_TargetDate
.
ReserveNum
),
0
},
};
List
<
WhereHelper
>
wheres2
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_TargetDate
.
Id
),
FiledValue
=
q1item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_TargetDateRepository
.
Update
(
keyValues2
,
wheres2
);
}
}
}
}
else
{
//直接回滚所有的日期 为可预定
foreach
(
var
q1item
in
tdlist
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_TargetDate
.
IsReserve
),
1
},
{
nameof
(
RB_Goods_TargetDate
.
ReserveNum
),
0
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_TargetDate
.
Id
),
FiledValue
=
q1item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_TargetDateRepository
.
Update
(
keyValues1
,
wheres1
);
}
}
}
else
{
//更新商品表库存
//更新商品表库存
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Extend
.
InventoryNum
),
(
gmodel
.
InventoryNum
??
0
)+(
ditem
.
Number
??
0
)}
{
nameof
(
RB_Goods_Extend
.
InventoryNum
),
(
gmodel
.
InventoryNum
??
0
)+(
ditem
.
Number
??
0
)}
...
@@ -493,6 +566,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -493,6 +566,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
};
};
goodsRepository
.
Update
(
keyValues1
,
wheres1
);
goodsRepository
.
Update
(
keyValues1
,
wheres1
);
}
goods_LogRepository
.
Insert
(
new
Mall
.
Model
.
Entity
.
Product
.
RB_Goods_Log
()
goods_LogRepository
.
Insert
(
new
Mall
.
Model
.
Entity
.
Product
.
RB_Goods_Log
()
{
{
Id
=
0
,
Id
=
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment