|
@@ -19,21 +19,9 @@ class appointmentlogic extends baselogic
|
|
|
protected function setrules()
|
|
|
{
|
|
|
$list = [
|
|
|
- 'getlastinfo' => [
|
|
|
- ['name' => 'code', 'title' => '申请编码', 'require' => true, 'type' => 'string'],
|
|
|
+ 'getinfobyid' => [
|
|
|
+ ['name' => 'id', 'title' => '申请id', 'require' => true, 'type' => 'numeric'],
|
|
|
],
|
|
|
- /*'saveinfo' => [
|
|
|
- ['name' => 'openid', 'title' => 'openid', 'require' => true, 'type' => 'string'],
|
|
|
- ['name' => 'union_id', 'title' => 'union_id', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'nick_name', 'title' => '昵称', 'require' => true, 'type' => 'string'],
|
|
|
- ['name' => 'avatar_url', 'title' => '头像', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'gender', 'title' => '性别', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'province', 'title' => '省', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'city', 'title' => '市', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'country', 'title' => '县', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'tel', 'title' => '手机号', 'require' => false, 'type' => 'string'],
|
|
|
- ['name' => 'address', 'title' => '地址', 'require' => false, 'type' => 'string'],
|
|
|
- ],*/
|
|
|
];
|
|
|
return $list;
|
|
|
}
|
|
@@ -45,13 +33,25 @@ class appointmentlogic extends baselogic
|
|
|
* @author wj
|
|
|
* @date 2022-07-22
|
|
|
*/
|
|
|
- public function getlastinfo($arr)
|
|
|
+ public function getinfobyid($arr)
|
|
|
{
|
|
|
+ $result = $this->checkparam(__FUNCTION__, $arr);
|
|
|
+ if (1 != $result['status']) {
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
$m_a = new appointmentmodel();
|
|
|
- $info = $m_a->getlastinfo($arr);
|
|
|
+ $where = ['id' => $arr['id']];
|
|
|
+ $field = ['name', 'sfzid', 'telno', 'signurl', 'oprdate', 'ispay', 'isuse', 'payorderno'];
|
|
|
+ $info = $m_a->getInfo($where, $field);
|
|
|
if (empty($info)) {
|
|
|
return backarr(0, "无申请数据");
|
|
|
}
|
|
|
+ if (!$info['ispay']) {
|
|
|
+ return backarr(0, "未支付");
|
|
|
+ }
|
|
|
+ if ($info['isuse']) {
|
|
|
+ return backarr(0, "已使用");
|
|
|
+ }
|
|
|
return backarr(1, "查询成功", $info);
|
|
|
}
|
|
|
}
|