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
dc6a7e7c
Commit
dc6a7e7c
authored
Feb 24, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
ff2159db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
353 additions
and
46 deletions
+353
-46
RB_MiAi_BaseInfo.cs
Mall.Model/Entity/Miai/RB_MiAi_BaseInfo.cs
+81
-0
RB_MiAi_BaseInfo_Extend.cs
Mall.Model/Extend/Miai/RB_MiAi_BaseInfo_Extend.cs
+5
-2
MiaiModule.cs
Mall.Module.Miai/MiaiModule.cs
+80
-13
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+187
-31
No files found.
Mall.Model/Entity/Miai/RB_MiAi_BaseInfo.cs
View file @
dc6a7e7c
...
...
@@ -81,6 +81,87 @@ namespace Mall.Model.Entity.Miai
public
string
IDCardBack
{
get
;
set
;
}
/// <summary>
/// 户口
/// </summary>
public
string
HuKou
{
get
;
set
;
}
/// <summary>
/// 籍贯
/// </summary>
public
string
NativePlace
{
get
;
set
;
}
/// <summary>
/// 房屋信息
/// </summary>
public
string
HouseInfo
{
get
;
set
;
}
/// <summary>
/// 学校信息
/// </summary>
public
string
SchoolInfo
{
get
;
set
;
}
/// <summary>
/// 年收入
/// </summary>
public
string
YearMoney
{
get
;
set
;
}
/// <summary>
/// 职务
/// </summary>
public
string
Job
{
get
;
set
;
}
/// <summary>
/// 其他兄弟姐妹
/// </summary>
public
string
OtherPople
{
get
;
set
;
}
/// <summary>
/// 专业
/// </summary>
public
string
MajorInfo
{
get
;
set
;
}
/// <summary>
/// 车辆信息
/// </summary>
public
string
CarInfo
{
get
;
set
;
}
/// <summary>
/// 父亲工作信息
/// </summary>
public
string
FatherInfo
{
get
;
set
;
}
/// <summary>
/// 母亲工作信息
/// </summary>
public
string
MotherInfo
{
get
;
set
;
}
/// <summary>
/// 关于
/// </summary>
public
string
About
{
get
;
set
;
}
/// <summary>
/// 理想爱情
/// </summary>
public
string
IdealLove
{
get
;
set
;
}
/// <summary>
/// 相册
/// </summary>
public
string
Album
{
get
;
set
;
}
/// <summary>
/// 浏览数
/// </summary>
public
int
BrowseNum
{
get
;
set
;
}
/// <summary>
/// 关注数
/// </summary>
public
int
FollowNum
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
...
...
Mall.Model/Extend/Miai/RB_MiAi_BaseInfo_Extend.cs
View file @
dc6a7e7c
...
...
@@ -5,8 +5,11 @@ using Mall.Model.Entity.Miai;
namespace
Mall.Model.Extend.Miai
{
public
class
RB_MiAi_BaseInfo_Extend
:
RB_MiAi_BaseInfo
public
class
RB_MiAi_BaseInfo_Extend
:
RB_MiAi_BaseInfo
{
/// <summary>
/// 相册
/// </summary>
public
List
<
string
>
AlbumList
{
get
;
set
;
}
}
}
Mall.Module.Miai/MiaiModule.cs
View file @
dc6a7e7c
...
...
@@ -81,7 +81,8 @@ namespace Mall.Module.Miai
bool
flag
=
miai_ForumRepository
.
Update
(
keyValues
,
wheres
);
return
flag
;
}
else
{
else
{
bool
flag
=
miai_ForumRepository
.
Insert
(
demodel
)
>
0
;
return
flag
;
}
...
...
@@ -113,7 +114,8 @@ namespace Mall.Module.Miai
bool
flag
=
miai_ForumRepository
.
Update
(
keyValues
,
wheres
);
return
flag
;
}
else
{
else
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Miai_Forum_Extend
.
Status
),
1
},
{
nameof
(
RB_Miai_Forum_Extend
.
UpdateDate
),
DateTime
.
Now
},
...
...
@@ -254,7 +256,8 @@ namespace Mall.Module.Miai
};
return
miai_ActivityRepository
.
Update
(
keyValues
,
wheres
);
}
else
{
else
{
return
miai_ActivityRepository
.
Insert
(
demodel
)
>
0
;
}
}
...
...
@@ -282,7 +285,8 @@ namespace Mall.Module.Miai
}
};
bool
flag
=
miai_ActivityRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
if
(
flag
)
{
miai_LogRepository
.
Insert
(
new
Model
.
Entity
.
Miai
.
RB_Miai_Log
()
{
Id
=
0
,
...
...
@@ -349,20 +353,24 @@ namespace Mall.Module.Miai
{
demodel
.
ParentId
=
-
1
;
//查询主评论
var
list
=
miai_ActivityDiscussRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
//查询评论下 前几条回复记录
List
<
int
>
PidsList
=
list
.
Select
(
x
=>
x
.
Id
).
ToList
();
var
clist
=
miai_ActivityDiscussRepository
.
GetActivityDiscussChildList
(
PidsList
,
4
);
//查询评论回复数量
var
rlist
=
miai_ActivityDiscussRepository
.
GetDiscussReplyNumList
(
string
.
Join
(
","
,
PidsList
));
foreach
(
var
item
in
list
)
{
foreach
(
var
item
in
list
)
{
item
.
ReplyList
=
clist
.
Where
(
x
=>
x
.
ParentId
==
item
.
Id
).
OrderBy
(
x
=>
x
.
Id
).
ToList
();
item
.
ReplyNum
=
rlist
.
Where
(
x
=>
x
.
ParentId
==
item
.
Id
).
FirstOrDefault
()?.
ReplyNum
??
0
;
item
.
ImageList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
Images
)
&&
item
.
Images
!=
"[]"
)
{
if
(!
string
.
IsNullOrEmpty
(
item
.
Images
)
&&
item
.
Images
!=
"[]"
)
{
item
.
ImageList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
Images
);
}
foreach
(
var
qitem
in
item
.
ReplyList
)
{
foreach
(
var
qitem
in
item
.
ReplyList
)
{
qitem
.
ImageList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
qitem
.
Images
)
&&
qitem
.
Images
!=
"[]"
)
{
...
...
@@ -372,7 +380,7 @@ namespace Mall.Module.Miai
}
}
return
list
;
}
}
/// <summary>
/// 获取评论回复分页列表
...
...
@@ -475,7 +483,7 @@ namespace Mall.Module.Miai
/// <param name="discussId"></param>
/// <param name="empId"></param>
/// <returns></returns>
public
string
DelActivityDiscussInfo_V2
(
int
discussId
,
int
empId
,
int
TenantId
,
int
MallBaseId
)
public
string
DelActivityDiscussInfo_V2
(
int
discussId
,
int
empId
,
int
TenantId
,
int
MallBaseId
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Miai_ActivityDiscuss_Extend
.
Status
),
1
},
...
...
@@ -531,7 +539,8 @@ namespace Mall.Module.Miai
if
(
list
.
Any
())
{
return
"已存在报名信息"
;
}
var
model
=
miai_ActivityRepository
.
GetEntity
(
demodel
.
ActivityId
);
if
(
model
==
null
||
model
.
Status
==
1
)
{
return
"活动不存在"
;
}
if
(
model
.
Deadline
<=
DateTime
.
Now
)
{
if
(
model
.
Deadline
<=
DateTime
.
Now
)
{
return
"已过了报名时间,无法报名"
;
}
bool
flag
=
miai_ActivityEnrollRepository
.
Insert
(
demodel
)
>
0
;
...
...
@@ -605,6 +614,42 @@ namespace Mall.Module.Miai
{
flag
=
miai_BaseInfoRepository
.
Insert
(
model
)
>
0
;
}
else
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Sex
),
model
.
Sex
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Birthday
),
model
.
Birthday
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Weight
),
model
.
Weight
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Height
),
model
.
Height
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
EducationType
),
model
.
EducationType
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Marriage
),
model
.
Marriage
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
RealName
),
model
.
RealName
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
IDCardNo
),
model
.
IDCardNo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
IDCard
),
model
.
IDCard
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
IDCardBack
),
model
.
IDCardBack
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
HuKou
),
model
.
HuKou
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
NativePlace
),
model
.
NativePlace
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
HouseInfo
),
model
.
HouseInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
SchoolInfo
),
model
.
SchoolInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
YearMoney
),
model
.
YearMoney
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
Job
),
model
.
Job
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
OtherPople
),
model
.
OtherPople
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
MajorInfo
),
model
.
MajorInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
CarInfo
),
model
.
CarInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
FatherInfo
),
model
.
FatherInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
MotherInfo
),
model
.
MotherInfo
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
About
),
model
.
About
},
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
IdealLove
),
model
.
IdealLove
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_MiAi_BaseInfo_Extend
.
Id
),
FiledValue
=
model
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
miai_BaseInfoRepository
.
Update
(
keyValues
,
wheres
);
}
return
flag
;
}
#
endregion
...
...
@@ -615,15 +660,15 @@ namespace Mall.Module.Miai
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddOrUpdateFollowMember
(
RB_MiAi_FollowMember
model
)
public
bool
AddOrUpdateFollowMember
(
RB_MiAi_FollowMember
model
,
RB_MiAi_BaseInfo_Extend
baseInfo
)
{
bool
flag
=
false
;
try
{
if
(
model
.
ID
==
0
)
{
flag
=
miai_FollowMemberRepository
.
Insert
(
model
)
>
0
;
baseInfo
.
FollowNum
+=
1
;
}
else
{
...
...
@@ -638,8 +683,30 @@ namespace Mall.Module.Miai
OperatorEnum
=
OperatorEnum
.
Equal
}
};
if
(
model
.
Status
==
1
)
//取消关注
{
baseInfo
.
FollowNum
-=
1
;
}
else
{
baseInfo
.
FollowNum
+=
1
;
}
flag
=
miai_FollowMemberRepository
.
Update
(
keyValues
,
wheres
);
}
if
(
flag
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiAi_BaseInfo_Extend
.
FollowNum
),
baseInfo
.
FollowNum
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_MiAi_BaseInfo_Extend
.
Id
),
FiledValue
=
baseInfo
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
miai_BaseInfoRepository
.
Update
(
keyValues
,
wheres
);
}
}
catch
(
Exception
ex
)
{
...
...
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
dc6a7e7c
This diff is collapsed.
Click to expand it.
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