Commit 9770cd27 by biao

1111

parent b968665d
......@@ -155,6 +155,7 @@ CREATE TABLE IF NOT EXISTS circle_dat(
need_check tinyint(1) NOT NULL DEFAULT '0',
front_image text,
images text,
introduction text,
comment text,
longitude text NOT NULL,
latitude text NOT NULL,
......@@ -169,34 +170,35 @@ Create INDEX circle_dat_title_idx ON circle_dat(title);
Create INDEX circle_dat_owner_id_idx ON circle_dat(owner_id);
##----circle_notice_dat create
##----circle_moment_dat create
DROP TABLE IF EXISTS circle_notice_dat;
CREATE TABLE IF NOT EXISTS circle_notice_dat(
DROP TABLE IF EXISTS circle_moment_dat;
CREATE TABLE IF NOT EXISTS circle_moment_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
circle_id int8 NOT NULL DEFAULT '0',
title varchar(128) NOT NULL,
comment text,
image text,
images text,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX circle_notice_dat_circle_id_idx ON circle_notice_dat(circle_id);
Create INDEX circle_moment_dat_circle_id_idx ON circle_moment_dat(circle_id);
##----circle_moment_dat create
DROP TABLE IF EXISTS circle_moment_dat;
CREATE TABLE IF NOT EXISTS circle_moment_dat(
##----circle_notice_dat create
DROP TABLE IF EXISTS circle_notice_dat;
CREATE TABLE IF NOT EXISTS circle_notice_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
circle_id int8 NOT NULL DEFAULT '0',
title varchar(128) NOT NULL,
comment text,
images text,
image text,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX circle_moment_dat_circle_id_idx ON circle_moment_dat(circle_id);
Create INDEX circle_notice_dat_circle_id_idx ON circle_notice_dat(circle_id);
##----circle_member_dat create
......@@ -208,7 +210,7 @@ CREATE TABLE IF NOT EXISTS circle_member_dat(
circle_id int8 NOT NULL DEFAULT '0',
user_id int8 NOT NULL DEFAULT '0',
name varchar(64),
header_img varchar(64),
header_img text,
is_owner tinyint(1) NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
......@@ -230,6 +232,7 @@ CREATE TABLE IF NOT EXISTS user_login_dat(
Create INDEX user_login_dat_openid_idx ON user_login_dat(openid);
##----user_mst create
DROP TABLE IF EXISTS user_mst;
......@@ -265,7 +268,7 @@ CREATE TABLE IF NOT EXISTS user_mst(
licensen_imgage text,
other_imgage text,
organization_status varchar(64) NOT NULL DEFAULT 'NEW',
is_member tinyint(1) NOT NULL DEFAULT '0'
is_member tinyint(1) NOT NULL DEFAULT '0',
ability_point int8 NOT NULL DEFAULT '0',
service_point int8 NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
......@@ -277,6 +280,27 @@ Create INDEX user_mst_openid_idx ON user_mst(openid);
Create INDEX user_mst_unionid_idx ON user_mst(unionid);
##----user_child_dat create
DROP TABLE IF EXISTS user_child_dat;
CREATE TABLE IF NOT EXISTS user_child_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',
name varchar(64),
child_age int8 NOT NULL DEFAULT '1',
school_no varchar(64) NOT NULL DEFAULT '0',
class_no varchar(64) NOT NULL DEFAULT '0',
original_source int8 NOT NULL DEFAULT '0',
ability_point int8 NOT NULL DEFAULT '0',
service_point int8 NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX user_child_dat_school_no_idx ON user_child_dat(school_no);
Create INDEX user_child_dat_class_no_idx ON user_child_dat(class_no);
##----user_message_dat create
DROP TABLE IF EXISTS user_message_dat;
......@@ -330,7 +354,6 @@ CREATE TABLE IF NOT EXISTS social_event_member_dat(
social_event_id int8 NOT NULL,
user_id int8 NOT NULL,
comment text NOT NULL,
front_image text,
images text,
status varchar(64) NOT NULL DEFAULT '0',
point int8 NOT NULL DEFAULT '0',
......@@ -354,6 +377,7 @@ CREATE TABLE IF NOT EXISTS family_event_dat(
title text NOT NULL,
author text NOT NULL,
publish_time timestamp NOT NULL,
front_image text,
images text,
content text NOT NULL,
delete_flg tinyint(1) NOT NULL DEFAULT '0'
......@@ -373,7 +397,7 @@ CREATE TABLE IF NOT EXISTS family_event_member_dat(
family_event_id int8 NOT NULL,
user_id int8 NOT NULL,
comment text NOT NULL,
images text,
images text NOT NULL,
status varchar(64) NOT NULL DEFAULT '0',
point int8 NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
......@@ -401,7 +425,7 @@ CREATE TABLE IF NOT EXISTS volunteer_event_member_dat(
position_longitude text,
position_latitude text,
role int8 NOT NULL DEFAULT '0',
time_length float(6,2) NOT NULL DEFAULT '0.00',
time_length float(6,2) NOT NULL DEFAULT '0',
finish_time timestamp,
status varchar(64) NOT NULL DEFAULT 'NEW',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
......@@ -487,14 +511,32 @@ CREATE TABLE IF NOT EXISTS certificate_mst(
Create INDEX certificate_mst_id_idx ON certificate_mst(id);
##----user_buy_member_dat create
DROP TABLE IF EXISTS user_buy_member_dat;
CREATE TABLE IF NOT EXISTS user_buy_member_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id int8 NOT NULL PRIMARY KEY auto_increment,
money float(5,2) NOT NULL DEFAULT '0',
order_no varchar(128),
mchid_order_no varchar(255),
status varchar(64),
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX user_buy_member_dat_user_id_idx ON user_buy_member_dat(user_id);
Create INDEX user_buy_member_dat_order_no_idx ON user_buy_member_dat(order_no);
##----user_pay_log create
DROP TABLE IF EXISTS user_pay_log;
CREATE TABLE IF NOT EXISTS user_pay_log(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id int8 NOT NULL,
user_name varchar(64) NOT NULL,
user_id int8 NOT NULL PRIMARY KEY auto_increment,
user_name varchar(64) NOT NULL PRIMARY KEY auto_increment,
action_type varchar(32) NOT NULL,
money float(5,2) NOT NULL DEFAULT '0',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
......@@ -511,8 +553,8 @@ CREATE TABLE IF NOT EXISTS course_media_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
course_id int8 NOT NULL DEFAULT '0',
parent_category_id int8 NOT NULL EFAULT '0',
sub_category_id int8 NOT NULL EFAULT '0',
parent_category_id int8 NOT NULL DEFAULT '0',
sub_category_id int8 NOT NULL DEFAULT '0',
title varchar(128) NOT NULL,
comment text NOT NULL,
tags text NOT NULL,
......@@ -568,7 +610,7 @@ CREATE TABLE IF NOT EXISTS course_mst(
sub_category_id int8 NOT NULL,
title varchar(128) NOT NULL,
comment text NOT NULL,
front_image text NOT NULL,
front_image nxiang NOT NULL,
teacher_name varchar(128) NOT NULL,
teacher_profile text,
media_count int4 NOT NULL DEFAULT '0',
......@@ -578,24 +620,6 @@ CREATE TABLE IF NOT EXISTS course_mst(
Create INDEX course_mst_id_idx ON course_mst(id);
Create INDEX course_mst_title_idx ON course_mst(title);
##----user_buy_member_dat create
DROP TABLE IF EXISTS user_buy_member_dat;
CREATE TABLE IF NOT EXISTS user_buy_member_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id int8 NOT NULL,
money float(5,2) NOT NULL DEFAULT '0',
order_no varchar(128),
mchid_order_no varchar(255),
status varchar(64),
delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX user_buy_member_dat_user_id_idx ON user_buy_member_dat(user_id);
Create INDEX user_buy_member_dat_order_no_idx ON user_buy_member_dat(order_no);
##----user_media_dat create
......
<?php
/**
* UserChildDat Entity
* $Id: UserChildDat.inc,v 1.1 2020/4/22 10:21:30 Exp $
* @author zb
* @package jp.compass.entity
* @access public
*/
class UserChildDat extends CompassDynamicData
{
var $user_id;
var $name;
var $child_age;
var $school_no;
var $class_no;
var $original_source;
var $ability_point;
var $service_point;
var $delete_flg;
/**
* 构造实现。user_child_dat创建实例。
*
* @access public
* @param mixed user_child_dat
*/
function constructor($record)
{
parent::constructor($record);
$this->user_id = $record["user_id"];
$this->name = $record["name"];
$this->child_age = $record["child_age"];
$this->school_no = $record["school_no"];
$this->class_no = $record["class_no"];
$this->original_source = $record["original_source"];
$this->ability_point = $record["ability_point"];
$this->service_point = $record["service_point"];
$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("UserChildDat", "user_child_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_child_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("UserChildDat", "user_child_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::copyObj2ArrayNullField($v_param, $this, "name");
ParamUtil::copyObj2Array($v_param, $this, "child_age");
ParamUtil::copyObj2Array($v_param, $this, "school_no");
ParamUtil::copyObj2Array($v_param, $this, "class_no");
ParamUtil::copyObj2Array($v_param, $this, "original_source");
ParamUtil::copyObj2Array($v_param, $this, "ability_point");
ParamUtil::copyObj2Array($v_param, $this, "service_point");
ParamUtil::copyObj2Array($v_param, $this, "delete_flg");
// 保存
parent::_save("user_child_dat", $v_param);
}
}
\ No newline at end of file
......@@ -51,6 +51,7 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/DonationsEventDat.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserDonationDat.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserBuyMemberDat.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserLoginDat.inc");
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserChildDat.inc");
// definition
require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/definition/ImageType.inc");
......
<?php
$con = mysqli_connect('rm-bp1o9djohok39tn53478.mysql.rds.aliyuncs.com', 'volunteer', 'yuande!@#$%678', "volunteer", "3306");
//检查连接
if(!$con) {
die("连接错误: " . mysqli_connect_error());
}
mysqli_select_db($con,'volunteer');
echo "OK";
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment