From 0a9a6c7388644f38f4757a8312e4fa04e476ba99 Mon Sep 17 00:00:00 2001 From: denghongtao <[denghongtao@easycorp.ltd]> Date: Fri, 25 Mar 2022 14:25:07 +0800 Subject: [PATCH] add unittest productplan and new productsunplan.yaml --- test/class/productplan.class.php | 199 +++++++++++++++++- test/data/productsunplan.yaml | 48 +++++ test/model/productplan/batchchangestatus.php | 9 + test/model/productplan/batchupdate.php | 86 ++++++++ test/model/productplan/create.php | 45 ++++ test/model/productplan/getbranchplanpairs.php | 20 ++ test/model/productplan/getbyidlist.php | 10 +- test/model/productplan/getbyidplan.php | 10 +- test/model/productplan/getchildren.php | 14 ++ test/model/productplan/getforproducts.php | 14 ++ test/model/productplan/getgroupbyproduct.php | 22 ++ test/model/productplan/getlast.php | 8 +- test/model/productplan/getlist.php | 10 +- test/model/productplan/getpairs.php | 11 +- test/model/productplan/getpairsforstory.php | 18 ++ test/model/productplan/getplansbystories.php | 15 ++ test/model/productplan/update.php | 26 +++ test/model/productplan/updateparentstatus.php | 19 ++ test/model/productplan/updatestatus.php | 21 ++ 19 files changed, 582 insertions(+), 23 deletions(-) create mode 100644 test/data/productsunplan.yaml create mode 100755 test/model/productplan/batchchangestatus.php create mode 100755 test/model/productplan/batchupdate.php create mode 100755 test/model/productplan/create.php create mode 100755 test/model/productplan/getbranchplanpairs.php create mode 100755 test/model/productplan/getchildren.php create mode 100755 test/model/productplan/getforproducts.php create mode 100755 test/model/productplan/getgroupbyproduct.php create mode 100755 test/model/productplan/getpairsforstory.php create mode 100755 test/model/productplan/getplansbystories.php create mode 100755 test/model/productplan/update.php create mode 100755 test/model/productplan/updateparentstatus.php create mode 100755 test/model/productplan/updatestatus.php diff --git a/test/class/productplan.class.php b/test/class/productplan.class.php index dbc5f8cbd0..62dd1ef05f 100644 --- a/test/class/productplan.class.php +++ b/test/class/productplan.class.php @@ -1,5 +1,5 @@ productplan->getList($product = 0, $branch = 0, $browseType = 'doing', $pager = null, $orderBy = 'begin_desc', $param = ''); + $productplans = $this->productplan->getList($product, $branch, $browseType, $pager, $orderBy, $param); return $productplans; } - public function getPairs($product = 0, $branch = '', $expired = '', $skipParent = false) + /** + * getPairs + * + * @param int $product + * @param string $branch + * @param string $expired + * @param mixed $skipParent + * @access public + * @return void + */ + public function getPairs($product, $branch = '', $expired = '', $skipParent = false) { - $productplans = $this->productplan->getPairs($product = 0, $branch = '', $expired = '', $skipParent = false); + $productplans = $this->productplan->getPairs($product, $branch = '', $expired = '', $skipParent = false); + return $productplans; + } + + /** + * getPairsForStory + * + * @param mrray|int mixed $product + * @param int mixed $branch + * @param string mixed $param + * @access public + * @return void + */ + public function getPairsForStory($product, $branch, $param) + { + $productplans = $this->productplan->getPairsForStory($product, $branch, $param); + return count($productplans) - 1; + } + + /** + * getForProducts + * + * @param array(int) mixed $products + * @access public + * @return void + */ + public function getForProducts($products) + { + $productplans = $this->productplan->getForProducts($products); + return count($productplans) - 1; + } + + /** + * getGroupByProduct + * + * @param array(int) mixed $products + * @param string mixed $param + * @param string $field + * @param string $orderBy + * @access public + * @return void + */ + public function getGroupByProduct($products, $param, $field = 'name', $orderBy = 'id_desc') + { + $productplans = $this->productplan->getGroupByProduct($products, $param, $field, $orderBy); + return count($productplans); + } + + /** + * getChildren + * + * @param int mixed $planID + * @access public + * @return void + */ + public function getChildren($planID) + { + $productplans = $this->productplan->getChildren($planID); + return count($productplans); + } + + /** + * getPlansByStories + * + * @param array(int) mixed $storyIdList + * @access public + * @return void + */ + public function getPlansByStories($storyIdList) + { + $productplans = $this->productplan->getPlansByStories($storyIdList); + return count($productplans); + } + + /** + * getBranchPlanPairs + * + * @param int mixed $productID + * @param int mixed $branches + * @access public + * @return void + */ + public function getBranchPlanPairs($productID, $branches) + { + $productplans = $this->productplan->getBranchPlanPairs($productID, $branches); + return $productplans; + } + + /** + * @param array + */ + public function create($param) //声明一个create方法 + { + //初始化传的参数,这里可以设置默认值 + $createPlan = array('title' => '', 'begin' => '', 'end' => '', 'delta' => '', 'desc' => '', 'uid' => '', 'product' => '', 'parent' => ''); + //设置foreach循环,将初始化参数传给全局变量$_POST中,通过此方式将传的参数提供给源码create方法 + foreach($createPlan as $field => $defaultvalue) $_POST[$field] = $defaultvalue; + //二次遍历数组将此方法的形参传入$_POST中,这行可以替换掉初始化参数,做到以传入参数为最终结果的目的。同时不传参数的话取默认值 + foreach($param as $key => $value) $_POST[$key] = $value; + //这行代码的作用是调用源码中的方法(参数通过$_POST直接取,具体原理可以不知道) + $productPlans = $this->productplan->create(); + //将方法返回内容返回 + return $productPlans; + } + + /** + * update + * + * @param int mixed $planID + * @param array mixed $values + * @access public + * @return void + */ + public function update($planID, $values) + { + $updatePlan = array('title' => '', 'status' => '', 'begin' => '', 'end' => '', 'desc' => '', 'uid' => '', 'product' => ''); + + foreach($updatePlan as $field => $defaultvalue) $_POST[$field] = $defaultvalue; + foreach($values as $key =>$value) $_POST[$key] = $value; + + $productplans = $this->productplan->update($planID); + + return $productplans; + } + + /** + * updateStatus + * + * @param int mixed $planID + * @param string $status + * @param string $action + * @access public + * @return void + */ + public function updateStatus($planID, $status = '', $action = '') + { + $productplans = $this->productplan->updateStatus($planID, $status, $action); + return $productplans; + } + + /** + * updateParentStatus + * + * @param int mixed $parentId + * @access public + * @return void + */ + public function updateParentStatus($parentId) + { + $productplans = $this->productplan->updateParentStatus($parentId); + return $productplans; + } + + /** + * batchUpdate + * + * @param int mixed $productId + * @access public + * @return void + */ + public function batchUpdate($productId, $bratch) + { + $batch = array('id' => array(), 'title' => array(), 'begin' => array(), 'end' => array()); + + foreach($batch as $field => $defaultvalue) $_POST[$field] = $defaultvalue; + foreach($bratch as $key => $value) $_POST[$key] = $value; + + $productplans = $this->productplan->batchUpdate($productId); + return $productplans; + } + + public function batchChangeStatus($status) + { + $posts = array(6, 5, 4); + + foreach($posts as $field => $defaultvalue) $_POST[$field] = $defaultvalue; + //foreach($param as $key => $value) $_POST[$key] = $valuep; + + $productplans = $this->productplan->batchChangeStatus($status); return $productplans; } } - ?> diff --git a/test/data/productsunplan.yaml b/test/data/productsunplan.yaml new file mode 100644 index 0000000000..eb229e0995 --- /dev/null +++ b/test/data/productsunplan.yaml @@ -0,0 +1,48 @@ +title: table zt_productplan +desc: "产品子计划" +author: sgm +version: "1.0" +fields: + - field: id + note: "ID" + range: 100-10000 + - field: product + note: "所属产品" + range: 1-10 + - field: branch + note: "所属分支" + range: 41-50 + - field: parent + note: "父计划" + range: 1-10 + - field: title + note: "名称" + range: [1.0,1.1,长名称好长好长好长好长好长好长好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好好长好长好长好长好长好的名字啊!@ase!!@#%@^&#!] + - field: status + note: "状态" + range: wait,doing,closed,done + - field: desc + note: "描述" + range:
+

