Explorar el Código

周期券发放

gorden hace 4 meses
padre
commit
d24624ab9a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/admin/service/coupon/CouponDetailService.php

+ 2 - 2
app/admin/service/coupon/CouponDetailService.php

@@ -270,7 +270,7 @@ class CouponDetailService
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime($periodJson['gain_datetime']));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime($periodJson['gain_datetime']));
                 } else {
                 } else {
                     $now_nbr -= 1;
                     $now_nbr -= 1;
-                    $params['coupon_detail_gain_datetime'] = date('Y-m-01 00:00:00', strtotime("+" . ($now_nbr + $monthCut) . ' month'));
+                    $params['coupon_detail_gain_datetime'] = date('Y-m-01 00:00:00', strtotime(date('Y-m-01 00:00:00') . "+" . ($now_nbr + $monthCut) . ' month'));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ($now_nbr + $monthCut) . ' month'));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ($now_nbr + $monthCut) . ' month'));
                 }
                 }
             } else {
             } else {
@@ -279,7 +279,7 @@ class CouponDetailService
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ($val + $monthCut) . ' month'));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ($val + $monthCut) . ' month'));
                 } else {
                 } else {
                     $now_nbr -= 1;
                     $now_nbr -= 1;
-                    $params['coupon_detail_gain_datetime'] = date('Y-m-01 00:00:00', strtotime("+" . ((($val + 1) * $now_nbr) + $monthCut) . ' month'));
+                    $params['coupon_detail_gain_datetime'] = date('Y-m-01 00:00:00', strtotime(date('Y-m-01 00:00:00') . "+" . ((($val + 1) * $now_nbr) + $monthCut) . ' month'));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ((($val + 1) * $now_nbr) + $val + $monthCut) . ' month'));
                     $params['coupon_detail_deadline_datetime'] = date('Y-m-t 23:59:59', strtotime(date('Y-m-01 00:00:00') . "+" . ((($val + 1) * $now_nbr) + $val + $monthCut) . ' month'));
                 }
                 }
             }
             }