Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
ab9d00cc
Commit
ab9d00cc
authored
Nov 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
36fd0a97
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
4 deletions
+70
-4
RB_Customer_Extend.cs
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
+48
-1
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+11
-1
RB_CustomerRepository.cs
Edu.Repository/Customer/RB_CustomerRepository.cs
+9
-1
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+2
-1
No files found.
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
View file @
ab9d00cc
using
Edu.Model.Entity.Customer
;
using
Edu.Common.Plugin
;
using
Edu.Model.Entity.Customer
;
namespace
Edu.Model.ViewModel.Customer
{
...
...
@@ -21,5 +22,51 @@ namespace Edu.Model.ViewModel.Customer
/// 修改时间
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
UpdateTime
);
}
}
/// <summary>
/// 客户状态
/// </summary>
public
string
CustomerStateStr
{
get
{
return
this
.
CustomerState
.
ToName
();
}
}
/// <summary>
/// 审核状态
/// </summary>
public
string
ApproveStateStr
{
get
{
string
str
=
"待审核"
;
if
(
this
.
ApproveState
==
0
)
{
str
=
"待审核"
;
}
else
if
(
this
.
ApproveState
==
1
)
{
str
=
"通过"
;
}
else
{
str
=
"拒绝"
;
}
return
str
;
}
}
/// <summary>
/// 审核人
/// </summary>
public
string
ApproveName
{
get
;
set
;
}
/// <summary>
/// 审核时间
/// </summary>
public
string
ApproveTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
ApproveTime
);
}
}
}
}
Edu.Module.Customer/CustomerModule.cs
View file @
ab9d00cc
using
Edu.Common.Enum
;
using
Edu.Cache.User
;
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Repository.Customer
;
using
System
;
...
...
@@ -65,6 +66,8 @@ namespace Edu.Module.Customer
}
else
{
model
.
ApproveState
=
0
;
model
.
CustomerState
=
Common
.
Enum
.
Customer
.
CustomerStateEnum
.
NotActivation
;
model
.
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
);
var
newId
=
customerRepository
.
Insert
(
model
);
model
.
CustomerId
=
newId
;
...
...
@@ -98,6 +101,13 @@ namespace Edu.Module.Customer
public
RB_Customer_Extend
GetCustomerModule
(
object
CustomerId
)
{
var
extModel
=
customerRepository
.
GetEntity
<
RB_Customer_Extend
>(
CustomerId
);
if
(
extModel
!=
null
)
{
if
(
extModel
.
ApproveId
>
0
)
{
extModel
.
ApproveName
=
UserReidsCache
.
GetUserLoginInfo
(
extModel
.
ApproveId
)?.
AccountName
??
""
;
}
}
return
extModel
;
}
...
...
Edu.Repository/Customer/RB_CustomerRepository.cs
View file @
ab9d00cc
...
...
@@ -43,7 +43,15 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND A.{0} LIKE @CustomerName "
,
nameof
(
RB_Customer_Extend
.
CustomerName
));
parameters
.
Add
(
"CustomerName"
,
"%"
+
query
.
CustomerName
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
ContactNumber
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @ContactNumber "
,
nameof
(
RB_Customer_Extend
.
ContactNumber
));
parameters
.
Add
(
"ContactNumber"
,
"%"
+
query
.
ContactNumber
.
Trim
()
+
"%"
);
}
if
(
query
.
ApproveState
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Customer_Extend
.
ApproveState
),
query
.
ApproveState
);
}
}
return
GetPage
<
RB_Customer_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
ab9d00cc
...
...
@@ -34,7 +34,8 @@ namespace Edu.WebApi.Controllers.Customer
var
query
=
new
RB_Customer_Extend
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
CustomerName
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerName"
)
CustomerName
=
base
.
ParmJObj
.
GetStringValue
(
"CustomerName"
),
ApproveState
=
base
.
ParmJObj
.
GetInt
(
"ApproveState"
),
};
var
list
=
customerModule
.
GetCustomerPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
...
...
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