|
@@ -6,6 +6,57 @@ use Dever;
|
|
|
|
|
|
class Cron
|
|
|
{
|
|
|
+ public function dao_order_api()
|
|
|
+ {
|
|
|
+ # 根据订单的buy_id来确定生成的本数
|
|
|
+ $order = Dever::db('journal/order')->getNew();
|
|
|
+ $test = Dever::input('test');
|
|
|
+ if ($test == 1) {
|
|
|
+ print_r($order);die;
|
|
|
+ }
|
|
|
+ if ($order) {
|
|
|
+ foreach ($order as $k => $v) {
|
|
|
+ $info = Dever::db('act/order')->one(array('order_id' => $v['order_id']));
|
|
|
+ if (!$info) {
|
|
|
+ unset($v['id']);
|
|
|
+ $v['status'] = 7;
|
|
|
+ Dever::db('act/order')->insert($v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return 'ok';
|
|
|
+ }
|
|
|
+
|
|
|
+ public function dao_orders_api()
|
|
|
+ {
|
|
|
+ # 根据订单的buy_id来确定生成的本数
|
|
|
+ $id = Dever::input('product_id', 26);
|
|
|
+ $where['product_id'] = $id;
|
|
|
+ $where['status'] = 7;
|
|
|
+ //$where['score_status'] = 1;
|
|
|
+ $order_id = Dever::input('order_id');
|
|
|
+ if ($order_id) {
|
|
|
+ $where['order_id'] = $order_id;
|
|
|
+ }
|
|
|
+ $uid = Dever::input('uid');
|
|
|
+ if ($uid) {
|
|
|
+ $where['uid'] = $uid;
|
|
|
+ }
|
|
|
+ $order = Dever::db('act/order')->state($where);
|
|
|
+ $test = Dever::input('test');
|
|
|
+ if ($test == 1) {
|
|
|
+ print_r($order);die;
|
|
|
+ }
|
|
|
+ if ($order) {
|
|
|
+ foreach ($order as $k => $v) {
|
|
|
+ $this->getpays($v['order_id']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return 'ok';
|
|
|
+ }
|
|
|
+
|
|
|
public function buy_code_api()
|
|
|
{
|
|
|
# 根据订单的buy_id来确定生成的本数
|