|
@@ -92,8 +92,13 @@ class MoneyLog extends Base
|
|
|
try {
|
|
try {
|
|
|
validate(MoneyValidate::class)->scene('edit')->check($data);
|
|
validate(MoneyValidate::class)->scene('edit')->check($data);
|
|
|
|
|
|
|
|
- $rows = $monuyModel->where('id', $data['id'])->where('user_id', $this->userinfo['id'])->whereDay('createtime')->where('status', $monuyModel::STATUS_NORMAL)->find();
|
|
|
|
|
- if(!$rows) $this->error('数据不存在');
|
|
|
|
|
|
|
+ $rows = $monuyModel->where('id', $data['id'])->where('user_id', $this->userinfo['id'])->where('status', $monuyModel::STATUS_NORMAL)->find();
|
|
|
|
|
+ if(!$rows) throw new \Exception('订单不存在');
|
|
|
|
|
+
|
|
|
|
|
+ $dateString = date('Ymd', strtotime($rows->createtime . ' +2 days'));
|
|
|
|
|
+ // 将日期字符串转换为时间戳
|
|
|
|
|
+ if(date('Ymd') > $dateString) throw new \Exception('已超出修改时间限制');
|
|
|
|
|
+
|
|
|
//发货数据
|
|
//发货数据
|
|
|
$data['create_month'] = date('Ym', strtotime($data['create_date']));//创建月份
|
|
$data['create_month'] = date('Ym', strtotime($data['create_date']));//创建月份
|
|
|
$result = $rows->save($data);
|
|
$result = $rows->save($data);
|