Commit 0571ea67 authored by shajiaiming's avatar shajiaiming

调整备注填加

parent 00b3f2cd
......@@ -24,9 +24,8 @@ class TradeController extends BaseController
{
$request = Yii::$app->request;
$hash = $request->post('hash');
$memo = $request->post('memo');
if (empty($hash) || empty($memo)) {
return ['code' => 1, 'data' => [], 'msg' => '交易hash值或者本地备注不能为空'];
if (empty($hash)) {
return ['code' => 1, 'data' => [], 'msg' => '交易hash值不能为空'];
}
$model = new CoinHashMemo();
$model->setScenario(CoinHashMemo::SCENARIOS_CREATE);
......@@ -42,8 +41,8 @@ class TradeController extends BaseController
$request = Yii::$app->request;
$hash = $request->post('hash');
$memo = $request->post('memo');
if (empty($hash) || empty($memo)) {
return ['code' => 1, 'data' => [], 'msg' => '交易hash值或者本地备注不能为空'];
if (empty($hash)) {
return ['code' => 1, 'data' => [], 'msg' => '交易hash值不能为空'];
}
$model = CoinHashMemo::find()->where(['hash' => $hash])->one();
if (empty($model)) {
......
......@@ -24,8 +24,8 @@ class CoinHashMemo extends BaseActiveRecord
public function rules() {
return [
[['hash','memo'], 'required'],
['coins_fee','safe']
[['hash'], 'required'],
[['coins_fee','memo'],'safe']
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment