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
07113b7c
Commit
07113b7c
authored
Feb 21, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
4f9bedc7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
0 deletions
+183
-0
RB_MiAi_BaseInfo_Extend.cs
Mall.Model/Extend/Miai/RB_MiAi_BaseInfo_Extend.cs
+12
-0
MiaiModule.cs
Mall.Module.Miai/MiaiModule.cs
+45
-0
RB_MiAi_BaseInfoRepository.cs
Mall.Repository/Miai/RB_MiAi_BaseInfoRepository.cs
+81
-0
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+45
-0
No files found.
Mall.Model/Extend/Miai/RB_MiAi_BaseInfo_Extend.cs
0 → 100644
View file @
07113b7c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Miai
;
namespace
Mall.Model.Extend.Miai
{
public
class
RB_MiAi_BaseInfo_Extend
:
RB_MiAi_BaseInfo
{
}
}
Mall.Module.Miai/MiaiModule.cs
View file @
07113b7c
...
@@ -20,6 +20,9 @@ namespace Mall.Module.Miai
...
@@ -20,6 +20,9 @@ namespace Mall.Module.Miai
{
{
private
readonly
RB_Miai_ForumRepository
miai_ForumRepository
=
new
RB_Miai_ForumRepository
();
private
readonly
RB_Miai_ForumRepository
miai_ForumRepository
=
new
RB_Miai_ForumRepository
();
private
readonly
RB_MiAi_BaseInfoRepository
miai_BaseInfoRepository
=
new
RB_MiAi_BaseInfoRepository
();
#
region
活动版块
#
region
活动版块
/// <summary>
/// <summary>
/// 获取活动版本分页列表
/// 获取活动版本分页列表
...
@@ -36,6 +39,48 @@ namespace Mall.Module.Miai
...
@@ -36,6 +39,48 @@ namespace Mall.Module.Miai
#
endregion
#
endregion
#
region
会员基础信息
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_MiAi_BaseInfo_Extend
>
GetBaseInfoList
(
RB_MiAi_BaseInfo_Extend
where
)
{
return
miai_BaseInfoRepository
.
GetBaseInfoList
(
where
);
}
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_MiAi_BaseInfo_Extend
>
GetBaseInfoPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_MiAi_BaseInfo_Extend
where
)
{
return
miai_BaseInfoRepository
.
GetBaseInfoPageList
(
pageIndex
,
pageSize
,
out
rowsCount
,
where
);
}
/// <summary>
/// 新增用户的基础信息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetMiAiBaseInfo
(
RB_MiAi_BaseInfo_Extend
model
)
{
bool
flag
=
false
;
if
(
model
.
Id
==
0
)
{
flag
=
miai_BaseInfoRepository
.
Insert
(
model
)
>
0
;
}
return
flag
;
}
#
endregion
}
}
}
}
Mall.Repository/Miai/RB_MiAi_BaseInfoRepository.cs
0 → 100644
View file @
07113b7c
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Model.Entity.Miai
;
using
Mall.Model.Extend.Miai
;
namespace
Mall.Repository.Miai
{
public
class
RB_MiAi_BaseInfoRepository
:
BaseRepository
<
RB_MiAi_BaseInfo
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_MiAi_BaseInfo
);
}
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_MiAi_BaseInfo_Extend
>
GetBaseInfoList
(
RB_MiAi_BaseInfo_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from RB_MiAi_BaseInfo where Status=0"
);
if
(
where
!=
null
)
{
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" and TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" and MallBaseId={0}"
,
where
.
MallBaseId
);
}
if
(
where
.
Id
>
0
)
{
sb
.
AppendFormat
(
" and Id={0}"
,
where
.
Id
);
}
}
return
Get
<
RB_MiAi_BaseInfo_Extend
>(
sb
.
ToString
()).
ToList
();
}
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_MiAi_BaseInfo_Extend
>
GetBaseInfoPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_MiAi_BaseInfo_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from RB_MiAi_BaseInfo where Status=0"
);
if
(
where
!=
null
)
{
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" and TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" and MallBaseId={0}"
,
where
.
MallBaseId
);
}
if
(
where
.
Id
>
0
)
{
sb
.
AppendFormat
(
" and Id={0}"
,
where
.
Id
);
}
if
(
where
.
UserId
>
0
)
{
sb
.
AppendFormat
(
" and UserId={0}"
,
where
.
UserId
);
}
}
return
GetPage
<
RB_MiAi_BaseInfo_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
sb
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
07113b7c
...
@@ -13,6 +13,7 @@ using Newtonsoft.Json.Linq;
...
@@ -13,6 +13,7 @@ using Newtonsoft.Json.Linq;
using
Mall.Common
;
using
Mall.Common
;
using
Mall.AOP
;
using
Mall.AOP
;
using
Mall.Module.Miai
;
using
Mall.Module.Miai
;
using
Mall.Model.Extend.Miai
;
namespace
Mall.WebApi.Controllers.MallBase
namespace
Mall.WebApi.Controllers.MallBase
{
{
...
@@ -27,5 +28,49 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -27,5 +28,49 @@ namespace Mall.WebApi.Controllers.MallBase
#
region
活动版块
#
region
活动版块
#
endregion
#
endregion
#
region
基础信息
/// <summary>
/// 填写个人基础信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSetMiAiBaseInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
AppletUserInfo
uInfo
=
UserReidsCache
.
GetAppletUserBlacklistInfo
(
userInfo
.
UserId
);
if
((
uInfo
?.
Blacklist
??
0
)
==
1
)
{
return
ApiResult
.
Failed
(
"已进入黑名单,无法访问"
);
}
RB_MiAi_BaseInfo_Extend
comment
=
JsonConvert
.
DeserializeObject
<
RB_MiAi_BaseInfo_Extend
>(
req
.
msg
.
ToString
());
comment
.
Status
=
0
;
comment
.
CreateDate
=
DateTime
.
Now
;
comment
.
UserId
=
userInfo
.
UserId
;
comment
.
TenantId
=
userInfo
.
TenantId
;
comment
.
MallBaseId
=
userInfo
.
MallBaseId
;
var
oldBaseInfo
=
miaiModule
.
GetBaseInfoList
(
new
RB_MiAi_BaseInfo_Extend
{
UserId
=
comment
.
UserId
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
}).
FirstOrDefault
();
if
(
oldBaseInfo
==
null
&&
oldBaseInfo
.
Id
==
0
)
{
if
(
miaiModule
.
SetMiAiBaseInfo
(
comment
))
{
return
ApiResult
.
Success
(
"基础资料填写成功"
);
}
else
{
return
ApiResult
.
Failed
(
"基础资料填写失败"
);
}
}
else
{
return
ApiResult
.
Failed
(
"请勿重复填写基础资料"
);
}
}
#
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