|
@@ -76,11 +76,12 @@ class Pledges extends Backend
|
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
|
}
|
|
}
|
|
|
$params = $this->preExcludeFields($params);
|
|
$params = $this->preExcludeFields($params);
|
|
|
-
|
|
|
|
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
|
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
|
|
$params[$this->dataLimitField] = $this->auth->id;
|
|
$params[$this->dataLimitField] = $this->auth->id;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ if ($params['type_id'] == '1' && strpos($params['product_id'] , ',') !== false) {
|
|
|
|
|
+ $this->error(__('单品只能选择一个质押产品'));
|
|
|
|
|
+ }
|
|
|
$result = false;
|
|
$result = false;
|
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
|
try {
|
|
try {
|
|
@@ -128,6 +129,9 @@ class Pledges extends Backend
|
|
|
if (empty($params)) {
|
|
if (empty($params)) {
|
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
|
}
|
|
}
|
|
|
|
|
+ if ($params['type_id'] == '1' && strpos($params['product_id'] , ',') !== false) {
|
|
|
|
|
+ $this->error(__('单品只能选择一个质押产品'));
|
|
|
|
|
+ }
|
|
|
$params = $this->preExcludeFields($params);
|
|
$params = $this->preExcludeFields($params);
|
|
|
$result = false;
|
|
$result = false;
|
|
|
Db::startTrans();
|
|
Db::startTrans();
|