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
a59cc434
Commit
a59cc434
authored
Jan 30, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
b98f0b25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
65 deletions
+74
-65
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+74
-65
No files found.
Mall.Module.User/UserCommonModule.cs
View file @
a59cc434
...
...
@@ -431,90 +431,99 @@ namespace Mall.Module.User
{
nameof
(
RB_Goods_Order_Extend
.
PaymentTime
),
Time_End
},
{
nameof
(
RB_Goods_Order_Extend
.
PaymentWay
),
Common
.
Enum
.
Goods
.
OrderPaymentTypeEnum
.
OnlinePayment
}
};
if
(
guidebaseModel
!=
null
&&
guidebaseModel
.
IsConfirm
==
2
&&
oldOrder
.
OrderClassify
==
1
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
}
else
if
(
oldOrder
.
OrderClassify
==
2
||
oldOrder
.
VersionSource
==
1
||
oldOrder
.
OrderEduType
==
1
)
{
//if (oldOrder.OrderEduType == 2)
//教育订单 下单后 直接完成 无法取消订单 无法申请售后
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Completed
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
ReceivingTime
),
DateTime
.
Now
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
FinishTime
),
DateTime
.
Now
);
}
else
if
(
oldOrder
.
OrderClassify
==
3
)
if
(
oldOrder
.
TenantId
==
29
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
}
else
if
(
oldOrder
.
OrderEduType
==
2
)
{
if
(
oldOrder
.
DeliveryMethod
==
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
ExpressDistribution
)
else
{
if
(
guidebaseModel
!=
null
&&
guidebaseModel
.
IsConfirm
==
2
&&
oldOrder
.
OrderClassify
==
1
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
}
else
if
(
oldOrder
.
DeliveryMethod
==
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
else
if
(
oldOrder
.
OrderClassify
==
2
||
oldOrder
.
VersionSource
==
1
||
oldOrder
.
OrderEduType
==
1
)
{
//if (oldOrder.OrderEduType == 2)
//教育订单 下单后 直接完成 无法取消订单 无法申请售后
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Completed
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
ReceivingTime
),
DateTime
.
Now
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
FinishTime
),
DateTime
.
Now
);
}
else
if
(
oldOrder
.
OrderClassify
==
3
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
}
}
else
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
);
//2020-11-10 Add By:W start
try
else
if
(
oldOrder
.
OrderEduType
==
2
)
{
if
(
oldOrder
.
DeliveryMethod
==
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
ExpressDistribution
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
);
}
else
if
(
oldOrder
.
DeliveryMethod
==
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitReceiving
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
DeliveryTime
),
DateTime
.
Now
);
}
}
else
{
if
(
orderGoodsList
!=
null
&&
orderGoodsList
.
Any
(
x
=>
x
.
IsNoTax
==
1
))
//有不可以开发票的商品 新增记录更新缓存
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
OrderStatus
),
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
WaitSendGoods
);
//2020-11-10 Add By:W start
try
{
decimal
totalPrice
=
orderGoodsList
.
Where
(
x
=>
x
.
IsNoTax
==
1
).
Sum
(
x
=>
(
x
.
Final_Price
??
0
)
+
(
x
.
FreightMoney
??
0
));
if
(
totalPrice
>
0
)
if
(
orderGoodsList
!=
null
&&
orderGoodsList
.
Any
(
x
=>
x
.
IsNoTax
==
1
))
//有不可以开发票的商品 新增记录更新缓存
{
foreach
(
var
item
in
orderGoodsList
.
Where
(
x
=>
x
.
IsNoTax
==
1
))
decimal
totalPrice
=
orderGoodsList
.
Where
(
x
=>
x
.
IsNoTax
==
1
).
Sum
(
x
=>
(
x
.
Final_Price
??
0
)
+
(
x
.
FreightMoney
??
0
));
if
(
totalPrice
>
0
)
{
invoiceRecordDetailRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Invoice_RecordDetail
foreach
(
var
item
in
orderGoodsList
.
Where
(
x
=>
x
.
IsNoTax
==
1
))
{
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
,
ID
=
0
,
Type
=
1
,
CreateDate
=
DateTime
.
Now
,
Name
=
item
.
GoodsName
,
OrderId
=
item
.
OrderId
??
0
,
OrderDetailId
=
item
.
Id
,
GoodsPrice
=
item
.
Final_Price
??
0
,
Unit_Price
=
item
.
Unit_Price
,
Number
=
item
.
Number
,
FreightMoney
=
item
.
FreightMoney
??
0
});
}
//获取缓存信息
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
oldOrder
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
invoiceRecordDetailRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Invoice_RecordDetail
{
TenantId
=
item
.
TenantId
,
MallBaseId
=
item
.
MallBaseId
,
ID
=
0
,
Type
=
1
,
CreateDate
=
DateTime
.
Now
,
Name
=
item
.
GoodsName
,
OrderId
=
item
.
OrderId
??
0
,
OrderDetailId
=
item
.
Id
,
GoodsPrice
=
item
.
Final_Price
??
0
,
Unit_Price
=
item
.
Unit_Price
,
Number
=
item
.
Number
,
FreightMoney
=
item
.
FreightMoney
??
0
});
}
//获取缓存信息
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
oldOrder
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
TenantId
=
oldOrder
.
TenantId
,
MallBaseId
=
oldOrder
.
MallBaseId
,
TotalPrice
=
totalPrice
};
}
else
{
transactionPriceInfo
.
TotalPrice
+=
totalPrice
;
}
CacheManager
.
User
.
UserReidsCache
.
TransactionPriceSet
(
CacheKey
.
UserModuleCacheKeyConfig
.
Transaction_Price_
+
oldOrder
.
MallBaseId
,
transactionPriceInfo
,
Config
.
JwtExpirTime
);
};
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
oldOrder
.
TenantId
,
MallBaseId
=
oldOrder
.
MallBaseId
,
TotalPrice
=
totalPrice
};
}
else
{
transactionPriceInfo
.
TotalPrice
+=
totalPrice
;
}
CacheManager
.
User
.
UserReidsCache
.
TransactionPriceSet
(
CacheKey
.
UserModuleCacheKeyConfig
.
Transaction_Price_
+
oldOrder
.
MallBaseId
,
transactionPriceInfo
,
Config
.
JwtExpirTime
);
};
}
}
catch
(
Exception
ex
)
{
LogHelper
.
WriteInfo
(
"不开发票商品记录或者缓存失败:"
+
ex
.
ToString
());
}
//2020-11-10 Add By:W End
}
catch
(
Exception
ex
)
{
LogHelper
.
WriteInfo
(
"不开发票商品记录或者缓存失败:"
+
ex
.
ToString
());
}
//2020-11-10 Add By:W End
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
OrderId
),
...
...
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