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
c93aa1d4
Commit
c93aa1d4
authored
Sep 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
cccb7075
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
8 deletions
+46
-8
EmployeeModule.cs
Mall.Module.User/EmployeeModule.cs
+19
-0
RB_TenantRepository.cs
Mall.Repository/User/RB_TenantRepository.cs
+1
-1
DestinationController.cs
Mall.WebApi/Controllers/MallBase/DestinationController.cs
+7
-5
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+15
-2
EmployeeController.cs
Mall.WebApi/Controllers/User/EmployeeController.cs
+4
-0
No files found.
Mall.Module.User/EmployeeModule.cs
View file @
c93aa1d4
...
...
@@ -170,6 +170,25 @@ namespace Mall.Module.User
return
employeeRepository
.
GetEmployeeListRepository
(
query
);
}
/// <summary>
/// 判断账号是否存在
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
bool
CheckExistsEmployeeModule
(
RB_Employee_Extend
query
)
{
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Employee_Extend
.
EmpAccount
),
query
.
EmpAccount
.
Trim
()),
};
if
(
query
.
EmpId
>
0
)
{
list
.
Add
(
new
WhereHelper
(
nameof
(
RB_Employee_Extend
.
EmpId
),
query
.
EmpId
,
operatorEnum
:
OperatorEnum
.
NotEqual
));
}
bool
flag
=
employeeRepository
.
Exists
(
list
);
return
flag
;
}
/// <summary>
/// 新增修改员工
/// </summary>
...
...
Mall.Repository/User/RB_TenantRepository.cs
View file @
c93aa1d4
...
...
@@ -60,7 +60,7 @@ namespace Mall.Repository.User
builder
.
Append
(
@"
SELECT A.TenantId,B.EmpAccount AS Account,A.Name,A.MobilePhone,A.WeChatNum,A.IsEffective,A.AccountValidate,A.CreateMiniPrograme
,A.AccountStatus,B.EmpPwd AS Password,B.EmpId
FROM RB_Tenant AS A
LEFT
JOIN rb_employee AS B ON A.TenantId=B.TenantId
FROM RB_Tenant AS A
INNER
JOIN rb_employee AS B ON A.TenantId=B.TenantId
WHERE 1=1 "
);
if
(
query
!=
null
)
{
...
...
Mall.WebApi/Controllers/MallBase/DestinationController.cs
View file @
c93aa1d4
...
...
@@ -8,6 +8,7 @@ using Mall.Common.Plugin;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Module.BaseSetUp
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json.Linq
;
...
...
@@ -31,17 +32,18 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <param name="ParentID">父节点编号</param>
/// <returns></returns>
[
AllowAnonymous
]
public
ApiResult
GetChildList
()
{
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
ID
=
parm
.
GetInt
(
"Id"
);
if
(
ID
>
0
)
{
var
CommonList
=
Mall
.
Common
.
Data
.
AreaDataHelper
.
GetAreaList
();
if
(
CommonList
!=
null
&&
CommonList
.
Count
>
0
)
{
return
ApiResult
.
Success
(
""
,
CommonList
.
Where
(
qitem
=>
qitem
.
P
==
ID
).
Select
(
qitem
=>
new
{
ID
=
qitem
.
I
,
Name
=
qitem
.
N
}));
}
//
var CommonList = Mall.Common.Data.AreaDataHelper.GetAreaList();
//
if (CommonList != null && CommonList.Count > 0)
//
{
//
return ApiResult.Success("", CommonList.Where(qitem => qitem.P == ID).Select(qitem => new { ID = qitem.I, Name = qitem.N }));
//
}
var
list
=
destinationModule
.
GetChildList
(
ID
).
Select
(
item
=>
new
{
item
.
ID
,
item
.
Name
});
return
ApiResult
.
Success
(
""
,
list
);
}
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
c93aa1d4
...
...
@@ -14,7 +14,9 @@ using Newtonsoft.Json.Linq;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Module.BaseSetUp
;
using
Mall.Common
;
using
Mall.CacheManager.User
;
using
Microsoft.AspNetCore.Authorization
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -145,10 +147,21 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
SetUserShippingAddress
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
NewUserId
=
prams
.
GetInt
(
"NewUserId"
);
AppletUserInfo
userInfo
=
null
;
if
(
NewUserId
>
0
)
{
userInfo
=
UserReidsCache
.
GetAppletUserLoginInfo
(
NewUserId
);
}
else
{
userInfo
=
AppletUserInfo
;
}
RB_Member_ShippingAddress_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Member_ShippingAddress_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
...
...
Mall.WebApi/Controllers/User/EmployeeController.cs
View file @
c93aa1d4
...
...
@@ -155,6 +155,10 @@ namespace Mall.WebApi.Controllers.User
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
EmpPwd
=
Common
.
DES
.
Encrypt
(
extModel
.
EmpPwd
,
Common
.
Config
.
WebApiKey
,
Common
.
Config
.
WebApiIV
);
if
(
module
.
CheckExistsEmployeeModule
(
extModel
))
{
return
ApiResult
.
Failed
(
"此账号【"
+
extModel
.
EmpAccount
+
"】已存在,请重新填写账号!"
);
}
var
flag
=
module
.
SetEmployeeModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
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