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
8c5049a6
Commit
8c5049a6
authored
Feb 05, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
49032125
56fae379
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
312 additions
and
248 deletions
+312
-248
RB_Education_Teacher_Extend.cs
Mall.Model/Extend/Education/RB_Education_Teacher_Extend.cs
+0
-7
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+1
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+36
-42
ReserveModule.cs
Mall.Module.Reserve/ReserveModule.cs
+68
-60
MiniProgramMsgModule.cs
Mall.Module.User/MiniProgramMsgModule.cs
+3
-1
RB_WeChatPublicAccountModule.cs
Mall.Module.User/RB_WeChatPublicAccountModule.cs
+8
-2
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+11
-10
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+11
-14
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+5
-24
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+26
-27
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+1
-3
PointController.cs
Mall.WebApi/Controllers/Education/PointController.cs
+74
-1
ERPOrderCommissionController.cs
...ebApi/Controllers/Finance/ERPOrderCommissionController.cs
+1
-1
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+2
-2
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+27
-20
ReserveController.cs
Mall.WebApi/Controllers/Reserve/ReserveController.cs
+37
-33
Mall.sln
Mall.sln
+1
-1
No files found.
Mall.Model/Extend/Education/RB_Education_Teacher_Extend.cs
View file @
8c5049a6
...
...
@@ -44,13 +44,6 @@ namespace Mall.Model.Extend.Education
/// </summary>
public
int
GoodsNum
{
get
;
set
;
}
/// <summary>
/// 当前登录人id
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 模板的时候查询老师信息
/// </summary>
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
8c5049a6
...
...
@@ -565,6 +565,7 @@ namespace Mall.Module.MarketingCenter
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"AnalyzePlusModule_educationteacher"
);
}
item
.
data
=
educationTeacherModel
;
break
;
...
...
Mall.Module.Product/OrderModule.cs
View file @
8c5049a6
This diff is collapsed.
Click to expand it.
Mall.Module.Reserve/ReserveModule.cs
View file @
8c5049a6
...
...
@@ -490,6 +490,7 @@ namespace Mall.Module.Reserve
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"AddOrUpdateServiceTargetDate"
);
return
false
;
}
}
...
...
@@ -662,76 +663,78 @@ namespace Mall.Module.Reserve
/// <param name="gradeId"></param>
/// <param name="uid"></param>
/// <returns></returns>
public
bool
DelDiscountCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
public
virtual
bool
DelDiscountCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
{
var
trans
=
discountCouponRepository
.
DbTransaction
;
bool
flag
;
try
{
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Reserve_Coupon
.
Status
),
1
},
{
nameof
(
RB_Reserve_Coupon
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
{
nameof
(
RB_Reserve_Coupon
.
Status
),
1
},
{
nameof
(
RB_Reserve_Coupon
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Reserve_Coupon
.
ID
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_Coupon
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_Coupon
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
}
}
};
flag
=
discountCouponRepository
.
Update
(
cols1
,
wheres1
);
Dictionary
<
string
,
object
>
cols
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Reserve_Coupon
.
Status
),
1
},
{
nameof
(
RB_Reserve_Coupon
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
{
nameof
(
RB_Reserve_Coupon
.
Status
),
1
},
{
nameof
(
RB_Reserve_Coupon
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Reserve_CouponProduct
.
CouponId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponProduct
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponProduct
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
}
}
};
productRepository
.
Update
(
cols
,
wheres
);
discountCouponRepository
.
DBSession
.
Commit
();
if
(
flag
)
{
flag
=
productRepository
.
Update
(
cols
,
wheres
);
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"DelDiscountCoupon"
);
discountCouponRepository
.
DBSession
.
Rollback
(
"DelDiscountCoupon"
);
return
false
;
flag
=
false
;
}
return
flag
;
}
/// <summary>
/// 删除会员套餐卡
/// </summary>
...
...
@@ -1045,66 +1048,71 @@ namespace Mall.Module.Reserve
/// <returns></returns>
public
bool
DelDiscountSelfMotion
(
int
id
,
int
uid
,
int
mallBaseId
)
{
var
trans
=
selfMotionRepository
.
DbTransaction
;
bool
flag
;
try
{
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Reserve_CouponSelfMotion
.
Status
),
1
},
{
nameof
(
RB_Reserve_CouponSelfMotion
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
{
nameof
(
RB_Reserve_CouponSelfMotion
.
Status
),
1
},
{
nameof
(
RB_Reserve_CouponSelfMotion
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotion
.
ID
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotion
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotion
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
}
}
};
flag
=
selfMotionRepository
.
Update
(
cols1
,
wheres1
);
Dictionary
<
string
,
object
>
cols
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Reserve_CouponSelfMotionMember
.
Status
),
1
},
{
nameof
(
RB_Reserve_CouponSelfMotionMember
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
{
nameof
(
RB_Reserve_CouponSelfMotionMember
.
Status
),
1
},
{
nameof
(
RB_Reserve_CouponSelfMotionMember
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotionMember
.
SelfMotionId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotionMember
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Reserve_CouponSelfMotionMember
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
}
}
};
selfMotionMemberRepository
.
Update
(
cols
,
wheres
);
selfMotionRepository
.
DBSession
.
Commit
();
if
(
flag
)
{
flag
=
selfMotionMemberRepository
.
Update
(
cols
,
wheres
);
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"DelDiscountSelfMotion"
);
selfMotionRepository
.
DBSession
.
Rollback
(
"DelDiscountSelfMotion"
);
return
false
;
flag
=
false
;
}
return
flag
;
}
...
...
Mall.Module.User/MiniProgramMsgModule.cs
View file @
8c5049a6
...
...
@@ -885,6 +885,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendEducationDynamicMsg"
);
LogHelper
.
Write
(
string
.
Format
(
"SendEducationDynamicMsg:wenXinResult:{0}"
,
wenXinResult
));
}
if
(
successCount
==
OpenIds
.
Count
())
...
...
@@ -979,6 +980,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SendCourseOrderTplMsg"
);
LogHelper
.
Write
(
string
.
Format
(
"SendCourseOrderTplMsg:wenXinResult:{0}"
,
wenXinResult
));
}
if
(
successCount
==
OpenIds
.
Count
())
...
...
@@ -1021,7 +1023,7 @@ namespace Mall.Module.User
string
Url
=
"https://api.weixin.qq.com/wxa/msg_sec_check?access_token="
+
token
;
var
postdata
=
new
{
content
=
content
content
};
wenXinResult
=
HttpHelper
.
HttpPost
(
Url
,
JsonHelper
.
Serialize
(
postdata
),
""
);
LogHelper
.
WriteInfo
(
"下单成功发送订阅消息:"
+
wenXinResult
);
...
...
Mall.Module.User/RB_WeChatPublicAccountModule.cs
View file @
8c5049a6
...
...
@@ -48,13 +48,14 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderSucceedMsg_1"
);
try
{
access_token
=
AccessTokenContainer
.
GetAccessTokenResult
(
appletWeChatModel
.
AppId
).
access_token
;
}
catch
(
Exception
exs
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
exs
,
"SendOrderSucceedMsg_2"
);
}
}
if
(
string
.
IsNullOrWhiteSpace
(
access_token
))
...
...
@@ -107,6 +108,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderSucceedMsg_1"
);
}
}
}
...
...
@@ -114,6 +116,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderSucceedMsg_2"
);
return
false
;
}
}
...
...
@@ -149,13 +152,14 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderCancelMsg_1"
);
try
{
access_token
=
AccessTokenContainer
.
GetAccessTokenResult
(
appletWeChatModel
.
AppId
).
access_token
;
}
catch
(
Exception
exs
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
exs
,
"SendOrderCancelMsg_2"
);
}
}
...
...
@@ -201,6 +205,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderCancelMsg_3"
);
}
}
}
...
...
@@ -208,6 +213,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SendOrderCancelMsg_4"
);
return
false
;
}
}
...
...
Mall.Module.User/UserCommonModule.cs
View file @
8c5049a6
...
...
@@ -432,10 +432,12 @@ namespace Mall.Module.User
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
oldOrder
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
oldOrder
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
oldOrder
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
totalPrice
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
oldOrder
.
TenantId
,
MallBaseId
=
oldOrder
.
MallBaseId
,
TotalPrice
=
totalPrice
};
}
else
{
...
...
@@ -576,7 +578,7 @@ namespace Mall.Module.User
//赠送粉象等级(+VIP返佣) ld 2020-08-03
var
FXCOrder
=
oldOrder
.
RefMapperTo
<
RB_Goods_Order_Extend
>();
FXCOrder
.
DetailList
=
orderGoodsList
;
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
InsertPresentFXGradeCommission
(
FXCOrder
,
Out_Trade_No
,
Transaction_Id
,
PayWay
,
oldOrder
.
UserId
??
0
,
oldOrder
.
OrderId
));
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
InsertPresentFXGradeCommission
(
FXCOrder
,
Out_Trade_No
,
oldOrder
.
UserId
??
0
,
oldOrder
.
OrderId
));
if
(
oldOrder
.
OrderClassify
==
2
)
{
...
...
@@ -610,7 +612,7 @@ namespace Mall.Module.User
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"InsertOrderPayInfo"
);
}
appletWeChatModule
.
SendOrderSucceedMsg
(
oldOrder
.
TenantId
,
oldOrder
.
MallBaseId
,
umodel
.
OpenId
,
oldOrder
.
OrderNo
,
oldOrder
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
(
oldOrder
.
Income
??
0
).
ToString
(),
goodsName
);
...
...
@@ -878,7 +880,7 @@ namespace Mall.Module.User
//获取订单商品
var
orderGoodsList
=
goodsOrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
{
TenantId
=
oldOrder
.
TenantId
,
MallBaseId
=
oldOrder
.
MallBaseId
,
OrderId
=
oldOrder
.
OrderId
});
oldOrder
.
DetailList
=
orderGoodsList
;
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
InsertPresentFXGradeCommission
(
oldOrder
,
oldOrder
.
MerchantsNo
,
""
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
oldOrder
.
UserId
??
0
,
oldOrder
.
OrderId
));
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
InsertPresentFXGradeCommission
(
oldOrder
,
oldOrder
.
MerchantsNo
,
oldOrder
.
UserId
??
0
,
oldOrder
.
OrderId
));
}
...
...
@@ -888,7 +890,7 @@ namespace Mall.Module.User
/// <param name="demodel"></param>
/// <param name="umodel"></param>
/// <param name="OrderId"></param>
private
void
InsertPresentFXGradeCommission
(
RB_Goods_Order_Extend
demodel
,
string
Out_Trade_No
,
string
Transaction_Id
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
PayWay
,
int
UserId
,
int
OrderId
)
private
void
InsertPresentFXGradeCommission
(
RB_Goods_Order_Extend
demodel
,
string
Out_Trade_No
,
int
UserId
,
int
OrderId
)
{
var
basicModel
=
distributor_BasicsRepository
.
GetList
(
new
RB_Distributor_Basics_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
if
((
basicModel
?.
IsEnableFXGrade
??
2
)
==
1
)
...
...
@@ -1444,8 +1446,7 @@ namespace Mall.Module.User
/// <param name="OrderId">vip购买单号id</param>
/// <param name="BuyUserId">购买人</param>
/// <returns></returns>
//public bool InsertVipBuyCommission(int OrderId, int BuyUserId,int IsFristBuy,int TenantId,int MallBaseId)
public
bool
InsertVipBuyCommission
(
int
BuyUserId
,
int
OrderId
,
string
Out_Trade_No
,
string
Transaction_Id
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
PayWay
,
decimal
Money
,
DateTime
Time_End
)
public
bool
InsertVipBuyCommission
(
int
BuyUserId
,
int
OrderId
,
string
Out_Trade_No
,
decimal
Money
,
DateTime
Time_End
)
{
bool
flag
=
false
;
try
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
8c5049a6
...
...
@@ -24,14 +24,11 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[
EnableCors
(
"AllowCors"
)]
public
class
WeChatNotifyController
:
Controller
{
private
static
object
_lock
=
new
object
();
UserCommonModule
userCommonModule
=
new
UserCommonModule
();
//public UserModule userModule = new UserModule();
Module
.
MarketingCenter
.
RechargeModule
rechargeModule
=
new
Module
.
MarketingCenter
.
RechargeModule
();
Module
.
Education
.
PointModule
pointModule
=
new
Module
.
Education
.
PointModule
();
private
IHttpContextAccessor
_accessor
;
private
readonly
object
_lock
=
new
object
();
readonly
UserCommonModule
userCommonModule
=
new
UserCommonModule
();
readonly
Module
.
MarketingCenter
.
RechargeModule
rechargeModule
=
new
Module
.
MarketingCenter
.
RechargeModule
();
readonly
Module
.
Education
.
PointModule
pointModule
=
new
Module
.
Education
.
PointModule
();
private
readonly
IHttpContextAccessor
_accessor
;
/// <summary>
/// 构造函数
...
...
@@ -185,8 +182,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
region
新增订单支付信息
// pointModule.UpdatePointOrder(UserId, OrderId, sOrderNo, TransactionId, Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, PayType, dPaid, PayDate);
pointModule
.
UpdatePointOrder
(
new
Model
.
Extend
.
Point
.
RB_Point_Order_Extend
{
ID
=
OrderId
,
OrderNo
=
sOrderNo
,
Income
=
dPaid
,
MerchantsNo
=
TransactionId
,
PaymentTime
=
PayDate
});
// pointModule.UpdatePointOrder(UserId, OrderId, sOrderNo, TransactionId, Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, PayType, dPaid, PayDate);
pointModule
.
UpdatePointOrder
(
new
Model
.
Extend
.
Point
.
RB_Point_Order_Extend
{
ID
=
OrderId
,
OrderNo
=
sOrderNo
,
Income
=
dPaid
,
MerchantsNo
=
TransactionId
,
PaymentTime
=
PayDate
});
#
endregion
}
...
...
@@ -221,10 +218,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
var
req
=
new
RequestHandler
();
App_Code
.
PayUtil
PayUtil
=
new
App_Code
.
PayUtil
();
var
result
=
PayUtil
.
NotifyZhouTian
(
_accessor
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian返回信息进来了"
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian返回信息进来了"
);
if
(
result
.
IsSuccess
)
{
LogHelper
.
WriteInfo
(
"NotifyZhouTian回调成功:"
+
result
.
ToString
());
LogHelper
.
WriteInfo
(
"NotifyZhouTian回调成功:"
+
result
.
ToString
());
var
dic
=
((
Dictionary
<
string
,
string
>)
result
.
Data
);
//开始回写订单状态
lock
(
_lock
)
...
...
@@ -240,7 +237,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
DateTime
PayDate
=
DateTime
.
ParseExact
(
dic
[
"PayDate"
],
"yyyyMMddHHmmss"
,
System
.
Globalization
.
CultureInfo
.
CurrentCulture
);
//转换时间// Convert.ToDateTime(dic["PayDate"]);
#
region
新增订单支付信息
LogHelper
.
WriteInfo
(
"NotifyZhouTian订单信息"
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian订单信息"
);
userCommonModule
.
InsertOrderPayInfo
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
PayType
,
dPaid
,
PayDate
,
0
);
...
...
@@ -350,7 +347,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
region
修改会员购买支付信息
userCommonModule
.
InsertVipBuyCommission
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
dPaid
,
PayDate
);
userCommonModule
.
InsertVipBuyCommission
(
UserId
,
OrderId
,
sOrderNo
,
dPaid
,
PayDate
);
#
endregion
}
//告诉微信我们已经处理成功,不需要再调用我们的接口了
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
8c5049a6
...
...
@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[
EnableCors
(
"AllowCors"
)]
public
class
WeChatPayController
:
BaseController
{
private
IHttpContextAccessor
_accessor
;
private
readonly
IHttpContextAccessor
_accessor
;
/// <summary>
/// 构造函数
...
...
@@ -47,7 +47,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <summary>
/// 商户小程序处理类
/// </summary>
private
Module
.
User
.
MiniProgramModule
programModule
=
new
Module
.
User
.
MiniProgramModule
();
private
readonly
MiniProgramModule
programModule
=
new
MiniProgramModule
();
private
readonly
UserModule
userModule
=
new
UserModule
();
private
readonly
RechargeModule
rechargeModule
=
new
RechargeModule
();
private
readonly
UserVipModule
userVipModule
=
new
UserVipModule
();
...
...
@@ -501,8 +501,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestReturn
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wx1bf3a7c76b10bb6d"
,
WeChatApiSecret
=
"1e54ed9de09f99d87970aaf798cbc936"
,
WeChatPayMerchants
=
"1554826431"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wx1bf3a7c76b10bb6d"
,
WeChatApiSecret
=
"1e54ed9de09f99d87970aaf798cbc936"
,
WeChatPayMerchants
=
"1554826431"
};
string
RefundOrderNo
=
"2020052916044326411"
;
var
pram
=
new
Common
.
Pay
.
WeChatPat
.
PayParam
()
{
...
...
@@ -545,10 +544,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestTransfersOrder
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
string
RefundOrderNo
=
"20200529160443264111"
;
var
Robj
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
RefundOrderNo
,
Convert
.
ToDecimal
(
"0.01"
),
"21233"
,
"ow_7I5XC1-RGwwk8QANBmWKYKmOc"
,
miniProgram
,
_accessor
);
;
return
ApiResult
.
Success
(
""
,
Robj
);
}
...
...
@@ -568,45 +565,29 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestVIPBuyPayOrder
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
string
RefundOrderNo
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
// var parmsInfo = RequestParm;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
string
orderNo
=
parms
.
GetStringValue
(
"orderNo"
);
int
orderId
=
parms
.
GetInt
(
"orderId"
);
int
userId
=
parms
.
GetInt
(
"userId"
);
var
Robj
=
userCommonModule
.
InsertVipBuyCommission
(
userId
,
orderId
,
orderNo
,
orderNo
+
"1111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
Convert
.
ToDecimal
(
365.00
),
System
.
DateTime
.
Now
);
var
Robj
=
userCommonModule
.
InsertVipBuyCommission
(
userId
,
orderId
,
orderNo
,
Convert
.
ToDecimal
(
365.00
),
System
.
DateTime
.
Now
);
return
ApiResult
.
Success
(
""
,
Robj
);
}
public
ApiResult
InsertOrderPayInfo
()
{
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
request
.
msg
.
ToString
());
userCommonModule
.
InsertOrderPayInfo
(
demodel
.
UserId
??
0
,
demodel
.
OrderId
,
demodel
.
OrderNo
,
"s1111111111111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
"test"
,
(
demodel
.
Income
??
0
),
System
.
DateTime
.
Now
,
0
);
return
ApiResult
.
Success
(
""
);
}
public
ApiResult
TestUpdatePointOrder
()
{
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Point_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_Order_Extend
>(
request
.
msg
.
ToString
());
//ID = OrderId, OrderNo = sOrderNo, Income = dPaid, MerchantsNo = TransactionId, PaymentTime = PayDate
pointModule
.
UpdatePointOrder
(
demodel
);
return
ApiResult
.
Success
(
""
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
8c5049a6
...
...
@@ -34,9 +34,9 @@ namespace Mall.WebApi.Controllers.Education
{
private
readonly
EducationModule
educationModule
=
new
EducationModule
();
private
readonly
DynamicModule
dynamicModule
=
new
DynamicModule
();
private
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
private
Module
.
Product
.
ProductModule
productModule
=
new
Module
.
Product
.
ProductModule
();
private
readonly
M
odule
.
User
.
MiniProgramModule
programModule
=
new
Module
.
User
.
MiniProgramModule
();
private
readonly
UserModule
UserModule
=
new
UserModule
();
private
readonly
Module
.
Product
.
ProductModule
productModule
=
new
Module
.
Product
.
ProductModule
();
private
readonly
M
iniProgramModule
programModule
=
new
MiniProgramModule
();
private
readonly
Module
.
MarketingCenter
.
SurveyModule
surveyModule
=
new
Module
.
MarketingCenter
.
SurveyModule
();
#
region
课程卡
...
...
@@ -87,7 +87,6 @@ namespace Mall.WebApi.Controllers.Education
[
HttpPost
]
public
ApiResult
GrantCoupon
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Education_MemberCoupon_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
userInfo
.
TenantId
;
...
...
@@ -149,20 +148,22 @@ namespace Mall.WebApi.Controllers.Education
}
RB_Education_MemberCoupon_Extend
memberCoupon
=
new
RB_Education_MemberCoupon_Extend
();
memberCoupon
.
Id
=
0
;
memberCoupon
.
UserId
=
userInfo
.
UserId
;
memberCoupon
.
Description
=
oldLogisticsModel
.
Describe
;
memberCoupon
.
CreateDate
=
System
.
DateTime
.
Now
;
memberCoupon
.
TenantId
=
userInfo
.
TenantId
;
memberCoupon
.
MallBaseId
=
userInfo
.
MallBaseId
;
memberCoupon
.
Remarks
=
""
;
memberCoupon
.
CouponId
=
oldLogisticsModel
.
ID
;
memberCoupon
.
Name
=
oldLogisticsModel
.
Name
;
memberCoupon
.
HeXiao
=
oldLogisticsModel
.
HeXiao
;
memberCoupon
.
UseHeXiao
=
0
;
memberCoupon
.
UseType
=
oldLogisticsModel
.
UseType
;
if
(
oldLogisticsModel
.
IndateType
==
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
)
RB_Education_MemberCoupon_Extend
memberCoupon
=
new
RB_Education_MemberCoupon_Extend
{
Id
=
0
,
UserId
=
userInfo
.
UserId
,
Description
=
oldLogisticsModel
.
Describe
,
CreateDate
=
System
.
DateTime
.
Now
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
Remarks
=
""
,
CouponId
=
oldLogisticsModel
.
ID
,
Name
=
oldLogisticsModel
.
Name
,
HeXiao
=
oldLogisticsModel
.
HeXiao
,
UseHeXiao
=
0
,
UseType
=
oldLogisticsModel
.
UseType
};
if
(
oldLogisticsModel
.
IndateType
==
IndateTypeEnum
.
DayHorizon
)
{
memberCoupon
.
StartDate
=
System
.
DateTime
.
Now
;
LogHelper
.
WriteInfo
(
userInfo
.
Name
+
"课程卡领取时间:"
+
memberCoupon
.
StartDate
);
...
...
@@ -173,8 +174,10 @@ namespace Mall.WebApi.Controllers.Education
memberCoupon
.
StartDate
=
oldLogisticsModel
.
StartDate
;
memberCoupon
.
EndDate
=
oldLogisticsModel
.
EndDate
;
}
var
memberList
=
new
List
<
RB_Education_MemberCoupon_Extend
>();
memberList
.
Add
(
memberCoupon
);
var
memberList
=
new
List
<
RB_Education_MemberCoupon_Extend
>
{
memberCoupon
};
bool
result
=
educationModule
.
GrantCoupon
(
memberList
,
oldLogisticsModel
);
if
(
result
)
{
...
...
@@ -230,16 +233,14 @@ namespace Mall.WebApi.Controllers.Education
[
HttpPost
]
public
ApiResult
ShareEducationCoupon
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Education_Coupon_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
UserId
=
userInfo
.
UserId
;
RB_Education_Coupon_Extend
resultModel
=
new
RB_Education_Coupon_Extend
()
;
RB_Education_Coupon_Extend
resultModel
;
if
(
query
.
TriggerType
==
2
)
{
query
.
TriggerType
=
4
;
resultModel
=
educationModule
.
AutoEducationCoupon
(
query
);
if
(
resultModel
==
null
||
resultModel
.
ID
==
0
)
...
...
@@ -450,7 +451,6 @@ namespace Mall.WebApi.Controllers.Education
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
parms
.
GetInt
(
"GoodsId"
,
0
);
int
Time
=
parms
.
GetInt
(
"Time"
,
10
);
//秒
int
CourseId
=
parms
.
GetInt
(
"CourseId"
,
0
);
//课程id
if
(
GoodsId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递课程id"
);
...
...
@@ -792,7 +792,7 @@ namespace Mall.WebApi.Controllers.Education
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"InsertOrderPayInfo"
);
return
ApiResult
.
Failed
(
"评论内容检测失败,请稍后再试"
);
}
#
endregion
...
...
@@ -1621,7 +1621,7 @@ namespace Mall.WebApi.Controllers.Education
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetDynamicComment"
);
return
ApiResult
.
Failed
(
"评论内容检测失败,请稍后再试"
);
}
#
endregion
...
...
@@ -1674,7 +1674,6 @@ namespace Mall.WebApi.Controllers.Education
[
HttpPost
]
public
ApiResult
GetDynamicMessageCount
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
int
messageCount
=
0
;
if
(
userInfo
!=
null
&&
userInfo
.
UserId
>
0
)
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
8c5049a6
...
...
@@ -26,7 +26,6 @@ namespace Mall.WebApi.Controllers.Education
{
private
readonly
EducationModule
educationModule
=
new
EducationModule
();
private
readonly
ProductModule
productModule
=
new
ProductModule
();
private
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
private
readonly
DynamicModule
dynamicModule
=
new
DynamicModule
();
#
region
课程
...
...
@@ -342,8 +341,7 @@ namespace Mall.WebApi.Controllers.Education
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetArticleModel"
);
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
...
...
Mall.WebApi/Controllers/Education/PointController.cs
View file @
8c5049a6
...
...
@@ -234,7 +234,6 @@ namespace Mall.WebApi.Controllers.Education
[
HttpPost
]
public
ApiResult
GetPointOrderPageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
UserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
RB_Point_TeacherCourseOrder_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_TeacherCourseOrder_Extend
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -314,7 +313,81 @@ namespace Mall.WebApi.Controllers.Education
});
}
/// <summary>
/// 约课订单excel下载
/// </summary>
[
HttpPost
]
public
FileContentResult
GetPointOrderListToExcel
()
{
var
userInfo
=
UserInfo
;
RB_Point_TeacherCourseOrder_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_TeacherCourseOrder_Extend
>(
RequestParm
.
msg
.
ToString
());
string
ExcelName
=
"约课列表"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)
+
".xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
ExcelDataSource
header
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
"单号"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"课程分类"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"课程名称"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"教师"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"学习时间"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"学习时长"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"学习总时长"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"房间信息"
)
{
CellWidth
=
25
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"总点数"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"实际点数"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"基础点数"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"用户名称"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"报名时间"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
new
ExcelColumn
(
value
:
"状态"
)
{
CellWidth
=
15
,
HAlignmentEnum
=
HAlignmentEnum
.
CENTER
,
VAlignmentEnum
=
VAlignmentEnum
.
CENTER
},
}
};
slist
.
Add
(
header
);
try
{
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
var
list
=
pointModule
.
GetPointOrderPageList
(
1
,
99999
,
out
long
count
,
demodel
);
#
region
组装数据
foreach
(
var
item
in
list
)
{
ExcelDataSource
datarow
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>(
30
)
{
new
ExcelColumn
(
value
:
item
.
ID
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
CourseClassType
.
GetEnumName
()){
},
new
ExcelColumn
(
value
:
item
.
CourseName
){
},
new
ExcelColumn
(
value
:
item
.
TeacherName
){
},
new
ExcelColumn
(
value
:
item
.
StudyDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)){
},
new
ExcelColumn
(
value
:
item
.
StudyDuration
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
TotalStudyDuration
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
RoomInfo
){
},
new
ExcelColumn
(
value
:
item
.
TotalPointNum
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
ActualPointNum
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
BasePointNum
.
ToString
()){
},
new
ExcelColumn
(
value
:
item
.
UserName
+
"("
+
item
.
UserId
.
ToString
()+
")"
){
},
new
ExcelColumn
(
value
:(
item
.
CreateDate
.
HasValue
?
item
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
)){
},
new
ExcelColumn
(
value
:
item
.
OrderStaus
.
GetEnumName
()){
},
},
ColumnHight
=
30
};
slist
.
Add
(
datarow
);
}
#
endregion
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
ExcelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
string
.
Format
(
"GetFileFromWebApi_requestData: {0}"
,
JsonHelper
.
Serialize
(
RequestParm
)));
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
ExcelName
);
}
}
...
...
Mall.WebApi/Controllers/Finance/ERPOrderCommissionController.cs
View file @
8c5049a6
...
...
@@ -405,7 +405,7 @@ namespace Mall.WebApi.Controllers.Finance
return
ApiResult
.
ParamIsNull
(
"只能修改和平的"
);
}
bool
flag
=
orderModule
.
SetECUpdateOrderOtherMoney
(
model
,
Money
,
OtherType
,
Type
,
Remark
);
bool
flag
=
orderModule
.
SetECUpdateOrderOtherMoney
(
model
,
Money
,
OtherType
,
Type
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
8c5049a6
...
...
@@ -1032,7 +1032,7 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletMyOrderAfterSaleInfo
(
OrderDetailId
,
userInfo
.
UserId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
return
orderModule
.
GetAppletMyOrderAfterSaleInfo
(
OrderDetailId
);
}
/// <summary>
...
...
@@ -1137,7 +1137,7 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletOrderBuyerToDeliverInfo
(
ReOrderId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
return
orderModule
.
GetAppletOrderBuyerToDeliverInfo
(
ReOrderId
);
}
/// <summary>
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
8c5049a6
...
...
@@ -842,7 +842,6 @@ namespace Mall.WebApi.Controllers.MallBase
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
//类型 1修改备注 2修改金额 3强制取消 4放入回收站 5确认收货 6确认完成 7回收恢复 8回收删除
string
Remark
=
parms
.
GetStringValue
(
"Remark"
);
decimal
Income
=
parms
.
GetDecimal
(
"Income"
);
string
Address
=
parms
.
GetStringValue
(
"Address"
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递id"
);
...
...
@@ -937,7 +936,7 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
(
"参数有误"
);
}
bool
flag
=
orderModule
.
SetOrderOperation
(
omodel
,
Type
,
Remark
,
Income
,
Address
,
req
.
TenantId
,
req
.
MallBaseId
,
_accessor
);
bool
flag
=
orderModule
.
SetOrderOperation
(
omodel
,
Type
,
Remark
,
Income
,
req
.
TenantId
,
req
.
MallBaseId
,
_accessor
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -1031,10 +1030,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
omodel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
omodel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
omodel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
omodel
.
TenantId
,
MallBaseId
=
omodel
.
MallBaseId
,
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
};
}
else
{
...
...
@@ -1301,10 +1302,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
omodel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
omodel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
omodel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
omodel
.
TenantId
,
MallBaseId
=
omodel
.
MallBaseId
,
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
};
}
else
{
...
...
@@ -2978,7 +2981,7 @@ namespace Mall.WebApi.Controllers.MallBase
Name
=
y
.
OrderIntroduction
?.
Name
??
""
,
Commission
=
y
.
OrderIntroduction
?.
Commission
??
0
,
CommissionState
=
y
.
OrderIntroduction
?.
CommissionState
??
1
,
Remark
=
y
.
OrderIntroduction
?.
Remark
,
y
.
OrderIntroduction
?.
Remark
,
}
}),
x
.
Consignee
,
...
...
@@ -3217,7 +3220,7 @@ namespace Mall.WebApi.Controllers.MallBase
Name
=
y
.
SmallShopsCommission
?.
Name
??
""
,
Commission
=
y
.
SmallShopsCommission
?.
Commission
??
0
,
CommissionState
=
y
.
SmallShopsCommission
?.
CommissionState
??
1
,
Remark
=
y
.
SmallShopsCommission
?.
Remark
,
y
.
SmallShopsCommission
?.
Remark
,
}
}),
x
.
Consignee
,
...
...
@@ -3817,10 +3820,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
detailModel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
orderModel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
orderModel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
Refund
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
orderModel
.
TenantId
,
MallBaseId
=
orderModel
.
MallBaseId
,
TotalPrice
=
Refund
*
-
1
};
}
else
{
...
...
@@ -4005,10 +4010,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
orderModel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
orderModel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
orderModel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
Refund
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
orderModel
.
TenantId
,
MallBaseId
=
orderModel
.
MallBaseId
,
TotalPrice
=
Refund
*
-
1
};
}
else
{
...
...
Mall.WebApi/Controllers/Reserve/ReserveController.cs
View file @
8c5049a6
...
...
@@ -28,8 +28,8 @@ namespace Mall.WebApi.Controllers.Reserve
public
class
ReserveController
:
BaseController
{
private
readonly
ReserveModule
reserveModule
=
new
ReserveModule
();
private
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
private
readonly
ReserveModule
reserveModule
=
AOPHelper
.
CreateAOPObject
<
ReserveModule
>
();
private
readonly
Module
.
User
.
UserModule
UserModule
=
new
Module
.
User
.
UserModule
();
/// <summary>
/// 门店处理类对象
/// </summary>
...
...
@@ -338,7 +338,6 @@ namespace Mall.WebApi.Controllers.Reserve
[
HttpPost
]
public
ApiResult
GetServiceTargetDateList
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Reserve_ServiceTargetDate_Extend
>(
RequestParm
.
msg
.
ToString
());
var
list
=
reserveModule
.
GetServiceTargetDateList
(
query
);
List
<
string
>
result
=
new
List
<
string
>();
...
...
@@ -464,10 +463,11 @@ namespace Mall.WebApi.Controllers.Reserve
var
oldLogisticsModel
=
reserveModule
.
GetDiscountCouponList
(
query
).
FirstOrDefault
();
if
(
oldLogisticsModel
==
null
)
{
oldLogisticsModel
=
new
RB_Reserve_Coupon_Extend
();
oldLogisticsModel
.
IndateType
=
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
;
oldLogisticsModel
=
new
RB_Reserve_Coupon_Extend
{
IndateType
=
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
};
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
...
...
@@ -643,19 +643,21 @@ namespace Mall.WebApi.Controllers.Reserve
{
if
(!
string
.
IsNullOrWhiteSpace
(
item
))
{
RB_Reserve_MemberCoupon_Extend
memberCoupon
=
new
RB_Reserve_MemberCoupon_Extend
();
memberCoupon
.
Id
=
0
;
memberCoupon
.
UserId
=
Convert
.
ToInt32
(
item
);
memberCoupon
.
Description
=
oldLogisticsModel
.
Describe
;
memberCoupon
.
CreateDate
=
System
.
DateTime
.
Now
;
memberCoupon
.
TenantId
=
oldLogisticsModel
.
TenantId
;
memberCoupon
.
MallBaseId
=
oldLogisticsModel
.
MallBaseId
;
memberCoupon
.
Remarks
=
""
;
memberCoupon
.
CouponId
=
oldLogisticsModel
.
ID
;
memberCoupon
.
Name
=
oldLogisticsModel
.
Name
;
memberCoupon
.
UseType
=
oldLogisticsModel
.
UseType
;
memberCoupon
.
HeXiao
=
oldLogisticsModel
.
HeXiao
;
memberCoupon
.
UseHeXiao
=
0
;
RB_Reserve_MemberCoupon_Extend
memberCoupon
=
new
RB_Reserve_MemberCoupon_Extend
{
Id
=
0
,
UserId
=
Convert
.
ToInt32
(
item
),
Description
=
oldLogisticsModel
.
Describe
,
CreateDate
=
System
.
DateTime
.
Now
,
TenantId
=
oldLogisticsModel
.
TenantId
,
MallBaseId
=
oldLogisticsModel
.
MallBaseId
,
Remarks
=
""
,
CouponId
=
oldLogisticsModel
.
ID
,
Name
=
oldLogisticsModel
.
Name
,
UseType
=
oldLogisticsModel
.
UseType
,
HeXiao
=
oldLogisticsModel
.
HeXiao
,
UseHeXiao
=
0
};
if
(
oldLogisticsModel
.
IndateType
==
Common
.
Enum
.
MarketingCenter
.
IndateTypeEnum
.
DayHorizon
)
{
memberCoupon
.
StartDate
=
System
.
DateTime
.
Now
;
...
...
@@ -1022,20 +1024,22 @@ namespace Mall.WebApi.Controllers.Reserve
var
tempOrderList
=
orderList
.
Where
(
x
=>
x
.
ServicepersonalId
==
item
.
Id
&&
day
<=
Convert
.
ToDateTime
(
x
.
ServiceDate
+
" "
+
x
.
ServiceTime
)
&&
Convert
.
ToDateTime
(
x
.
ServiceDate
+
" "
+
x
.
ServiceTime
)
<
day
.
AddMinutes
(
30
));
foreach
(
var
itemOrder
in
tempOrderList
)
{
OrderKanBan
orderModel
=
new
OrderKanBan
();
orderModel
.
Id
=
item
.
Id
;
orderModel
.
Name
=
item
.
Name
;
orderModel
.
GoodsName
=
itemOrder
.
GoodsName
;
orderModel
.
ServiceTime
=
itemOrder
.
ServiceTime
;
orderModel
.
SystemServiceTime
=
nowTimeInfo
;
orderModel
.
GoodServiceTime
=
itemOrder
.
GoodServiceTime
;
orderModel
.
UserName
=
itemOrder
.
UserName
;
orderModel
.
UserPhoto
=
itemOrder
.
UserPhoto
;
orderModel
.
OrderId
=
itemOrder
.
OrderId
??
0
;
orderModel
.
OrderDetailId
=
itemOrder
.
Id
;
orderModel
.
Number
=
itemOrder
.
Number
??
0
;
orderModel
.
BuyerMessage
=
itemOrder
.
BuyerMessage
;
orderModel
.
Mobile
=
itemOrder
.
Mobile
;
OrderKanBan
orderModel
=
new
OrderKanBan
{
Id
=
item
.
Id
,
Name
=
item
.
Name
,
GoodsName
=
itemOrder
.
GoodsName
,
ServiceTime
=
itemOrder
.
ServiceTime
,
SystemServiceTime
=
nowTimeInfo
,
GoodServiceTime
=
itemOrder
.
GoodServiceTime
,
UserName
=
itemOrder
.
UserName
,
UserPhoto
=
itemOrder
.
UserPhoto
,
OrderId
=
itemOrder
.
OrderId
??
0
,
OrderDetailId
=
itemOrder
.
Id
,
Number
=
itemOrder
.
Number
??
0
,
BuyerMessage
=
itemOrder
.
BuyerMessage
,
Mobile
=
itemOrder
.
Mobile
};
item
.
OrderList
.
Add
(
orderModel
);
}
}
...
...
Mall.sln
View file @
8c5049a6
...
...
@@ -55,7 +55,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Education", "Ma
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Reserve", "Mall.Module.Reserve\Mall.Module.Reserve.csproj", "{449E8584-B4D1-4796-81EE-F7D70536C91D}"
EndProject
Project("{
FAE04EC0-301F-11D3-BF4B-00C04F79EFBC
}") = "Mall.Module.TradePavilion", "Mall.Module.TradePavilion\Mall.Module.TradePavilion.csproj", "{3982D5CA-D5BF-45FD-BCDA-FF6694D409D3}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556
}") = "Mall.Module.TradePavilion", "Mall.Module.TradePavilion\Mall.Module.TradePavilion.csproj", "{3982D5CA-D5BF-45FD-BCDA-FF6694D409D3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
...
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