Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
af9c2ab2
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
af9c2ab2
编写于
5月 25, 2023
作者:
M
MicroMilo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'backend' of
https://gitcode.net/qq_50679803/great-teamwork
into backend
上级
f323f573
047f3834
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
100 addition
and
12 deletion
+100
-12
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-message-readMessage/index.js
...oud-aliyun/cloudfunctions/fe-message-readMessage/index.js
+49
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-message-readMessage/package.json
...aliyun/cloudfunctions/fe-message-readMessage/package.json
+7
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-cancelActivity/index.js
...oud-aliyun/cloudfunctions/fe-team-cancelActivity/index.js
+36
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-cancelActivity/package.json
...aliyun/cloudfunctions/fe-team-cancelActivity/package.json
+7
-0
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
.../uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
+1
-1
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
...uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
+0
-11
未找到文件。
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-message-readMessage/index.js
0 → 100644
浏览文件 @
af9c2ab2
'
use strict
'
;
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-message
'
)
const
usercollection
=
db
.
collection
(
'
mustgo-user
'
)
const
postcollection
=
db
.
collection
(
'
mustgo-post
'
)
let
res
=
await
collection
.
where
({
to_id
:
event
.
userId
}).
get
()
var
list
=
new
Array
;
var
arr
=
new
Array
;
arr
=
res
.
data
;
if
(
res
.
affectedDocs
>=
0
)
{
for
(
var
i
=
arr
.
length
-
1
;
i
>=
0
;
i
--
)
{
let
userres
=
await
usercollection
.
where
({
_id
:
arr
[
i
][
"
from_id
"
]
}).
get
()
let
postres
=
await
postcollection
.
where
({
_id
:
arr
[
i
][
"
post_id
"
]
}).
get
()
var
message
=
{
id
:
arr
[
i
][
"
_id
"
],
types
:
arr
[
i
][
"
types
"
],
content
:
arr
[
i
][
"
content
"
],
time
:
arr
[
i
][
"
time
"
],
user_icon
:
userres
.
data
[
0
][
"
icon
"
],
user_name
:
userres
.
data
[
0
][
"
name
"
],
picture
:
postres
.
data
[
0
][
"
url
"
][
0
]
}
list
.
push
(
message
);
}
return
{
code
:
200
,
message
:
"
成功返回消息列表
"
,
data
:
{
messages
:
list
}
}
}
return
{
code
:
400
,
message
:
"
返回消息列表失败
"
,
data
:
{}
}
};
\ No newline at end of file
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-message-readMessage/package.json
0 → 100644
浏览文件 @
af9c2ab2
{
"name"
:
"fe-message-readMessage"
,
"dependencies"
:
{},
"extensions"
:
{
"uni-cloud-jql"
:
{}
}
}
\ No newline at end of file
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-cancelActivity/index.js
0 → 100644
浏览文件 @
af9c2ab2
'
use strict
'
;
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-registration
'
)
const
activitycollection
=
db
.
collection
(
'
mustgo-team-activity
'
)
let
regres
=
await
collection
.
where
({
team_activity_id
:
event
.
activityId
,
owner_id
:
event
.
userId
}).
remove
()
let
result
=
await
activitycollection
.
where
({
_id
:
event
.
activityId
}).
get
()
if
(
result
.
affectedDocs
==
1
)
{
const
res
=
await
activitycollection
.
doc
(
event
.
activityId
).
update
({
enrollment
:
result
.
data
[
0
][
"
enrollment
"
]
-
1
})
if
(
regres
.
affectedDocs
==
1
&&
res
.
affectedDocs
==
1
)
{
return
{
"
code
"
:
200
,
"
message
"
:
"
取消报名成功
"
,
"
data
"
:
{}
}
}
}
return
{
"
code
"
:
400
,
"
message
"
:
"
取消报名失败
"
,
"
data
"
:
{}
}
};
\ No newline at end of file
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-cancelActivity/package.json
0 → 100644
浏览文件 @
af9c2ab2
{
"name"
:
"fe-team-cancelActivity"
,
"dependencies"
:
{},
"extensions"
:
{
"uni-cloud-jql"
:
{}
}
}
\ No newline at end of file
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-joinTeam/index.js
浏览文件 @
af9c2ab2
alpha/admin/uniCloud-aliyun/cloudfunctions/fe-team-leaveTeam/index.js
浏览文件 @
af9c2ab2
...
...
@@ -2,11 +2,8 @@
exports
.
main
=
async
(
event
,
context
)
=>
{
const
db
=
uniCloud
.
database
()
const
collection
=
db
.
collection
(
'
mustgo-user
'
)
<<<<<<<
HEAD
=======
const
activitycollection
=
db
.
collection
(
'
mustgo-team-activity
'
)
>>>>>>>
23
cd157a5405ab804c346a27b655ccf7564925eb
let
res1
=
await
collection
.
where
({
_id
:
event
.
userId
...
...
@@ -58,13 +55,6 @@ exports.main = async (event, context) => {
arr
=
res2
.
data
const
registration
=
db
.
collection
(
'
mustgo-registration
'
)
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
<<<<<<<
HEAD
const
tmp
=
await
registration
.
where
({
team_activity_id
:
arr
[
i
][
"
_id
"
]
}).
remove
()
// doc(`${id}`).update({team_activity_id:{name:dbCmd.remove()}})
=======
const
res
=
await
activitycollection
.
doc
(
arr
[
i
][
"
_id
"
]).
update
({
enrollment
:
arr
[
i
][
"
enrollment
"
]
-
1
})
...
...
@@ -72,7 +62,6 @@ exports.main = async (event, context) => {
const
tmp
=
await
registration
.
where
({
team_activity_id
:
arr
[
i
][
"
_id
"
]
}).
remove
()
>>>>>>>
23
cd157a5405ab804c346a27b655ccf7564925eb
}
return
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录