Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Compass
Overview
Overview
Details
Activity
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
zong
Compass
Commits
118308e9
Commit
118308e9
authored
Feb 22, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
aed44eeb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
8 deletions
+83
-8
compass_db_schema.txt
doc/DB/compass_db_schema.txt
+4
-2
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
FamilyEventDat.inc
src/cn/compass/entity/FamilyEventDat.inc
+0
-3
SocialEventDat.inc
src/cn/compass/entity/SocialEventDat.inc
+3
-3
compass_include.inc
src/settings/compass_include.inc
+2
-0
synchronize_family_event_dat.php
src/user/if/synchronize_family_event_dat.php
+74
-0
No files found.
doc/DB/compass_db_schema.txt
View file @
118308e9
...
@@ -258,8 +258,8 @@ CREATE TABLE IF NOT EXISTS social_event_dat(
...
@@ -258,8 +258,8 @@ CREATE TABLE IF NOT EXISTS social_event_dat(
title text NOT NULL,
title text NOT NULL,
author text NOT NULL,
author text NOT NULL,
publish_time timestamp NOT NULL,
publish_time timestamp NOT NULL,
images text,
content text NOT NULL,
content text NOT NULL,
scope int8 NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
...
@@ -284,6 +284,8 @@ CREATE TABLE IF NOT EXISTS social_event_member_dat(
...
@@ -284,6 +284,8 @@ CREATE TABLE IF NOT EXISTS social_event_member_dat(
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX social_event_member_dat_user_id_idx ON social_event_member_dat(user_id);
Create INDEX social_event_member_dat_user_id_idx ON social_event_member_dat(user_id);
Create INDEX social_event_member_dat_social_event_ididx ON social_event_member_dat(social_event_id);
##----family_event_dat create
##----family_event_dat create
...
@@ -301,7 +303,6 @@ CREATE TABLE IF NOT EXISTS family_event_dat(
...
@@ -301,7 +303,6 @@ CREATE TABLE IF NOT EXISTS family_event_dat(
publish_time timestamp NOT NULL,
publish_time timestamp NOT NULL,
images text,
images text,
content text NOT NULL,
content text NOT NULL,
scope int8 NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
...
@@ -326,6 +327,7 @@ CREATE TABLE IF NOT EXISTS family_event_member_dat(
...
@@ -326,6 +327,7 @@ CREATE TABLE IF NOT EXISTS family_event_member_dat(
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX family_event_member_dat_user_id_idx ON family_event_member_dat(user_id);
Create INDEX family_event_member_dat_user_id_idx ON family_event_member_dat(user_id);
Create INDEX family_event_member_dat_family_event_id_idx ON family_event_member_dat(family_event_id);
##----volunteer_event_dat create
##----volunteer_event_dat create
...
...
doc/DB/compass_db_schema.xlsx
View file @
118308e9
No preview for this file type
src/cn/compass/entity/FamilyEventDat.inc
View file @
118308e9
...
@@ -17,7 +17,6 @@ class FamilyEventDat extends CompassDynamicData
...
@@ -17,7 +17,6 @@ class FamilyEventDat extends CompassDynamicData
var
$publish_time
;
var
$publish_time
;
var
$images
;
var
$images
;
var
$content
;
var
$content
;
var
$scope
;
var
$delete_flg
;
var
$delete_flg
;
/**
/**
...
@@ -39,7 +38,6 @@ class FamilyEventDat extends CompassDynamicData
...
@@ -39,7 +38,6 @@ class FamilyEventDat extends CompassDynamicData
$this
->
publish_time
=
$record
[
"publish_time"
];
$this
->
publish_time
=
$record
[
"publish_time"
];
$this
->
images
=
$record
[
"images"
];
$this
->
images
=
$record
[
"images"
];
$this
->
content
=
$record
[
"content"
];
$this
->
content
=
$record
[
"content"
];
$this
->
scope
=
$record
[
"scope"
];
$this
->
delete_flg
=
$record
[
"delete_flg"
];
$this
->
delete_flg
=
$record
[
"delete_flg"
];
}
}
...
@@ -113,7 +111,6 @@ class FamilyEventDat extends CompassDynamicData
...
@@ -113,7 +111,6 @@ class FamilyEventDat extends CompassDynamicData
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"publish_time"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"publish_time"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"images"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"images"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"content"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"content"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"scope"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"delete_flg"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"delete_flg"
);
// 保存
// 保存
...
...
src/cn/compass/entity/SocialEventDat.inc
View file @
118308e9
...
@@ -16,7 +16,7 @@ class SocialEventDat extends CompassDynamicData
...
@@ -16,7 +16,7 @@ class SocialEventDat extends CompassDynamicData
var
$author
;
var
$author
;
var
$publish_time
;
var
$publish_time
;
var
$content
;
var
$content
;
var
$
scope
;
var
$
images
;
var
$delete_flg
;
var
$delete_flg
;
/**
/**
...
@@ -37,7 +37,7 @@ class SocialEventDat extends CompassDynamicData
...
@@ -37,7 +37,7 @@ class SocialEventDat extends CompassDynamicData
$this
->
author
=
$record
[
"author"
];
$this
->
author
=
$record
[
"author"
];
$this
->
publish_time
=
$record
[
"publish_time"
];
$this
->
publish_time
=
$record
[
"publish_time"
];
$this
->
content
=
$record
[
"content"
];
$this
->
content
=
$record
[
"content"
];
$this
->
scope
=
$record
[
"scope
"
];
$this
->
images
=
$record
[
"images
"
];
$this
->
delete_flg
=
$record
[
"delete_flg"
];
$this
->
delete_flg
=
$record
[
"delete_flg"
];
}
}
...
@@ -110,7 +110,7 @@ class SocialEventDat extends CompassDynamicData
...
@@ -110,7 +110,7 @@ class SocialEventDat extends CompassDynamicData
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"author"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"author"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"publish_time"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"publish_time"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"content"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"content"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"scope
"
);
ParamUtil
::
copyObj2Array
NullField
(
$v_param
,
$this
,
"images
"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"delete_flg"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"delete_flg"
);
// 保存
// 保存
...
...
src/settings/compass_include.inc
View file @
118308e9
...
@@ -41,6 +41,8 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserMessageDat.inc");
...
@@ -41,6 +41,8 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserMessageDat.inc");
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/GovernmentQrDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/GovernmentQrDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventMemberDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventMemberDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/FamilyEventDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/FamilyEventMemberDat.inc"
);
// definition
// definition
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/definition/ImageType.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/definition/ImageType.inc"
);
...
...
src/user/if/synchronize_family_event_dat.php
0 → 100644
View file @
118308e9
<?php
// 5.家园平台社会实践活动同步接口
require_once
(
"../user_include.inc"
);
ErrorLogger
::
doOutput
(
"Compass...synchronize_family_event_dat.php....Start."
,
0
);
//获取参数
$schoolNo
=
ParamUtil
::
getRequestString
(
"schoolNo"
);
$classNo
=
ParamUtil
::
getRequestString
(
"classNo"
);
$originalSource
=
ParamUtil
::
getRequestNumber
(
"originalSource"
,
0
);
$eventId
=
ParamUtil
::
getRequestNumber
(
"eventId"
,
0
);
$title
=
ParamUtil
::
getRequestString
(
"title"
);
$author
=
ParamUtil
::
getRequestString
(
"author"
);
$publishTime
=
ParamUtil
::
getRequestString
(
"publishTime"
);
$content
=
ParamUtil
::
getRequestString
(
"content"
);
$images
=
ParamUtil
::
getRequestString
(
"images"
);
//参数检查
if
(
empty
(
$schoolNo
)
||
empty
(
$originalSource
)
||
empty
(
$title
)
||
$eventId
<=
0
)
{
responseNG
(
"参数错误!"
);
}
//originalSource为1或者2
if
(
$originalSource
<>
1
&&
$originalSource
<>
2
)
{
responseNG
(
"参数错误!"
);
}
//判断该活动是否已经存在
$param
=
array
();
$param
[
'school_no'
]
=
$schoolNo
;
$param
[
'original_source'
]
=
$originalSource
;
$param
[
'event_id'
]
=
$eventId
;
$param
[
'delete_flg'
]
=
false
;
$familyEventList
=
FamilyEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
if
(
empty
(
$familyEventList
))
{
$familyEventList
=
new
FamilyEventDat
();
$familyEventList
->
school_no
=
$schoolNo
;
$familyEventList
->
class_no
=
$classNo
;
$familyEventList
->
original_source
=
$originalSource
;
$familyEventList
->
event_id
=
$eventId
;
$familyEventList
->
title
=
$title
;
$familyEventList
->
author
=
$author
;
$familyEventList
->
publish_time
=
$publishTime
;
$familyEventList
->
content
=
$content
;
$familyEventList
->
images
=
$images
;
$familyEventList
->
save
();
}
else
{
$familyEventList
=
$schoolList
[
0
];
$familyEventList
->
title
=
$title
;
$familyEventList
->
author
=
$author
;
$familyEventList
->
publish_time
=
$publishTime
;
$familyEventList
->
content
=
$content
;
$familyEventList
->
images
=
$images
;
$familyEventList
->
save
();
$familyEventList
->
save
();
}
ErrorLogger
::
doOutput
(
"Compass...synchronize_family_event_dat.php....End."
,
0
);
responseOK
(
"更新成功!"
);
function
responseNG
(
$message
)
{
$result
=
array
(
"status"
=>
"NG"
,
"message"
=>
$message
);
print
json_encode
(
$result
);
exit
;
}
function
responseOK
(
$message
)
{
$result
=
array
(
"status"
=>
"OK"
,
"message"
=>
$message
);
print
json_encode
(
$result
);
exit
;
}
?>
\ 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