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
a1efc47f
Commit
a1efc47f
authored
Feb 17, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b79c2d88
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
3 deletions
+135
-3
compass_db_schema.txt
doc/DB/compass_db_schema.txt
+23
-2
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
UserMessageDat.inc
src/cn/compass/entity/UserMessageDat.inc
+111
-0
compass_include.inc
src/settings/compass_include.inc
+1
-1
No files found.
doc/DB/compass_db_schema.txt
View file @
a1efc47f
...
...
@@ -41,13 +41,14 @@ CREATE TABLE IF NOT EXISTS government_qr_dat(
province varchar(64) NOT NULL,
city varchar(64),
district varchar(64),
front
_image text NOT NULL,
qr
_image text NOT NULL,
use_count int8 NOT NULL DEFAULT '0',
max_count int8 NOT NULL DEFAULT '0',
limit_date timestamp NOT NULL,
title text NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX government_qr_dat_id_idx ON government_qr_dat(id);
Create INDEX government_qr_dat_province_idx ON government_qr_dat(province);
Create INDEX government_qr_dat_city_idx ON government_qr_dat(city);
...
...
@@ -220,6 +221,24 @@ Create INDEX user_mst_openid_idx ON user_mst(openid);
Create INDEX user_mst_unionid_idx ON user_mst(unionid);
##----user_message_dat create
DROP TABLE IF EXISTS user_message_dat;
CREATE TABLE IF NOT EXISTS user_message_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id int8 NOT NULL DEFAULT '0',
title varchar(128) NOT NULL,
comment text,
attach_dat_text text,
attach_dat_path text,
is_read tinyint(1) NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX user_message_dat_user_id_idx ON user_message_dat(user_id);
##----social_event_dat create
DROP TABLE IF EXISTS social_event_dat;
...
...
@@ -460,7 +479,7 @@ CREATE TABLE IF NOT EXISTS course_mst(
front_image text NOT NULL,
teacher_name varchar(128) NOT NULL,
teacher_profile text,
media_count int4 NOT NULL,
media_count int4 NOT NULL
DEFAULT '0'
,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
...
...
@@ -486,5 +505,7 @@ CREATE TABLE IF NOT EXISTS user_media_dat(
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX user_media_dat_user_id_idx ON user_media_dat(user_id);
Create INDEX user_media_dat_course_id_idx ON user_media_dat(course_id);
Create INDEX user_media_dat_media_id_idx ON user_media_dat(media_id);
doc/接口文档 V1.0.xls
View file @
a1efc47f
No preview for this file type
src/cn/compass/entity/UserMessageDat.inc
0 → 100644
View file @
a1efc47f
<?php
/**
* UserMessageDat Entity
* $Id: UserMessageDat.inc,v 1.1 2020/2/17 17:20:32 Exp $
* @author zb
* @package jp.compass.entity
* @access public
*/
class
UserMessageDat
extends
CompassDynamicData
{
var
$user_id
;
var
$title
;
var
$comment
;
var
$attach_dat_text
;
var
$attach_dat_path
;
var
$is_read
;
var
$delete_flg
;
/**
* 构造实现。user_message_dat创建实例。
*
* @access public
* @param mixed user_message_dat
*/
function
constructor
(
$record
)
{
parent
::
constructor
(
$record
);
$this
->
user_id
=
$record
[
"user_id"
];
$this
->
title
=
$record
[
"title"
];
$this
->
comment
=
$record
[
"comment"
];
$this
->
attach_dat_text
=
$record
[
"attach_dat_text"
];
$this
->
attach_dat_path
=
$record
[
"attach_dat_path"
];
$this
->
is_read
=
$record
[
"is_read"
];
$this
->
delete_flg
=
$record
[
"delete_flg"
];
}
/**
* 根据条件,获取数据列表。
* 条件与DBManager的doSelect相同。
* @access public
* @static
* @param array 检索条件
* @return array Entity的队列
*/
public
static
function
getList
(
$w_param
=
null
,
$orderkey
=
null
,
$direction
=
"ASC"
,
$offset
=
null
,
$limit
=
null
)
{
if
(
$w_param
==
null
)
{
$w_param
=
array
();
$w_param
[
"delete_flg"
]
=
"false"
;
}
return
CompassDBHandler
::
getList
(
"UserMessageDat"
,
"user_message_dat"
,
$w_param
,
$orderkey
,
$direction
,
$offset
,
$limit
);
}
/**
* 根据条件,获取数据列表的件数。
* 条件与DBManager的doSelect相同。
* @access public
* @static
* @param array 检索条件
* @return array Entity的队列
*/
public
static
function
getListCount
(
$w_param
=
null
)
{
if
(
$w_param
==
null
)
{
$w_param
=
array
();
$w_param
[
"delete_flg"
]
=
"false"
;
}
$db
=
CompassDBManager
::
getInstance
();
$result
=
$db
->
doSelect
(
"user_message_dat"
,
$w_param
,
null
,
null
,
null
,
null
,
"count(*) as count"
);
return
$result
[
0
][
"count"
];
}
/**
* 获得此类指定ID的实例。
*/
public
static
function
getById
(
$id
)
{
// delete_flg
$param
=
array
();
$param
[
"delete_flg"
]
=
false
;
return
CompassDBHandler
::
getById
(
"UserMessageDat"
,
"user_message_dat"
,
$id
,
$param
);
}
// -- 这里开始Dynamic ---
/**
* 将此实例写入DB。
* DynamicData共用的保存方法。
* @access public
* @return int 写入实例的ID
*/
public
function
save
()
{
$v_param
=
array
();
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"user_id"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"title"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"comment"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"attach_dat_text"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"attach_dat_path"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"is_read"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"delete_flg"
);
// 保存
parent
::
_save
(
"user_message_dat"
,
$v_param
);
}
}
\ No newline at end of file
src/settings/compass_include.inc
View file @
a1efc47f
...
...
@@ -37,7 +37,7 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/CourseMst.inc");
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CourseMediaDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CertificateMst.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserCertificateDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserMessageDat.inc"
);
// definition
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/definition/ImageType.inc"
);
...
...
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