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
2ebb16f4
Commit
2ebb16f4
authored
Aug 17, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
88aa08a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
345 additions
and
71 deletions
+345
-71
UserInfo.cs
Mall.Common/API/UserInfo.cs
+6
-1
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+32
-0
RB_Tenant_Extend.cs
Mall.Model/Extend/User/RB_Tenant_Extend.cs
+5
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+4
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+141
-24
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+6
-1
RB_TenantRepository.cs
Mall.Repository/User/RB_TenantRepository.cs
+2
-2
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+133
-37
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+16
-6
No files found.
Mall.Common/API/UserInfo.cs
View file @
2ebb16f4
...
...
@@ -48,7 +48,7 @@ namespace Mall.Common
set
;
}
/// <summary>
/// 姓名/企业名称
/// </summary>
...
...
@@ -137,6 +137,11 @@ namespace Mall.Common
/// </summary>
public
int
EmpId
{
get
;
set
;
}
/// <summary>
/// 修改他人商品角色权限
/// </summary>
public
int
IsOtherUpdateGoods
{
get
;
set
;
}
public
string
erptoken
{
get
;
set
;
}
/// <summary>
...
...
Mall.Model/Entity/Product/RB_Goods.cs
View file @
2ebb16f4
...
...
@@ -611,5 +611,37 @@ namespace Mall.Model.Entity.Product
/// 商品Logo
/// </summary>
public
string
goodsLogo
{
get
;
set
;
}
/// <summary>
/// 分销平台,0-否,1-是
/// </summary>
public
int
RetailStore
{
get
;
set
;
}
/// <summary>
/// 源数据商品id
/// </summary>
public
int
SourceGoodsId
{
get
;
set
;
}
/// <summary>
/// 源数据商户号
/// </summary>
public
int
SourceTenantId
{
get
;
set
;
}
/// <summary>
/// 源数据小程序id
/// </summary>
public
int
SourceMallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Tenant_Extend.cs
View file @
2ebb16f4
...
...
@@ -44,5 +44,10 @@ namespace Mall.Model.Extend.User
/// 当前登录员工编号
/// </summary>
public
int
EmpId
{
get
;
set
;
}
/// <summary>
/// 权限
/// </summary>
public
string
RoleAuth
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
2ebb16f4
...
...
@@ -3432,6 +3432,10 @@ namespace Mall.Module.Product
else
{
string
simage
=
goods_SpecificationValueRepository
.
GetSpecificationImage
(
item
.
GoodsId
??
0
,
item
.
SpecificationSort
);
if
(!
string
.
IsNullOrEmpty
(
simage
))
{
item
.
CoverImage
=
simage
;
//规格图片赋值
}
}
#
endregion
...
...
Mall.Module.Product/ProductModule.cs
View file @
2ebb16f4
This diff is collapsed.
Click to expand it.
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
2ebb16f4
...
...
@@ -50,6 +50,10 @@ namespace Mall.Repository.Product
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
RetailStore
>
-
1
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
RetailStore
)}
=
{
dmodel
.
RetailStore
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StoresIds
))
{
where
+=
$@" and FIND_IN_SET('
{
dmodel
.
StoresIds
}
',g.
{
nameof
(
RB_Goods_Extend
.
StoresIds
)}
)"
;
...
...
@@ -99,7 +103,8 @@ namespace Mall.Repository.Product
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
SupplierId
)}
=
{
dmodel
.
SupplierId
}
"
;
}
if
(
dmodel
.
MinProfitRate
>
0
)
{
if
(
dmodel
.
MinProfitRate
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MinProfitRate
)}
<
{
dmodel
.
MinProfitRate
}
"
;
}
if
(
dmodel
.
GoodsPageType
.
HasValue
)
...
...
Mall.Repository/User/RB_TenantRepository.cs
View file @
2ebb16f4
...
...
@@ -59,12 +59,12 @@ namespace Mall.Repository.User
StringBuilder
builder1
=
new
StringBuilder
();
builder1
.
AppendFormat
(
@"
SELECT A.TenantId,A.Account AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,A.AccountStatus,A.`Password` AS Password,0 AS EmpId,0 AS MallBaseId
,A.AccountStatus,A.`Password` AS Password,0 AS EmpId,0 AS MallBaseId
,'-1' as RoleAuth
FROM RB_Tenant AS A
WHERE 1=1 AND A.Account='{0}'
UNION ALL
SELECT A.TenantId,B.EmpAccount AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,B.`Status` AS AccountStatus,B.EmpPwd AS Password,B.EmpId,B.MallBaseId
,B.`Status` AS AccountStatus,B.EmpPwd AS Password,B.EmpId,B.MallBaseId
,b.RoleAuth
FROM RB_Tenant AS A INNER JOIN rb_employee AS B ON A.TenantId=B.TenantId
WHERE 1=1 AND B.EmpAccount='{0}'
"
,
query
.
Account
.
Trim
());
...
...
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
2ebb16f4
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/User/TenantController.cs
View file @
2ebb16f4
...
...
@@ -49,7 +49,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
private
readonly
Module
.
User
.
MenuModule
menuModule
=
new
Module
.
User
.
MenuModule
();
/// <summary>
/// 小程序图标处理类对象
...
...
@@ -123,6 +123,14 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
Failed
(
"密码错误"
);
}
}
int
RoleAuth
=
0
;
if
(
model
.
TenantId
==
1
&&
!
string
.
IsNullOrEmpty
(
model
.
RoleAuth
))
{
if
(
model
.
RoleAuth
.
Split
(
","
).
Any
(
x
=>
x
==
"-1"
))
{
RoleAuth
=
1
;
}
}
#
region
add
by
:
W
2020
-
07
-
06
erp
授权信息
var
erpUserInfo
=
new
Mall
.
Model
.
Entity
.
Property
.
RB_Employee
();
string
erptoken
=
""
;
...
...
@@ -182,6 +190,7 @@ namespace Mall.WebApi.Controllers.User
IJwtEncoder
encoder
=
new
JwtEncoder
(
algorithm
,
serializer
,
urlEncoder
);
string
secret
=
Config
.
JwtSecretKey
;
string
token
=
encoder
.
Encode
(
payload
,
secret
);
#
endregion
UserInfo
obj
=
new
UserInfo
{
...
...
@@ -197,13 +206,14 @@ namespace Mall.WebApi.Controllers.User
Token
=
token
,
SecretKey
=
""
,
MallBaseId
=
0
,
IsOtherUpdateGoods
=
RoleAuth
,
EmpId
=
model
.
EmpId
,
erptoken
=
erptoken
,
ERPEmpId
=
(
erpUserInfo
?.
EmployeeId
??
0
),
ERPBranchId
=
(
erpUserInfo
?.
RB_Branch_id
??
-
1
),
ERPGroupId
=
(
erpUserInfo
?.
RB_Group_id
??
0
),
IsOpenSchool
=
0
,
IsKorea
=
0
,
IsKorea
=
0
,
};
UserReidsCache
.
UserInfoSet
(
UserModuleCacheKeyConfig
.
Mall_Login_Info
+
model
.
TenantId
,
obj
,
Config
.
JwtExpirTime
);
return
ApiResult
.
Success
(
""
,
obj
);
...
...
@@ -455,7 +465,7 @@ namespace Mall.WebApi.Controllers.User
var
flag
=
programModule
.
SetMiniProgramActivityStyleModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 修改微信小程序分销订阅配置信息
...
...
@@ -1327,7 +1337,7 @@ namespace Mall.WebApi.Controllers.User
public
ApiResult
GetMenuList
()
{
List
<
object
>
resultList
=
new
List
<
object
>();
var
menuList
=
menuModule
.
GetMenuListModule
(
new
RB_Menu_Extend
()
{
TenantId
=
RequestParm
.
TenantId
});
var
menuList
=
menuModule
.
GetMenuListModule
(
new
RB_Menu_Extend
()
{
TenantId
=
RequestParm
.
TenantId
});
var
list
=
new
List
<
RB_Menu_Extend
>();
if
(
RequestParm
.
EmpId
>
0
)
{
...
...
@@ -1791,7 +1801,7 @@ namespace Mall.WebApi.Controllers.User
{
var
extModel
=
new
RB_PlugIn_Extend
()
{
TenantId
=
RequestParm
.
TenantId
TenantId
=
RequestParm
.
TenantId
};
var
list
=
plugInModule
.
GetPlugInListModule
(
extModel
);
var
distinctList
=
list
.
GroupBy
(
qitem
=>
new
{
qitem
.
PlugType
,
qitem
.
GroupName
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
PlugType
,
qitem
.
Key
.
GroupName
});
...
...
@@ -2184,7 +2194,7 @@ namespace Mall.WebApi.Controllers.User
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
var
flag
=
programModule
.
SetLiveConfigModule
(
extModel
);
return
flag
?
ApiResult
.
Success
(
data
:
extModel
):
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
(
data
:
extModel
)
:
ApiResult
.
Failed
();
}
#
endregion
}
...
...
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