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
7b002825
Commit
7b002825
authored
Feb 21, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
473b3454
07113b7c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
296 additions
and
0 deletions
+296
-0
RB_MiAi_BaseInfo.cs
Mall.Model/Entity/Miai/RB_MiAi_BaseInfo.cs
+114
-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
+44
-0
No files found.
Mall.Model/Entity/Miai/RB_MiAi_BaseInfo.cs
0 → 100644
View file @
7b002825
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Miai
{
/// <summary>
/// 相亲会员基础资料
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_MiAi_BaseInfo
{
/// <summary>
/// 编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 会员id
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 性别
/// </summary>
public
int
Sex
{
get
;
set
;
}
/// <summary>
/// 生日
/// </summary>
public
string
Birthday
{
get
;
set
;
}
/// <summary>
/// 体重
/// </summary>
public
decimal
Weight
{
get
;
set
;
}
/// <summary>
/// 身高
/// </summary>
public
decimal
Height
{
get
;
set
;
}
/// <summary>
/// 学历
/// </summary>
public
int
EducationType
{
get
;
set
;
}
/// <summary>
/// 婚姻
/// </summary>
public
int
Marriage
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
RealName
{
get
;
set
;
}
/// <summary>
/// 身份证号
/// </summary>
public
string
IDCard
{
get
;
set
;
}
/// <summary>
/// 身份证反面
/// </summary>
public
string
IDCardBack
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Extend/Miai/RB_MiAi_BaseInfo_Extend.cs
0 → 100644
View file @
7b002825
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 @
7b002825
...
...
@@ -23,6 +23,9 @@ namespace Mall.Module.Miai
private
readonly
RB_Miai_ActivityEnrollRepository
miai_ActivityEnrollRepository
=
new
RB_Miai_ActivityEnrollRepository
();
private
readonly
RB_Miai_ActivityDiscussRepository
miai_ActivityDiscussRepository
=
new
RB_Miai_ActivityDiscussRepository
();
private
readonly
RB_MiAi_BaseInfoRepository
miai_BaseInfoRepository
=
new
RB_MiAi_BaseInfoRepository
();
#
region
活动版块
/// <summary>
/// 获取活动版本分页列表
...
...
@@ -223,6 +226,48 @@ namespace Mall.Module.Miai
}
#
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 @
7b002825
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 @
7b002825
...
...
@@ -178,5 +178,49 @@ namespace Mall.WebApi.Controllers.MallBase
}
#
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