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
521f2804
Commit
521f2804
authored
Mar 11, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq-ld' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
705696ea
48fac8a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
680 additions
and
19 deletions
+680
-19
MessageTypeEnum.cs
Mall.Common/Enum/MiAi/MessageTypeEnum.cs
+46
-0
RB_Miai_Activity.cs
Mall.Model/Entity/Miai/RB_Miai_Activity.cs
+35
-0
RB_Miai_ActivityEnroll.cs
Mall.Model/Entity/Miai/RB_Miai_ActivityEnroll.cs
+5
-0
RB_Miai_Message.cs
Mall.Model/Entity/Miai/RB_Miai_Message.cs
+102
-0
RB_Miai_ActivityEnroll_Extend.cs
Mall.Model/Extend/Miai/RB_Miai_ActivityEnroll_Extend.cs
+0
-5
RB_Miai_Message_Extend.cs
Mall.Model/Extend/Miai/RB_Miai_Message_Extend.cs
+18
-0
MiaiCommonModule.cs
Mall.Module.Miai/MiaiCommonModule.cs
+102
-0
MiaiModule.cs
Mall.Module.Miai/MiaiModule.cs
+153
-6
UserModule.cs
Mall.Module.User/UserModule.cs
+7
-3
RB_Miai_ActivityEnrollRepository.cs
Mall.Repository/Miai/RB_Miai_ActivityEnrollRepository.cs
+5
-3
RB_Miai_MessageRepository.cs
Mall.Repository/Miai/RB_Miai_MessageRepository.cs
+133
-0
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+66
-2
MiaiController.cs
Mall.WebApi/Controllers/Miai/MiaiController.cs
+8
-0
No files found.
Mall.Common/Enum/MiAi/MessageTypeEnum.cs
0 → 100644
View file @
521f2804
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Plugin
;
namespace
Mall.Common.Enum.MiAi
{
public
enum
MessageTypeEnum
{
/// <summary>
/// 圈子点赞
/// </summary>
[
EnumField
(
"圈子点赞"
)]
CircleLike
=
1
,
/// <summary>
/// 圈子评论
/// </summary>
[
EnumField
(
"圈子评论"
)]
CircleComment
=
2
,
/// <summary>
/// 圈子回复
/// </summary>
[
EnumField
(
"圈子回复"
)]
CircleReply
=
3
,
/// <summary>
/// 拼拼报名
/// </summary>
[
EnumField
(
"拼拼报名"
)]
SpellEnroll
=
4
,
/// <summary>
/// 拼拼取消报名
/// </summary>
[
EnumField
(
"拼拼取消报名"
)]
SpellEnrollCancel
=
5
,
/// <summary>
/// 拼拼评论
/// </summary>
[
EnumField
(
"拼拼评论"
)]
SpellComment
=
6
,
/// <summary>
/// 谁查看了我
/// </summary>
[
EnumField
(
"谁查看了我"
)]
Look
=
7
,
}
}
Mall.Model/Entity/Miai/RB_Miai_Activity.cs
View file @
521f2804
...
...
@@ -98,5 +98,40 @@ namespace Mall.Model.Entity.Miai
get
;
set
;
}
/// <summary>
/// 标签
/// </summary>
public
string
Label
{
get
;
set
;
}
/// <summary>
/// 活动开始时间
/// </summary>
public
DateTime
StartTime
{
get
;
set
;
}
/// <summary>
/// 活动结束时间
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
/// <summary>
/// 男数量
/// </summary>
public
int
ManNum
{
get
;
set
;
}
/// <summary>
/// 女数量
/// </summary>
public
int
WoManNum
{
get
;
set
;
}
/// <summary>
/// 经纬度(逗号分隔)
/// </summary>
public
string
LonLat
{
get
;
set
;
}
/// <summary>
/// 位置名称
/// </summary>
public
string
LocationName
{
get
;
set
;
}
}
}
Mall.Model/Entity/Miai/RB_Miai_ActivityEnroll.cs
View file @
521f2804
...
...
@@ -89,5 +89,10 @@ namespace Mall.Model.Entity.Miai
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 性别 1男 2女
/// </summary>
public
int
Sex
{
get
;
set
;
}
}
}
Mall.Model/Entity/Miai/RB_Miai_Message.cs
0 → 100644
View file @
521f2804
using
VT.FW.DB
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Common.Enum.MiAi
;
namespace
Mall.Model.Entity.Miai
{
/// <summary>
/// 相亲消息表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Miai_Message
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 来源id
/// </summary>
public
int
SourceId
{
get
;
set
;
}
/// <summary>
/// 接收用户id
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 类型 枚举
/// </summary>
public
MessageTypeEnum
Type
{
get
;
set
;
}
/// <summary>
/// 操作内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Extend/Miai/RB_Miai_ActivityEnroll_Extend.cs
View file @
521f2804
...
...
@@ -23,11 +23,6 @@ namespace Mall.Model.Extend.Miai
/// </summary>
public
string
Photo
{
get
;
set
;
}
/// <summary>
/// 性别 1男 2女
/// </summary>
public
int
Sex
{
get
;
set
;
}
/// <summary>
/// 是否关注 1是 2否
/// </summary>
...
...
Mall.Model/Extend/Miai/RB_Miai_Message_Extend.cs
0 → 100644
View file @
521f2804
using
VT.FW.DB
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Miai
;
namespace
Mall.Model.Extend.Miai
{
/// <summary>
/// 相亲消息扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Miai_Message_Extend
:
RB_Miai_Message
{
}
}
Mall.Module.Miai/MiaiCommonModule.cs
0 → 100644
View file @
521f2804
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Mall.Common
;
using
Mall.Common.Plugin
;
using
Newtonsoft.Json
;
using
Mall.Common.API
;
using
Newtonsoft.Json.Linq
;
using
VT.FW.DB
;
using
Mall.Repository.Miai
;
using
Mall.Model.Extend.Miai
;
namespace
Mall.Module.Miai
{
/// <summary>
/// 相亲处理层
/// </summary>
public
class
MiaiCommonModule
{
/// <summary>
/// 消息
/// </summary>
private
readonly
RB_Miai_MessageRepository
miai_MessageRepository
=
new
RB_Miai_MessageRepository
();
#
region
消息通知
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Miai_Message_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Miai_Message_Extend
dmodel
)
{
return
miai_MessageRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
dmodel
);
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Miai_Message_Extend
>
GetList
(
RB_Miai_Message_Extend
dmodel
)
{
return
miai_MessageRepository
.
GetList
(
dmodel
);
}
/// <summary>
/// 新增消息
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
bool
SetMessage
(
RB_Miai_Message_Extend
dmodel
)
{
return
miai_MessageRepository
.
Insert
(
dmodel
)
>
0
;
}
/// <summary>
/// 获取消息数量
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
int
GetMessageNum
(
RB_Miai_Message_Extend
dmodel
)
{
return
miai_MessageRepository
.
GetMessageNum
(
dmodel
);
}
/// <summary>
/// 删除消息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
DelMessage
(
int
Id
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Miai_Message_Extend
.
Status
),
1
},
{
nameof
(
RB_Miai_Message_Extend
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Miai_Message_Extend
.
Id
),
FiledValue
=
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
miai_MessageRepository
.
Update
(
keyValues
,
wheres
);
}
/// <summary>
/// 批量清除
/// </summary>
/// <param name="type"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
internal
bool
DelMiaiMessageInfoBatch
(
int
type
,
AppletUserInfo
userInfo
)
{
return
miai_MessageRepository
.
DelMiaiMessageInfoBatch
(
type
,
userInfo
.
UserId
);
}
#
endregion
}
}
Mall.Module.Miai/MiaiModule.cs
View file @
521f2804
This diff is collapsed.
Click to expand it.
Mall.Module.User/UserModule.cs
View file @
521f2804
...
...
@@ -197,7 +197,10 @@ namespace Mall.Module.User
/// 教师仓储
/// </summary>
private
readonly
Repository
.
Education
.
RB_Education_TeacherRepository
educationTeacherRepository
=
new
Repository
.
Education
.
RB_Education_TeacherRepository
();
/// <summary>
/// 消息
/// </summary>
private
readonly
RB_Miai_MessageRepository
miai_MessageRepository
=
new
RB_Miai_MessageRepository
();
private
readonly
RB_MiAi_BaseInfoRepository
miai_BaseInfoRepository
=
new
RB_MiAi_BaseInfoRepository
();
...
...
@@ -4632,7 +4635,8 @@ namespace Mall.Module.User
//var oldFollowList = miai_FollowMemberRepository.GetFollowMemberList(new Model.Extend.Miai.RB_MiAi_FollowMember_Extend { Status =0, UserId = umodel.Id, MallBaseId = umodel.MallBaseId, TenantId = umodel.TenantId });//我的粉丝
var
myFollowList
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
Model
.
Extend
.
Miai
.
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
CreateBy
=
umodel
.
Id
,
MallBaseId
=
umodel
.
MallBaseId
,
TenantId
=
umodel
.
TenantId
});
//我的关注
//消息数量
int
MessageNum
=
miai_MessageRepository
.
GetMessageNum
(
new
Model
.
Extend
.
Miai
.
RB_Miai_Message_Extend
()
{
TenantId
=
umodel
.
TenantId
,
MallBaseId
=
umodel
.
MallBaseId
,
UserId
=
umodel
.
Id
});
objData
=
new
{
...
...
@@ -4690,7 +4694,7 @@ namespace Mall.Module.User
Sex
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
oldBaseInfo
.
Sex
:
0
,
//0-未认证,1-男-2女
myFollowNum
=
(
oldBaseInfo
!=
null
&&
oldBaseInfo
.
Id
>
0
)
?
oldBaseInfo
.
FollowNum
:
0
,
//关注我的
followNum
=
(
myFollowList
!=
null
&&
myFollowList
.
Any
())
?
myFollowList
.
Count
:
0
,
//我的关注
messageNum
=
MessageNum
};
}
return
objData
;
...
...
Mall.Repository/Miai/RB_Miai_ActivityEnrollRepository.cs
View file @
521f2804
...
...
@@ -42,9 +42,8 @@ namespace Mall.Repository.Miai
{
where
+=
$@" and e.
{
nameof
(
RB_Miai_ActivityEnroll_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
string
sql
=
$@"select e.*,u.Name as UserName,u.Photo
,b.Sex
from RB_Miai_ActivityEnroll e
string
sql
=
$@"select e.*,u.Name as UserName,u.Photo from RB_Miai_ActivityEnroll e
left join rb_member_user u on e.UserId = u.Id
left join rb_miai_baseinfo b on e.UserId =b.UserId
where
{
where
}
order by e.Id desc"
;
return
GetPage
<
RB_Miai_ActivityEnroll_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
...
...
@@ -82,9 +81,12 @@ where {where} order by e.Id desc";
/// </summary>
/// <param name="activityId"></param>
/// <returns></returns>
public
int
GetActivityEnrollNum
(
int
activityId
)
public
int
GetActivityEnrollNum
(
int
activityId
,
int
sex
=
0
)
{
string
sql
=
$@" select count(0) from RB_Miai_ActivityEnroll where Status =0 and ActivityId =
{
activityId
}
"
;
if
(
sex
>
0
)
{
sql
+=
$@" and Sex =
{
sex
}
"
;
}
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToInt32
(
obj
);
}
...
...
Mall.Repository/Miai/RB_Miai_MessageRepository.cs
0 → 100644
View file @
521f2804
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Miai
;
using
Mall.Model.Extend.Miai
;
using
System.Linq
;
namespace
Mall.Repository.Miai
{
/// <summary>
/// 相亲消息仓储层
/// </summary>
public
class
RB_Miai_MessageRepository
:
BaseRepository
<
RB_Miai_Message
>
{
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Miai_Message_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Miai_Message_Extend
dmodel
)
{
string
where
=
$" 1=1 "
;
if
(
dmodel
.
Status
>=
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Status
)}
=
{
dmodel
.
Status
}
"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Type
)}
=
{(
int
)
dmodel
.
Type
}
"
;
}
string
sql
=
$@"select * from RB_Miai_Message where
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Miai_Message_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Miai_Message_Extend
>
GetList
(
RB_Miai_Message_Extend
dmodel
)
{
string
where
=
$" 1=1 "
;
if
(
dmodel
.
Status
>=
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Status
)}
=
{
dmodel
.
Status
}
"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Type
)}
=
{(
int
)
dmodel
.
Type
}
"
;
}
string
sql
=
$@"select * from RB_Miai_Message where
{
where
}
order by Id desc"
;
return
Get
<
RB_Miai_Message_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 批量清除
/// </summary>
/// <param name="type"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
DelMiaiMessageInfoBatch
(
int
type
,
int
userId
)
{
string
sql
=
$@"update RB_Miai_Message set Status =1 where UserId =
{
userId
}
"
;
if
(
type
>
0
)
{
sql
+=
$@" and Type =
{
type
}
"
;
}
return
Execute
(
sql
)
>
0
;
}
/// <summary>
/// 获取消息数量
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
int
GetMessageNum
(
RB_Miai_Message_Extend
dmodel
)
{
string
where
=
$" 1=1 "
;
if
(
dmodel
.
Status
>=
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Status
)}
=
{
dmodel
.
Status
}
"
;
}
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
Type
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Miai_Message_Extend
.
Type
)}
=
{(
int
)
dmodel
.
Type
}
"
;
}
string
sql
=
$@"select count(0) from RB_Miai_Message where
{
where
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
return
obj
==
null
?
0
:
Convert
.
ToInt32
(
obj
);
}
}
}
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
521f2804
...
...
@@ -91,6 +91,13 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
ReplyNum
,
x
.
EnrollNum
,
x
.
IsOpenEnroll
,
x
.
Label
,
StartTime
=
x
.
StartTime
.
ToString
(
"yyyy-MM-dd HH:mm"
),
EndTime
=
x
.
EndTime
.
ToString
(
"yyyy-MM-dd HH:mm"
),
x
.
ManNum
,
x
.
WoManNum
,
x
.
LonLat
,
x
.
LocationName
,
x
.
ForumId
,
x
.
ForumName
,
x
.
ForumIcon
,
...
...
@@ -200,14 +207,14 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
miaiModule
.
SetActivityInfo
(
demodel
);
bool
flag
=
miaiModule
.
SetActivityInfo
(
demodel
,
out
string
msg
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
return
ApiResult
.
Failed
(
msg
);
}
}
...
...
@@ -575,6 +582,63 @@ namespace Mall.WebApi.Controllers.MallBase
#
endregion
#
region
通知消息
/// <summary>
/// 获取消息分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetMiaiMessagePageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Miai_Message_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Miai_Message_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
var
list
=
miaiModule
.
GetMiaiMessagePageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Type
,
TypeName
=
x
.
Type
.
GetEnumName
(),
x
.
SourceId
,
x
.
Content
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 删除单条消息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
DelMiaiMessageInfo
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
MessageId
=
parms
.
GetInt
(
"MessageId"
,
0
);
if
(
MessageId
<=
0
)
{
return
ApiResult
.
Failed
();
}
bool
flag
=
miaiModule
.
DelMiaiMessageInfo
(
MessageId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
[
HttpPost
]
public
ApiResult
DelMiaiMessageInfoBatch
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
// 0表示 清除所有的
bool
flag
=
miaiModule
.
DelMiaiMessageInfoBatch
(
Type
,
userInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
基础信息
/// <summary>
...
...
Mall.WebApi/Controllers/Miai/MiaiController.cs
View file @
521f2804
...
...
@@ -141,6 +141,13 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
ReplyNum
,
x
.
EnrollNum
,
x
.
IsOpenEnroll
,
x
.
Label
,
StartTime
=
x
.
StartTime
.
ToString
(
"yyyy-MM-dd HH:mm"
),
EndTime
=
x
.
EndTime
.
ToString
(
"yyyy-MM-dd HH:mm"
),
x
.
ManNum
,
x
.
WoManNum
,
x
.
LonLat
,
x
.
LocationName
,
Deadline
=
x
.
IsOpenEnroll
==
1
?
x
.
Deadline
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
:
""
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
...
...
@@ -320,6 +327,7 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
Mobile
,
x
.
PeopleNum
,
x
.
Remark
,
x
.
Sex
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
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