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
f4e88060
Commit
f4e88060
authored
Feb 05, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
09343e4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
93 deletions
+104
-93
ReserveModule.cs
Mall.Module.Reserve/ReserveModule.cs
+67
-60
ReserveController.cs
Mall.WebApi/Controllers/Reserve/ReserveController.cs
+37
-33
No files found.
Mall.Module.Reserve/ReserveModule.cs
View file @
f4e88060
...
...
@@ -663,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>
...
...
@@ -1046,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.WebApi/Controllers/Reserve/ReserveController.cs
View file @
f4e88060
...
...
@@ -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
);
}
}
...
...
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