@a5635268
2018-04-24T17:12:46.000000Z
字数 2574
阅读 831
未分类
create table parking_member_car(
member_car_id int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
member_id int(11) NOT null default 0 COMMENT '会员ID',
car_plate_num varchar(50) NOT NULL default '' COMMENT '车牌号',
create_time int(10) NOT null default 0 COMMENT '加入时间',
PRIMARY KEY (`member_car_id`),
KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='车与会员的关系表';
CREATE TABLE `parking_order` (
`order_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员ID',
`order_no` char(20) NOT NULL DEFAULT '' COMMENT '订单编号',
`prepaid_fee_id` int(11) NOT NULL DEFAULT '0' COMMENT '停车表预付款ID,付款成功后回写用于关联科拓表',
`car_plate_num` varchar(50) NOT NULL DEFAULT '' COMMENT '车牌号',
`in_time` int(10) NOT NULL DEFAULT '0' COMMENT '进场时间',
`out_time` int(10) NOT NULL DEFAULT '0' COMMENT '出场时间',
`member_coupon_id` int(10) NOT NULL DEFAULT '0' COMMENT '优惠券id',
`coupon_free` decimal(6,2) NOT NULL DEFAULT '0.00' COMMENT '优惠劵减免金额',
`intergral` int(10) NOT NULL DEFAULT '0' COMMENT '使用的积分',
`car_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0临时车,1vip,2月租车,8员工车',
`intergral_free` decimal(6,2) NOT NULL DEFAULT '0.00' COMMENT '积分减免金额',
`payable_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '应付金额',
`paid_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实付金额',
`create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_id`),
KEY `member_id` (`member_id`) USING BTREE,
KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表';
-- 后台创建优惠劵的时候要多一个券的类型
ALTER TABLE `coupon`
MODIFY COLUMN `coupon_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '优惠类型\n 1,现金券 2,停车抵用券' AFTER `use_only`;
SELECT * FROM `parking_member_car` WHERE member_id = 2 ORDER BY create_time DESC LIMIT 3;
-- 后台创建优惠劵的时候要多一个券的类型
ALTER TABLE `coupon`
MODIFY COLUMN `coupon_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '优惠类型\n 1,现金券 2,停车抵用券' AFTER `use_only`;
-- 我的优惠券
SELECT
*
FROM
`wx_member_coupon`
WHERE
coupon_id IN (
SELECT
id
FROM
coupon
WHERE
valid_stime < now
AND valid_etime > now
)
AND wx_member_id = 3333;
https://gitee.com/cqcqphper/taskPHP/blob/master/src/docs/thinkphp5.0.md
#!/bin/bash
EMAIL='zhangcunchao_cn@163.com'
start()
{
c=`ps w -C php|grep $1|wc -l`
if [ $c -lt 1 ]
then
if [ -f "$1" ];then
/usr/local/php/bin/php $1 > /dev/null &
else
`echo 'no such file '$1 | mail -s 'process check error' $EMAIL`
fi
fi
}
BASE_PATH=`dirname $0`"/"
cd $BASE_PATH
start send_mail.php
https://packagist.org/packages/riverslei/payment