|
@@ -335,7 +335,24 @@ class CouponPacketController extends Curd
|
|
|
|
|
|
public function packetIssue(Request $request)
|
|
|
{
|
|
|
+ $packetId = $request->post('packet_id');
|
|
|
+ if (!$packetId) {
|
|
|
+ return json_fail("参数异常");
|
|
|
+ }
|
|
|
+ $packet = CouponPacket::where('coupon_packet_id', $packetId)
|
|
|
+ ->where('coupon_packet_status', 'PENDING')
|
|
|
+ ->first();
|
|
|
+ if (!$packet) {
|
|
|
+ return json_fail('数据异常');
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private function generatePacket(CouponPacket $couponPacket)
|
|
|
+ {
|
|
|
+ $length = $couponPacket->coupon_packet_seq_length;
|
|
|
+ $prefixLength = strlen($couponPacket->coupon_packet_seq_prefix);
|
|
|
+ $suffixLength = strlen($couponPacket->coupon_packet_seq_suffix);
|
|
|
+
|
|
|
+ }
|
|
|
}
|