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
c72a3433
Commit
c72a3433
authored
Sep 09, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
8a3c0565
098b817c
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
175 additions
and
25 deletions
+175
-25
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+14
-0
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+5
-0
RB_Member_User_Extend.cs
Mall.Model/Extend/User/RB_Member_User_Extend.cs
+10
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+25
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+12
-4
UserModule.cs
Mall.Module.User/UserModule.cs
+16
-0
RB_Member_UserRepository.cs
Mall.Repository/User/RB_Member_UserRepository.cs
+1
-1
RB_Member_UserRepository2.cs
Mall.Repository/User/RB_Member_UserRepository2.cs
+46
-0
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+6
-15
AppletGoodsController.cs
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
+15
-3
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+1
-1
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+24
-0
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
c72a3433
...
...
@@ -2066,5 +2066,19 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public
string
fontColor
{
get
;
set
;
}
/// <summary>
/// 字体名称
/// </summary>
public
string
fontName
{
get
;
set
;
}
/// <summary>
/// 字体大小
/// </summary>
public
string
fontSize
{
get
;
set
;
}
/// <summary>
/// 是否加粗
/// </summary>
public
string
isBold
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
c72a3433
...
...
@@ -295,5 +295,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
IsVideo
{
get
;
set
;
}
/// <summary>
/// ERP商品对象
/// </summary>
public
object
ERPGoodObj
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Member_User_Extend.cs
View file @
c72a3433
...
...
@@ -146,6 +146,16 @@ namespace Mall.Model.Extend.User
/// 是否直接下级[1-是]
/// </summary>
public
int
IsDirect
{
get
;
set
;
}
/// <summary>
/// 店铺Id
/// </summary>
public
int
ShopId
{
get
;
set
;
}
/// <summary>
/// 店铺名称
/// </summary>
public
string
ShopName
{
get
;
set
;
}
}
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
c72a3433
...
...
@@ -377,7 +377,31 @@ namespace Mall.Module.MarketingCenter
//快捷导航
case
"quick-nav"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
quicknavItem
>(
item
.
data
.
ToString
());
break
;
//店铺用户信息
case
"shop-info"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
shopinfoItem
>(
item
.
data
.
ToString
());
break
;
case
"shop-info"
:
shopinfoItem
shopModel
=
new
shopinfoItem
();
try
{
var
shopInfoData
=
JsonHelper
.
DeserializeObject
<
shopinfoItem
>(
item
.
data
.
ToString
());
if
(
shopInfoData
!=
null
)
{
shopModel
.
headImg
=
shopInfoData
?.
headImg
??
""
;
shopModel
.
headName
=
shopInfoData
?.
headName
??
""
;
shopModel
.
headInfo
=
shopInfoData
?.
headInfo
??
""
;
shopModel
.
backgroundPicUrl
=
shopInfoData
?.
backgroundPicUrl
??
""
;
shopModel
.
backgroundColor
=
shopInfoData
?.
backgroundColor
??
""
;
shopModel
.
bottonImg
=
shopInfoData
?.
bottonImg
??
""
;
shopModel
.
fontColor
=
shopInfoData
?.
fontColor
??
""
;
shopModel
.
fontName
=
shopInfoData
?.
fontName
??
""
;
shopModel
.
fontSize
=
shopInfoData
?.
fontSize
??
"13"
;
shopModel
.
isBold
=
shopInfoData
?.
isBold
??
"false"
;
}
}
catch
{
}
item
.
data
=
shopModel
;
break
;
}
}
...
...
Mall.Module.Product/ProductModule.cs
View file @
c72a3433
...
...
@@ -18,6 +18,7 @@ using Mall.Repository.BaseSetUp;
using
Mall.Repository.Product
;
using
Mall.Repository.User
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
NPOI.SS.Formula.Functions
;
using
VT.FW.DB
;
...
...
@@ -231,8 +232,9 @@ namespace Mall.Module.Product
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <param name="IsGetShare">1-获取分销佣金</param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetAppletGoodsPageListForZY
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
)
public
List
<
RB_Goods_Extend
>
GetAppletGoodsPageListForZY
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
,
int
IsGetShare
=
0
)
{
var
list
=
goodsRepository
.
GetAppletGoodsPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
...
...
@@ -447,10 +449,16 @@ namespace Mall.Module.Product
item
.
FreeShippingModel
=
new
RB_FreeShipping_Extend
();
}
//2020-08-06 Add by:W End
//HK 2020-09-08新增
if
(
IsGetShare
==
1
)
{
var
obj
=
GetAppletGoodsInfo_V2
(
item
.
Id
,
(
demodel
?.
UserId
??
0
),
(
demodel
?.
SmallShopsId
??
0
),
demodel
.
TenantId
,
demodel
.
MallBaseId
);
if
(
obj
!=
null
)
{
item
.
ERPGoodObj
=
obj
;
}
}
}
}
return
list
;
}
...
...
Mall.Module.User/UserModule.cs
View file @
c72a3433
...
...
@@ -33,6 +33,12 @@ namespace Mall.Module.User
/// 用户管理
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 用户管理
/// </summary>
private
readonly
RB_Member_UserRepository2
member_UserRepository2
=
new
RB_Member_UserRepository2
();
/// <summary>
/// 会员等级
/// </summary>
...
...
@@ -6570,5 +6576,15 @@ namespace Mall.Module.User
};
return
distributor_InfoRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Distributor_Info_Extend
.
UserId
),
UserId
));
}
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Member_User_Extend
>
GetMemberUserListExtModule
(
RB_Member_User_Extend
dmodel
)
{
return
member_UserRepository2
.
GetMemberUserListExtRepository
(
dmodel
);
}
}
}
Mall.Repository/User/RB_Member_UserRepository.cs
View file @
c72a3433
...
...
@@ -12,7 +12,7 @@ namespace Mall.Repository.User
/// <summary>
/// 商户用户仓储层
/// </summary>
public
class
RB_Member_UserRepository
:
BaseRepository
<
RB_Member_User
>
public
partial
class
RB_Member_UserRepository
:
BaseRepository
<
RB_Member_User
>
{
/// <summary>
...
...
Mall.Repository/User/RB_Member_UserRepository2.cs
0 → 100644
View file @
c72a3433
using
Mall.Model.Extend.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Linq
;
using
Mall.Model.Entity.User
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.User
{
/// <summary>
/// 商户用户仓储层
/// </summary>
public
partial
class
RB_Member_UserRepository2
:
BaseRepository
<
RB_Member_User
>
{
/// <summary>
/// 获取商户用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Member_User_Extend
>
GetMemberUserListExtRepository
(
RB_Member_User_Extend
dmodel
)
{
DynamicParameters
dynamicParameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT IFNULL(B.Id,0) AS ShopId,IFNULL(B.Name,'') AS ShopName,A.*
FROM rb_member_user AS A LEFT JOIN rb_smallshops_info AS B ON A.Id=B.UserId
WHERE 1=1
"
);
if
(
dmodel
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
$@" and A.
{
nameof
(
RB_Member_User
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
);
}
if
(
dmodel
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
$@" and A.
{
nameof
(
RB_Member_User
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
.
Trim
()))
{
builder
.
AppendFormat
(
$@" and A.Name like @Name "
);
dynamicParameters
.
Add
(
"Name"
,
"%"
+
dmodel
.
Name
.
Trim
()
+
"%"
);
}
return
Get
<
RB_Member_User_Extend
>(
builder
.
ToString
(),
dynamicParameters
).
ToList
();
}
}
}
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
c72a3433
...
...
@@ -159,7 +159,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
RemitFXCommission
=
0
;
item
.
RefundActual
=
item
.
RefundActual
>
0
?
item
.
RefundActual
:
item
.
AllPrice
;
}
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
CouponMoney
+
item
.
RefundActual
+
item
.
YFMoney
;
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
RefundActual
+
item
.
YFMoney
;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
RemitFXCommission
=
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
Paid
=
item
.
RefundActual
+
item
.
RemitFXCommission
+
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
PayMoney
;
...
...
@@ -173,11 +174,6 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
item
.
GrossProfitRate
=
((
item
.
AllPrice
+
item
.
YSMoney
)
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
(
item
.
AllPrice
+
item
.
YSMoney
)),
4
,
MidpointRounding
.
AwayFromZero
)
*
100
);
}
// item.Paid = item.PaidCostMoney + item.RemitFXCommission;
//item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
//item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
;
...
...
@@ -378,7 +374,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
RemitFXCommission
=
0
;
item
.
RefundActual
=
item
.
RefundActual
>
0
?
item
.
RefundActual
:
item
.
AllPrice
;
}
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
CouponMoney
+
item
.
RefundActual
+
item
.
YFMoney
;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
RefundActual
+
item
.
YFMoney
;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
RemitFXCommission
=
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
Paid
=
item
.
RefundActual
+
item
.
RemitFXCommission
+
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
PayMoney
;
...
...
@@ -392,13 +389,6 @@ namespace Mall.WebApi.Controllers.AppletWeChat
{
item
.
GrossProfitRate
=
((
item
.
AllPrice
+
item
.
YSMoney
)
==
0
?
0
:
Math
.
Round
((
item
.
GrossProfit
/
(
item
.
AllPrice
+
item
.
YSMoney
)),
4
,
MidpointRounding
.
AwayFromZero
)
*
100
);
}
//item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
//item.NoPaid = item.ALLCommission;
//item.RemitFXCommission = item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
//item.Paid = item.PaidCostMoney + item.RemitFXCommission;
//item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
//item.GrossProfitRate = (item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 0 : Math.Round((item.GrossProfit / ((item.AllPrice + item.RealMoney - item.RefundActual) == 0 ? 1 : (item.AllPrice + item.RealMoney - item.RefundActual))), 2, MidpointRounding.AwayFromZero);
}
#
region
组装数据
int
Num
=
0
;
...
...
@@ -587,7 +577,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item
.
RemitFXCommission
=
0
;
item
.
RefundActual
=
item
.
RefundActual
>
0
?
item
.
RefundActual
:
item
.
AllPrice
;
}
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
CouponMoney
+
item
.
RefundActual
+
item
.
YFMoney
;
item
.
ALLCommission
=
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
FXCommission
+
item
.
LiveCommission
+
item
.
RefundActual
+
item
.
YFMoney
;
// item.ALLCommission = item.CostMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.CouponMoney + item.RefundActual + item.YFMoney;
item
.
NoPaid
=
item
.
ALLCommission
;
item
.
RemitFXCommission
=
item
.
RemitFXCommission
+
(!
string
.
IsNullOrWhiteSpace
(
item
.
LiveFinanceIds
)
?
item
.
LiveCommission
:
0
);
item
.
Paid
=
item
.
RefundActual
+
item
.
RemitFXCommission
+
item
.
CostMoney
+
item
.
GoodsFreight
+
item
.
PayMoney
;
...
...
Mall.WebApi/Controllers/Product/AppletGoodsController.cs
View file @
c72a3433
...
...
@@ -169,12 +169,23 @@ namespace Mall.WebApi.Controllers.MallBase
}
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
parms
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
GoodsStatus
=
1
;
//只查询销售中的
demodel
.
SmallShopsId
=
parms
.
SmallShopsId
;
JObject
newParms
=
JObject
.
Parse
(
parms
.
msg
.
ToString
());
int
UserId
=
parms
.
UserId
;
if
(
newParms
.
GetInt
(
"ERPUserId"
)
>
0
)
{
UserId
=
newParms
.
GetInt
(
"ERPUserId"
);
}
if
(
newParms
.
GetInt
(
"ERPSmallShopId"
)
>
0
)
{
demodel
.
SmallShopsId
=
newParms
.
GetInt
(
"ERPSmallShopId"
);
}
demodel
.
UserId
=
UserId
;
//HK2020-09-07新增
int
IsGetShare
=
newParms
.
GetInt
(
"IsGetShare"
);
RB_Member_User_Extend
userModel
=
new
RB_Member_User_Extend
();
RB_Member_Grade_Extend
memberGrade
=
new
RB_Member_Grade_Extend
();
if
(
UserId
>
0
)
...
...
@@ -188,7 +199,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
SmallShopsId
=
userModel
.
SmallShopId
;
}
}
var
list
=
productModule
.
GetAppletGoodsPageListForZY
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
var
list
=
productModule
.
GetAppletGoodsPageListForZY
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
,
IsGetShare
:
IsGetShare
);
List
<
object
>
RList
=
new
List
<
object
>();
if
(
list
.
Any
())
{
...
...
@@ -349,7 +360,8 @@ namespace Mall.WebApi.Controllers.MallBase
goods_stock
=
model
.
InventoryNum
,
goods_num
=
model
.
InventoryNum
,
marketingLogo
=
model
.
MarketingLogo
,
video_type
=
model
.
VideoType
video_type
=
model
.
VideoType
,
erpgoodobj
=
model
.
ERPGoodObj
});
}
}
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
c72a3433
...
...
@@ -690,7 +690,7 @@ namespace Mall.WebApi.Controllers.User
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
IsDirect
=
prams
.
GetInt
(
"IsDirect"
,
1
);
int
NewUserId
=
0
;
//HK 2020-08-27新增
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
c72a3433
...
...
@@ -3346,5 +3346,29 @@ namespace Mall.WebApi.Controllers.User
}
}
#
endregion
#
region
获取用户列表
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetMemberUserListExt
()
{
var
re
=
RequestParm
;
var
parms
=
JObject
.
Parse
(
re
.
msg
.
ToString
());
RB_Member_User_Extend
query
=
new
RB_Member_User_Extend
()
{
Name
=
parms
.
GetStringValue
(
"Name"
),
};
query
.
TenantId
=
Convert
.
ToInt32
(
re
.
uid
);
query
.
MallBaseId
=
re
.
MallBaseId
;
var
list
=
userModule
.
GetMemberUserListExtModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
Name
,
qitem
.
ShopId
,
qitem
.
ShopName
}));
}
#
endregion
}
}
\ No newline at end of file
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