asdxxxfa阿萨德开机as家世界发卡机发设计费啥登记卡设计费卡加斯加附件阿峰

+

123a阿士大夫姐姐姐经历过反对派呸呸呸史蒂夫接收到付款纪委第三方乐山大佛量减少地方

+

IU风格就叫阿萨德奥斯丁哦IG是DAU发加速度快哦哦阿萨德几年内发,,,奥斯丁,,,切,,,请问加十多年你

+

IUIG是DAU发加速度快哦哦阿萨德几年内发,,,奥斯丁,,,切,,,请问加十多年你

+

IU风格就叫阿萨德奥斯丁哦IG是DAU,,,奥斯丁,,,切,,,请问加十多年你

+
+ - field: begin + note: "开始日期" + range: "(-10M)-(-7M):7D" + type: timestamp + format: "YYYY-MM-DD" + - field: end + note: "结束日期" + range: "(-6M)-(+6M):7D" + type: timestamp + format: "YYYY-MM-DD" + - field: order + note: "排序" + value: "$id * 5" + - field: deleted + note: "是否删除" + range: 0{359},1 diff --git a/test/model/productplan/batchchangestatus.php b/test/model/productplan/batchchangestatus.php new file mode 100755 index 0000000000..6061f57b51 --- /dev/null +++ b/test/model/productplan/batchchangestatus.php @@ -0,0 +1,9 @@ +#!/usr/bin/env php +batchChangeStatus(2));die; +?> diff --git a/test/model/productplan/batchupdate.php b/test/model/productplan/batchupdate.php new file mode 100755 index 0000000000..d58d53da05 --- /dev/null +++ b/test/model/productplan/batchupdate.php @@ -0,0 +1,86 @@ +#!/usr/bin/env php +batchUpdate($product[0], $branch1); +$batchUpdate1 = $batchUpdate[1]; +$batchUpdate2 = $batchUpdate[2]; +$batchUpdate3 = $batchUpdate[3]; + +$newBatchUpdate = $plan->batchUpdate($product[1], $branch2); +$batchUpdate4 = $newBatchUpdate[4]; +$batchUpdate5 = $newBatchUpdate[5]; +$batchUpdate6 = $newBatchUpdate[6]; + +r($batchUpdate1) && p('0:new') && e('list-1'); //当product=1时,传入正常参数批量修改id=1,2,3的计划,打印id=1修改后的名字new +r($batchUpdate2) && p('0:new') && e('list-2'); //当product=1时,传入正常参数批量修改id=1,2,3的计划,打印id=2修改后的名字new +r($batchUpdate3) && p('0:new') && e('list-3'); //当product=1时,传入正常参数批量修改id=1,2,3的计划,打印id=3修改后的名字new +r($batchUpdate4) && p('0:new') && e('list-4'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=4修改后的名字new +r($batchUpdate5) && p('0:new') && e('list-5'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=5修改后的名字new +r($batchUpdate6) && p('0:new') && e('list-6'); //当product=2时,传入正常参数批量修改id=4,5,6的计划,打印id=6修改后的名字new +?> diff --git a/test/model/productplan/create.php b/test/model/productplan/create.php new file mode 100755 index 0000000000..f1ade46873 --- /dev/null +++ b/test/model/productplan/create.php @@ -0,0 +1,45 @@ +#!/usr/bin/env php +create($posts)) && p() && e('71'); //测试正常创建 +r($plan->create($noTitle)) && p() && e('0'); //测试不传入名称的情况 +r($plan->create($noBegin)) && p() && e('0'); //测试不传开始时间的情况 +r($plan->create($noEnd)) && p() && e('0'); //测试不传结束时间的情况 +r($plan->create($noBeginEnd)) && p() && e('0'); //测试不传开始时间及结束时间的情况 +r($plan->create($noUid)) && p() && e('0'); //测试不传UID的情况 +r($plan->create($noProduct)) && p() && e('0'); //测试不传关联产品的情况 +r($plan->create($noParent)) && p() && e('0'); //测试不传父级计划的情况 +?> diff --git a/test/model/productplan/getbranchplanpairs.php b/test/model/productplan/getbranchplanpairs.php new file mode 100755 index 0000000000..ae72c7a10b --- /dev/null +++ b/test/model/productplan/getbranchplanpairs.php @@ -0,0 +1,20 @@ +#!/usr/bin/env php +getBranchPlanPairs($product[0], $branch[0])) && p('1:31') && e('1.0 [2021-06-01~2022-04-16]'); //传入存在的数据,返回相应信息 +r($plan->getBranchPlanPairs($product[1], $branch[1])) && p('1:31') && e('0'); //传入不存在的分支 +r($plan->getBranchPlanPairs($product[2], $branch[2])) && p('1:31') && e('0'); //传入不存在的产品id +?> diff --git a/test/model/productplan/getbyidlist.php b/test/model/productplan/getbyidlist.php index 41047865e6..2a1821b1d0 100755 --- a/test/model/productplan/getbyidlist.php +++ b/test/model/productplan/getbyidlist.php @@ -3,15 +3,15 @@ include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php'; -$productplan = new Productplan('admin'); +$plan = new productPlan('admin'); $IDlist = array(); $IDlist[0] = 1; $IDlist[1] = 1000; $IDlist[2] = 3; -r($productplan->getByIDList($IDlist)) && p('3:id') && e('3'); //传入一个数组,取值id为3的数据 -r($productplan->getByIDList($IDlist)) && p('1:id') && e('1'); //传入一个数组,取值id为1的数据 -r($productplan->getByIDList($IDlist[0])) && p('1:id') && e('1'); //传入一个数值,正常取值 -r($productplan->getByIDList($IDlist[1])) && p() && e('0'); //传入一个不存在的值返回布尔值 +r($plan->getByIDList($IDlist)) && p('3:id') && e('3'); //传入一个数组,取值id为3的数据 +r($plan->getByIDList($IDlist)) && p('1:id') && e('1'); //传入一个数组,取值id为1的数据 +r($plan->getByIDList($IDlist[0])) && p('1:id') && e('1'); //传入一个数值,正常取值 +r($plan->getByIDList($IDlist[1])) && p() && e('0'); //传入一个不存在的值返回布尔值 ?> diff --git a/test/model/productplan/getbyidplan.php b/test/model/productplan/getbyidplan.php index 3303c95f2b..b9b934da41 100755 --- a/test/model/productplan/getbyidplan.php +++ b/test/model/productplan/getbyidplan.php @@ -3,14 +3,14 @@ include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php'; -$productplan = new Productplan('admin'); +$plan = new productPlan('admin'); $planID = array(); $planID[0] = 5; $planID[1] = 1000; -r($productplan->getByIDPlan($planID[0])) && p('status') && e('wait'); //如果存在,返回数组类型数据 -r($productplan->getByIDPlan($planID[0])) && p('begin') && e('2021-06-13'); //取出开始时间 -r($productplan->getByIDPlan($planID[0])) && p('end') && e('2021-10-14'); //取出结束时间 -r($productplan->getByIDPlan($planID[1])) && p() && e('0'); //如不存在,返回布尔值 +r($plan->getByIDPlan($planID[0])) && p('status') && e('wait'); //如果存在,返回数组类型数据 +r($plan->getByIDPlan($planID[0])) && p('begin') && e('2021-06-13'); //取出开始时间 +r($plan->getByIDPlan($planID[0])) && p('end') && e('2021-10-14'); //取出结束时间 +r($plan->getByIDPlan($planID[1])) && p() && e('0'); //如不存在,返回布尔值 ?> diff --git a/test/model/productplan/getchildren.php b/test/model/productplan/getchildren.php new file mode 100755 index 0000000000..38b173a80d --- /dev/null +++ b/test/model/productplan/getchildren.php @@ -0,0 +1,14 @@ +#!/usr/bin/env php +getChildren(0)) && p() && e('70'); //这里统计了取出所有的数量 +r($plan->getChildren(1)) && p() && e('0'); //这里统计不存在的情况 +?> diff --git a/test/model/productplan/getforproducts.php b/test/model/productplan/getforproducts.php new file mode 100755 index 0000000000..2459361734 --- /dev/null +++ b/test/model/productplan/getforproducts.php @@ -0,0 +1,14 @@ +#!/usr/bin/env php +getForProducts($products[0])) && p() && e('3'); //测试传入一个数组,取出产品名称count +r($plan->getForProducts($products[1])) && p() && e('0'); //测试传入一个不存在的product数组,应为空 +?> diff --git a/test/model/productplan/getgroupbyproduct.php b/test/model/productplan/getgroupbyproduct.php new file mode 100755 index 0000000000..561dc68107 --- /dev/null +++ b/test/model/productplan/getgroupbyproduct.php @@ -0,0 +1,22 @@ +#!/usr/bin/env php +getGroupByProduct($products[0], $param[0])) && p() && e('2'); //传入正常product 1,2; +r($plan->getGroupByProduct($products[1], $param[0])) && p() && e('1'); //传入部分不存在product; +r($plan->getGroupByProduct($products[2], $param[0])) && p() && e('0'); //传入不存在product +r($plan->getGroupByProduct($products[0], $param[1])) && p() && e('0'); //传入正常product 1,2;未过期param +r($plan->getGroupByProduct($products[1], $param[1])) && p() && e('0'); //传入部分不存在product;未过期param +r($plan->getGroupByProduct($products[2], $param[1])) && p() && e('0'); //传入不存在product; 未过期param +?> diff --git a/test/model/productplan/getlast.php b/test/model/productplan/getlast.php index ce1970c467..5071e07a01 100755 --- a/test/model/productplan/getlast.php +++ b/test/model/productplan/getlast.php @@ -3,14 +3,14 @@ include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php'; -$productplan = new Productplan('admin'); +$plan = new productPlan('admin'); $getLast = array(); $getLast[0] = 1; $getLast[1] = 2; $getLast[2] = 200; -r($productplan->getLast($getLast[0])) && p('id') && e('3'); //获取id为1的最后一个产品 -r($productplan->getLast($getLast[1])) && p('id') && e('6'); //获取id为2的最后一个产品 -r($productplan->getLast($getLast[2])) && p('id') && e('0'); //获取不存在的id返回布尔值 +r($plan->getLast($getLast[0])) && p('id') && e('3'); //获取id为1的最后一个产品 +r($plan->getLast($getLast[1])) && p('id') && e('6'); //获取id为2的最后一个产品 +r($plan->getLast($getLast[2])) && p('id') && e('0'); //获取不存在的id返回布尔值 ?> diff --git a/test/model/productplan/getlist.php b/test/model/productplan/getlist.php index 321dd8833b..d0b2e400ff 100755 --- a/test/model/productplan/getlist.php +++ b/test/model/productplan/getlist.php @@ -6,7 +6,13 @@ include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php'; $productplan = new Productplan('admin'); $List = array(); -$List[0] = 0; +$List[0] = 1; +$List[1] = 0; +$List[2] = 'all'; +$List[3] = null; +$List[4] = 'begin_desc'; +$List[5] = 'kipparent'; -r($productplan->getList(1, 0, 'all', null, 'begin_desc', 'kipparent')) && p('') && e('0'); //返回空数组 +//var_dump($productplan->getList(1, 0, 'all', null, 'begin_desc', 'kipparent'));die; +r($productplan->getList(1, 0, 'all', null, 'begin_desc', 'kipparent')) && p('3:id') && e('3'); //查询 ?> diff --git a/test/model/productplan/getpairs.php b/test/model/productplan/getpairs.php index 98952f86e4..268d6569ef 100755 --- a/test/model/productplan/getpairs.php +++ b/test/model/productplan/getpairs.php @@ -3,6 +3,15 @@ include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php'; -$productplan = new Productplan('admin'); +$plan = new productPlan('admin'); +$product = array(); +$product[0] = 41; +$product[1] = 42; +$branch = 1; +$expired = 'unexpired'; + +r($plan->getPairs($product[0], $branch, $expired)) && p('32') && e('分支2 / 1.1 [2021-06-08 ~ 2022-04-23]'); //id为41的产品分支32 +r($plan->getPairs($product[0], $branch, $expired)) && p('31') && e('分支1 / 1.0 [2021-06-01 ~ 2022-04-16]'); //id为41的产品分支31 +r($plan->getPairs($product[1], $branch, $expired)) && p('34') && e('分支4 / 1.0 [2021-06-22 ~ 2022-05-07]'); //id为42的产品分支34 ?> diff --git a/test/model/productplan/getpairsforstory.php b/test/model/productplan/getpairsforstory.php new file mode 100755 index 0000000000..bb7bf1cc43 --- /dev/null +++ b/test/model/productplan/getpairsforstory.php @@ -0,0 +1,18 @@ +#!/usr/bin/env php +getPairsForStory($product[0], $branch[0], $param[1])) && p('') && e('3'); //测试传入已有数据product=10,branch=0情况,正常返回 +r($plan->getPairsForStory($product[1], $branch[1], $param[1])) && p('') && e('1'); //测试传入product=41, branch=1的数据 +r($plan->getPairsForStory($product, $branch[1], $param[1])) && p('') && e('4'); //测试传入一个数组 +r($plan->getPairsForStory($product[3], $branch[1], $param[1])) && p('') && e('0'); //测试传入不存在的product +r($plan->getPairsForStory($product[0], $branch[0], $param[0])) && p('') && e('3'); //测试传入不同param情况 +r($plan->getPairsForStory($product[0], $branch[0], $param[2])) && p('') && e('3'); //测试传入不同param情况 +?> diff --git a/test/model/productplan/getplansbystories.php b/test/model/productplan/getplansbystories.php new file mode 100755 index 0000000000..e7c282de82 --- /dev/null +++ b/test/model/productplan/getplansbystories.php @@ -0,0 +1,15 @@ +#!/usr/bin/env php +getPlansByStories($storyIdList[0])) && p() && e('3'); //查询存在的id +r($plan->getPlansByStories($storyIdList[1])) && p() && e('1'); //查询部分存在的id +r($plan->getPlansByStories($storyIdList[2])) && p() && e('0'); //查询不存在的id +?> diff --git a/test/model/productplan/update.php b/test/model/productplan/update.php new file mode 100755 index 0000000000..4c4e90c193 --- /dev/null +++ b/test/model/productplan/update.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +update($planId[0], $posts)) && p('0:old') && e('1.1'); //修改planId=5的数据,打印出旧的名称 +r($plan->update($planId[0], $posts)) && p('0:old') && e('0'); //二次修改旧的数据,由于数据发生变化,理应失败 +r($plan->update($planId[0], $late)) && p() && e('0'); //测试传入结束时间小于开始时间的情况 +?> diff --git a/test/model/productplan/updateparentstatus.php b/test/model/productplan/updateparentstatus.php new file mode 100755 index 0000000000..cf71fe9382 --- /dev/null +++ b/test/model/productplan/updateparentstatus.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +updateParentStatus($parentid[0])) && p() && e('1'); //将id为1的计划改为wait状态 +r($plan->updateParentStatus($parentid[1])) && p() && e('1'); //将id为2的计划改为doing状态 +r($plan->updateParentStatus($parentid[2])) && p() && e('1'); //将id为3的计划改为closed状态 +r($plan->updateParentStatus($parentid[3])) && p() && e('1'); //将id为4的计划改为done状态 +?> diff --git a/test/model/productplan/updatestatus.php b/test/model/productplan/updatestatus.php new file mode 100755 index 0000000000..7bf667ba58 --- /dev/null +++ b/test/model/productplan/updatestatus.php @@ -0,0 +1,21 @@ +#!/usr/bin/env php +updateStatus($planId[0], $planId[1], $planId[4])) && p() && e('1'); //修改id=5的状态为doing +r($plan->updateStatus($planId[0], $planId[2], $planId[5])) && p() && e('1'); //修改状态为done +r($plan->updateStatus($planId[0], $planId[3], $planId[6])) && p() && e('1'); //修改状态为closed +?>