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
821dd112
Commit
821dd112
authored
Aug 31, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
386643f5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
68 deletions
+49
-68
CouponModule.cs
Mall.Module.MarketingCenter/CouponModule.cs
+10
-17
IntegralModule.cs
Mall.Module.MarketingCenter/IntegralModule.cs
+3
-4
MiniprogramPageTemplModule.cs
Mall.Module.MarketingCenter/MiniprogramPageTemplModule.cs
+5
-9
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+2
-3
ShareModule.cs
Mall.Module.MarketingCenter/ShareModule.cs
+8
-15
StatisticsModule.cs
Mall.Module.MarketingCenter/StatisticsModule.cs
+17
-13
TemplateMarketModule.cs
Mall.Module.MarketingCenter/TemplateMarketModule.cs
+4
-7
No files found.
Mall.Module.MarketingCenter/CouponModule.cs
View file @
821dd112
...
@@ -20,15 +20,15 @@ namespace Mall.Module.MarketingCenter
...
@@ -20,15 +20,15 @@ namespace Mall.Module.MarketingCenter
{
{
public
class
CouponModule
public
class
CouponModule
{
{
private
RB_CouponRepository
couponRepository
=
new
RB_CouponRepository
();
private
readonly
RB_CouponRepository
couponRepository
=
new
RB_CouponRepository
();
private
RB_DiscountCouponRepository
discountCouponRepository
=
new
RB_DiscountCouponRepository
();
private
readonly
RB_DiscountCouponRepository
discountCouponRepository
=
new
RB_DiscountCouponRepository
();
private
RB_DiscountCoupon_ProductRepository
productRepository
=
new
RB_DiscountCoupon_ProductRepository
();
private
readonly
RB_DiscountCoupon_ProductRepository
productRepository
=
new
RB_DiscountCoupon_ProductRepository
();
private
Repository
.
User
.
RB_Member_CouponRepository
memberCouponRepository
=
new
Repository
.
User
.
RB_Member_CouponRepository
();
private
readonly
RB_Member_CouponRepository
memberCouponRepository
=
new
Repository
.
User
.
RB_Member_CouponRepository
();
private
RB_Coupon_SelfMotionMemberRepository
selfMotionMemberRepository
=
new
RB_Coupon_SelfMotionMemberRepository
();
private
readonly
RB_Coupon_SelfMotionMemberRepository
selfMotionMemberRepository
=
new
RB_Coupon_SelfMotionMemberRepository
();
private
RB_Coupon_SelfMotionRepository
selfMotionRepository
=
new
RB_Coupon_SelfMotionRepository
();
private
readonly
RB_Coupon_SelfMotionRepository
selfMotionRepository
=
new
RB_Coupon_SelfMotionRepository
();
/// <summary>
/// <summary>
/// 会员信息
/// 会员信息
...
@@ -262,8 +262,8 @@ namespace Mall.Module.MarketingCenter
...
@@ -262,8 +262,8 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
DelDiscountCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
public
bool
DelDiscountCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
{
{
bool
flag
=
false
;
var
trans
=
discountCouponRepository
.
DbTransaction
;
var
trans
=
discountCouponRepository
.
DbTransaction
;
bool
flag
;
try
try
{
{
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
...
@@ -338,8 +338,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -338,8 +338,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
DelMemberCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
public
bool
DelMemberCoupon
(
int
id
,
int
uid
,
int
mallBaseId
)
{
{
bool
flag
=
false
;
bool
flag
;
try
try
{
{
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
...
@@ -431,20 +430,14 @@ namespace Mall.Module.MarketingCenter
...
@@ -431,20 +430,14 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
GrantCoupon
(
List
<
RB_Member_DiscountCoupon_Extend
>
list
,
RB_DiscountCoupon_Extend
model
)
public
bool
GrantCoupon
(
List
<
RB_Member_DiscountCoupon_Extend
>
list
,
RB_DiscountCoupon_Extend
model
)
{
{
bool
flag
=
false
;
var
trans
=
memberCouponRepository
.
DbTransaction
;
var
trans
=
memberCouponRepository
.
DbTransaction
;
bool
flag
;
try
try
{
{
//foreach (var item in list)
//{
flag
=
memberCouponRepository
.
InsertBatch
(
list
,
trans
);
flag
=
memberCouponRepository
.
InsertBatch
(
list
,
trans
);
// }
if
(
model
!=
null
&&
flag
)
if
(
model
!=
null
&&
flag
)
{
{
Dictionary
<
string
,
object
>
cols1
;
Dictionary
<
string
,
object
>
cols1
;
if
(
model
.
TotalNum
!=
-
1
)
if
(
model
.
TotalNum
!=
-
1
)
{
{
cols1
=
new
Dictionary
<
string
,
object
>()
cols1
=
new
Dictionary
<
string
,
object
>()
...
@@ -665,8 +658,8 @@ namespace Mall.Module.MarketingCenter
...
@@ -665,8 +658,8 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
DelDiscountSelfMotion
(
int
id
,
int
uid
,
int
mallBaseId
)
public
bool
DelDiscountSelfMotion
(
int
id
,
int
uid
,
int
mallBaseId
)
{
{
bool
flag
=
false
;
var
trans
=
selfMotionRepository
.
DbTransaction
;
var
trans
=
selfMotionRepository
.
DbTransaction
;
bool
flag
;
try
try
{
{
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
cols1
=
new
Dictionary
<
string
,
object
>()
...
...
Mall.Module.MarketingCenter/IntegralModule.cs
View file @
821dd112
...
@@ -12,9 +12,10 @@ namespace Mall.Module.MarketingCenter
...
@@ -12,9 +12,10 @@ namespace Mall.Module.MarketingCenter
{
{
public
class
IntegralModule
public
class
IntegralModule
{
{
private
RB_Integral_SettingsRepository
settingsRepository
=
new
RB_Integral_SettingsRepository
();
private
readonly
RB_Integral_SettingsRepository
settingsRepository
=
new
RB_Integral_SettingsRepository
();
private
readonly
RB_Member_IntegralRepository
recordRepository
=
new
RB_Member_IntegralRepository
();
private
RB_Member_IntegralRepository
recordRepository
=
new
RB_Member_IntegralRepository
();
#
region
积分设置
#
region
积分设置
/// <summary>
/// <summary>
...
@@ -46,8 +47,6 @@ namespace Mall.Module.MarketingCenter
...
@@ -46,8 +47,6 @@ namespace Mall.Module.MarketingCenter
}
}
#
endregion
#
endregion
#
region
积分记录
#
region
积分记录
/// <summary>
/// <summary>
...
...
Mall.Module.MarketingCenter/MiniprogramPageTemplModule.cs
View file @
821dd112
...
@@ -103,7 +103,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -103,7 +103,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetMiniprogramPageTemplModule
(
RB_Miniprogram_Page_Templ_Extend
extModel
)
public
bool
SetMiniprogramPageTemplModule
(
RB_Miniprogram_Page_Templ_Extend
extModel
)
{
{
bool
flag
=
false
;
bool
flag
;
if
(
extModel
.
Id
>
0
)
if
(
extModel
.
Id
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -147,12 +147,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -147,12 +147,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetMiniprogramPageTemplIsUseModule
(
object
Id
,
int
IsUse
)
public
bool
SetMiniprogramPageTemplIsUseModule
(
object
Id
,
int
IsUse
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsUse
),
IsUse
}
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsUse
),
IsUse
}
};
};
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
bool
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -165,8 +164,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -165,8 +164,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetMiniprogramPageTemplIsHomeModule
(
object
Id
,
int
IsHome
,
int
MallBaseId
)
public
bool
SetMiniprogramPageTemplIsHomeModule
(
object
Id
,
int
IsHome
,
int
MallBaseId
)
{
{
bool
flag
=
false
;
bool
flag
=
pageRepository
.
UpdateIsHomeRepository
(
MallBaseId
);
flag
=
pageRepository
.
UpdateIsHomeRepository
(
MallBaseId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsHome
),
IsHome
}
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsHome
),
IsHome
}
...
@@ -183,12 +181,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -183,12 +181,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveMiniprogramPageTemplModule
(
object
Id
,
int
Status
)
public
bool
RemoveMiniprogramPageTemplModule
(
object
Id
,
int
Status
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Status
),
Status
}
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Status
),
Status
}
};
};
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
bool
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -199,8 +196,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -199,8 +196,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveMiniprogramPageTemplDetailsModule
(
object
Id
)
public
bool
RemoveMiniprogramPageTemplDetailsModule
(
object
Id
)
{
{
bool
flag
=
false
;
bool
flag
=
detailsRepository
.
Delete
(
Id
)
>
0
;
flag
=
detailsRepository
.
Delete
(
Id
)>
0
;
return
flag
;
return
flag
;
}
}
}
}
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
821dd112
...
@@ -77,7 +77,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -77,7 +77,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetMiniprogramTemplateModule
(
RB_Miniprogram_Template_Extend
extModel
)
public
bool
SetMiniprogramTemplateModule
(
RB_Miniprogram_Template_Extend
extModel
)
{
{
bool
flag
=
false
;
bool
flag
;
if
(
extModel
.
Id
>
0
)
if
(
extModel
.
Id
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -389,12 +389,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -389,12 +389,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveMiniprogramTemplateModule
(
object
Id
,
int
Status
)
public
bool
RemoveMiniprogramTemplateModule
(
object
Id
,
int
Status
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Miniprogram_Template_Extend
.
Status
),
Status
}
{
nameof
(
RB_Miniprogram_Template_Extend
.
Status
),
Status
}
};
};
flag
=
miniprogram_TemplateRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Template_Extend
.
Id
),
Id
));
bool
flag
=
miniprogram_TemplateRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Template_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
}
}
...
...
Mall.Module.MarketingCenter/ShareModule.cs
View file @
821dd112
...
@@ -170,7 +170,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -170,7 +170,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareCategoryModule
(
RB_Share_Category_Extend
extModel
)
public
bool
SetShareCategoryModule
(
RB_Share_Category_Extend
extModel
)
{
{
bool
flag
=
false
;
bool
flag
;
if
(
extModel
.
Id
>
0
)
if
(
extModel
.
Id
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -199,12 +199,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -199,12 +199,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveShareCategoryModule
(
object
Id
)
public
bool
RemoveShareCategoryModule
(
object
Id
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Category_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
},
{
nameof
(
RB_Share_Category_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
};
flag
=
share_CategoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Category_Extend
.
Id
),
Id
));
bool
flag
=
share_CategoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Category_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -237,8 +236,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -237,8 +236,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareFriendModule
(
RB_Share_Friend_Extend
extModel
)
public
bool
SetShareFriendModule
(
RB_Share_Friend_Extend
extModel
)
{
{
bool
flag
=
false
;
bool
flag
=
share_FriendRepository
.
SetShareFrendRepository
(
extModel
);
flag
=
share_FriendRepository
.
SetShareFrendRepository
(
extModel
);
return
flag
;
return
flag
;
}
}
...
@@ -272,12 +270,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -272,12 +270,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveShareFriendModule
(
object
Id
)
public
bool
RemoveShareFriendModule
(
object
Id
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Friend_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
},
{
nameof
(
RB_Share_Friend_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
};
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
bool
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -289,12 +286,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -289,12 +286,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareFriendIsTopModule
(
object
Id
,
int
IsTop
)
public
bool
SetShareFriendIsTopModule
(
object
Id
,
int
IsTop
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Friend_Extend
.
IsTop
),
IsTop
},
{
nameof
(
RB_Share_Friend_Extend
.
IsTop
),
IsTop
},
};
};
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
bool
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -306,12 +302,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -306,12 +302,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareFriendIsUseModule
(
object
Id
,
int
IsUse
)
public
bool
SetShareFriendIsUseModule
(
object
Id
,
int
IsUse
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Friend_Extend
.
IsUse
),
IsUse
},
{
nameof
(
RB_Share_Friend_Extend
.
IsUse
),
IsUse
},
};
};
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
bool
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -323,12 +318,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -323,12 +318,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareFriendSortNumModule
(
object
Id
,
int
SortNum
)
public
bool
SetShareFriendSortNumModule
(
object
Id
,
int
SortNum
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Friend_Extend
.
SortNum
),
SortNum
},
{
nameof
(
RB_Share_Friend_Extend
.
SortNum
),
SortNum
},
};
};
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
bool
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -340,12 +334,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -340,12 +334,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetShareFriendMaterialInfoModule
(
object
Id
,
string
MaterialInfo
)
public
bool
SetShareFriendMaterialInfoModule
(
object
Id
,
string
MaterialInfo
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Share_Friend_Extend
.
MaterialInfo
),
MaterialInfo
},
{
nameof
(
RB_Share_Friend_Extend
.
MaterialInfo
),
MaterialInfo
},
};
};
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
bool
flag
=
share_FriendRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Share_Friend_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
...
Mall.Module.MarketingCenter/StatisticsModule.cs
View file @
821dd112
...
@@ -13,7 +13,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -13,7 +13,7 @@ namespace Mall.Module.MarketingCenter
{
{
public
class
StatisticsModule
public
class
StatisticsModule
{
{
private
RB_Goods_OrderRepository
orderRepository
=
new
RB_Goods_OrderRepository
();
private
readonly
RB_Goods_OrderRepository
orderRepository
=
new
RB_Goods_OrderRepository
();
/// <summary>
/// <summary>
/// 返佣
/// 返佣
/// </summary>
/// </summary>
...
@@ -294,12 +294,14 @@ namespace Mall.Module.MarketingCenter
...
@@ -294,12 +294,14 @@ namespace Mall.Module.MarketingCenter
{
{
for
(
int
i
=
1
;
i
<
24
;
i
++)
for
(
int
i
=
1
;
i
<
24
;
i
++)
{
{
OrderLine
modelOrderLine
=
new
OrderLine
();
OrderLine
modelOrderLine
=
new
OrderLine
modelOrderLine
.
OrderPay
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Count
();
{
modelOrderLine
.
PayMoney
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Sum
(
x
=>
x
.
Income
??
0
);
OrderPay
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Count
(),
modelOrderLine
.
PayMemerNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
GroupBy
(
x
=>
x
.
UserId
).
Count
();
PayMoney
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Sum
(
x
=>
x
.
Income
??
0
),
modelOrderLine
.
BuyNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Sum
(
x
=>
x
.
GoodsTotalNum
);
PayMemerNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
GroupBy
(
x
=>
x
.
UserId
).
Count
(),
modelOrderLine
.
DateStr
=
(
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
();
BuyNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"dd"
)
==
((
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
())).
Sum
(
x
=>
x
.
GoodsTotalNum
),
DateStr
=
(
i
>
9
)
?
(
"0"
+
i
)
:
i
.
ToString
()
};
model
.
OrderLineList
.
Add
(
modelOrderLine
);
model
.
OrderLineList
.
Add
(
modelOrderLine
);
}
}
}
}
...
@@ -307,12 +309,14 @@ namespace Mall.Module.MarketingCenter
...
@@ -307,12 +309,14 @@ namespace Mall.Module.MarketingCenter
{
{
for
(
int
i
=
0
;
i
<
7
;
i
++)
for
(
int
i
=
0
;
i
<
7
;
i
++)
{
{
OrderLine
modelOrderLine
=
new
OrderLine
();
OrderLine
modelOrderLine
=
new
OrderLine
modelOrderLine
.
OrderPay
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Count
();
{
modelOrderLine
.
PayMoney
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Sum
(
x
=>
x
.
Income
??
0
);
OrderPay
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Count
(),
modelOrderLine
.
PayMemerNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
GroupBy
(
x
=>
x
.
UserId
).
Count
();
PayMoney
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Sum
(
x
=>
x
.
Income
??
0
),
modelOrderLine
.
BuyNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Sum
(
x
=>
x
.
GoodsTotalNum
);
PayMemerNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
GroupBy
(
x
=>
x
.
UserId
).
Count
(),
modelOrderLine
.
DateStr
=
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
);
BuyNum
=
List
.
Where
(
x
=>
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
==
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)).
Sum
(
x
=>
x
.
GoodsTotalNum
),
DateStr
=
System
.
DateTime
.
Now
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
)
};
model
.
OrderLineList
.
Add
(
modelOrderLine
);
model
.
OrderLineList
.
Add
(
modelOrderLine
);
}
}
}
}
...
...
Mall.Module.MarketingCenter/TemplateMarketModule.cs
View file @
821dd112
...
@@ -55,7 +55,7 @@ namespace Mall.Module.MarketingCenter
...
@@ -55,7 +55,7 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
SetTemplateMarketModule
(
RB_Template_Market_Extend
extModel
)
public
bool
SetTemplateMarketModule
(
RB_Template_Market_Extend
extModel
)
{
{
bool
flag
=
false
;
bool
flag
;
if
(
extModel
.
Id
>
0
)
if
(
extModel
.
Id
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -96,12 +96,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -96,12 +96,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
RemoveTemplateMarketModule
(
object
Id
)
public
bool
RemoveTemplateMarketModule
(
object
Id
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Template_Market_Extend
.
Status
),
1
},
{
nameof
(
RB_Template_Market_Extend
.
Status
),
1
},
};
};
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
bool
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -113,12 +112,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -113,12 +112,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
UpdateTemplateMarketIsShowModule
(
object
Id
,
int
IsShow
)
public
bool
UpdateTemplateMarketIsShowModule
(
object
Id
,
int
IsShow
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Template_Market_Extend
.
IsShow
),
IsShow
},
{
nameof
(
RB_Template_Market_Extend
.
IsShow
),
IsShow
},
};
};
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
bool
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
@@ -130,12 +128,11 @@ namespace Mall.Module.MarketingCenter
...
@@ -130,12 +128,11 @@ namespace Mall.Module.MarketingCenter
/// <returns></returns>
/// <returns></returns>
public
bool
UpdateTemplateMarketIsUseModule
(
object
Id
,
int
IsUse
)
public
bool
UpdateTemplateMarketIsUseModule
(
object
Id
,
int
IsUse
)
{
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
{
nameof
(
RB_Template_Market_Extend
.
IsUse
),
IsUse
},
{
nameof
(
RB_Template_Market_Extend
.
IsUse
),
IsUse
},
};
};
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
bool
flag
=
template_MarketRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Template_Market_Extend
.
Id
),
Id
));
return
flag
;
return
flag
;
}
}
...
...
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