Browse Source

用户登录封装

pull/1/head
pengda 9 months ago
parent
commit
a422f7d117
  1. 20
      model/mCase.php

20
model/mCase.php

@ -63,18 +63,10 @@ class mCase extends mBase {
}
$data = array();
if (!empty($name)) {
$data['name']=$name;
}
if (!empty($source)) {
$data['source']=$source;
}
if (!empty($original)) {
$data['original']=$original;
}
if (!empty($method)) {
$data['method']=$method;
}
if (!empty($name)) $data['name']=$name;
if (!empty($source)) $data['source']=$source;
if (!empty($original)) $data['original']=$original;
if (!empty($method)) $data['method']=$method;
$res = $this->obj->update($this->tbl, $data, array('sql' => '`id`=?', 'vals' => array($id)));
if (!$res) {
@ -101,7 +93,7 @@ class mCase extends mBase {
$herb = $this->getHerbByName($item['name']);
if ($herb) {
$temp['herb_id'] = $herb['id'];
}else{
} else {
$temp['herb_id'] = $this->createHerb(array('name' => $item['name']));
}
$case_herb[] = $temp;
@ -155,7 +147,7 @@ class mCase extends mBase {
return false;
}
}
}else{
} else {
//需要增加药方对应的药材
foreach ($new_data as $key => $value) {
if (!isset($old_data[$key])) {

Loading…
Cancel
Save