Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
From-wh 2023-03-28 14:13:22 +08:00
commit 88ad2d324d
12 changed files with 28 additions and 10 deletions

View File

@ -165,10 +165,14 @@ class ArticleCategory extends AuthController
/**
* 树形列表
* @return mixed
* @throws \ReflectionException
*/
public function getTreeList()
{
$list = $this->service->getTreeList();
foreach ($list as &$item) {
$item['disabled'] = !$item['status'] || $item['is_del'];
}
return app('json')->success($list);
}
}

View File

@ -263,9 +263,6 @@ class StoreOrderController
return app('json')->fail(410215);
}
//重新生成订单号去支付
// $order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
//0元支付
if (bcsub((string)$orderInfo['pay_price'], '0', 2) <= 0) {
//创建订单jspay支付

View File

@ -50,6 +50,9 @@ class StoreCouponsController
* 领取优惠券
* @param Request $request
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function receive(Request $request)
{
@ -82,6 +85,7 @@ class StoreCouponsController
* @param StoreCouponIssueServices $service
* @param $cartId
* @param $new
* @param $shippingType
* @return mixed
* @throws \Psr\SimpleCache\InvalidArgumentException
* @throws \think\db\exception\DataNotFoundException

View File

@ -86,9 +86,10 @@ class ArticleCategoryDao extends BaseDao
* 添加修改选择上级分类列表
* @param array $where
* @return array
* @throws \ReflectionException
*/
public function getMenus(array $where)
{
return $this->search($where)->order('sort desc,id desc')->column('title,pid,id');
return $this->search($where)->order('sort desc,id desc')->column('title,pid,id,is_del,status');
}
}

View File

@ -123,6 +123,12 @@ class StoreCouponIssueServices extends BaseServices
$data['is_permanent'] = 1;
$data['total_count'] = 0;
}
if ($data['is_permanent'] != 1 && $data['receive_limit'] > $data['total_count']) {
throw new AdminException(500031);
}
$data['add_time'] = time();
$res = $this->dao->save($data);
if (($data['product_id'] !== '' || $data['category_id'] !== '') && $res) {
@ -259,7 +265,7 @@ class StoreCouponIssueServices extends BaseServices
$data['add_time'] = $item['start_use_time'];
$data['end_time'] = $item['end_use_time'];
}
$data['type'] = 'get';
$data['type'] = 'send';
$issue['uid'] = $uid;
$issue['issue_coupon_id'] = $item['id'];
$issue['add_time'] = $time;

View File

@ -170,6 +170,8 @@ class StoreCouponUserServices extends BaseServices
$coupon['start_time'] = $coupon['start_time'] ? date('Y/m/d', $coupon['start_time']) : date('Y/m/d', $coupon['add_time']);
$coupon['add_time'] = date('Y/m/d', $coupon['add_time']);
$coupon['end_time'] = date('Y/m/d', $coupon['end_time']);
$coupon['start_use_time'] = $coupon['start_use_time'] > 0 ? date('Y/m/d', $coupon['start_use_time']) : 0;
$coupon['end_use_time'] = $coupon['start_use_time'] > 0 ? date('Y/m/d', $coupon['end_use_time']) : 0;
$coupon['title'] = $coupon['coupon_title'];
$coupon['type'] = $coupon['applicable_type'];
$coupon['use_min_price'] = floatval($coupon['use_min_price']);

View File

@ -45,7 +45,7 @@ class StoreCouponUserUserServices extends BaseServices
[$page, $limit] = $this->getPageValue();
$list = $this->dao->sysPage($where, $page, $limit);
foreach ($list as $k => &$v) {
$v['start_time'] = $v['add_time'];
$v['start_time'] = $v['start_time'] > 0 ? $v['start_time'] : $v['add_time'];
if ($v['end_time'] < time() || $v['use_time'] != 0) $v['is_fail'] = 1;
}
$count = $this->dao->sysCount($where);

View File

@ -151,10 +151,10 @@ class ArticleCategoryServices extends BaseServices
/**
* 树形列表
* @return array
* @throws \ReflectionException
*/
public function getTreeList()
{
$where['status'] = 1;
return sort_list_tier($this->dao->getMenus($where));
return sort_list_tier($this->dao->getMenus([]));
}
}

View File

@ -569,6 +569,7 @@ class StoreOrderDeliveryServices extends BaseServices
/**
* 虚拟商品自动发货
* @param $orderInfo
* @throws \ReflectionException
*/
public function virtualSend($orderInfo)
{

View File

@ -92,6 +92,9 @@ class StoreProductCouponServices extends BaseServices
* @param int $uid
* @param $orderId
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function giveOrderProductCoupon(int $uid, $orderId)
{

View File

@ -83,7 +83,7 @@
@on-change="dateChange"
></DatePicker>
</FormItem>
<FormItem label="领取时间">
<FormItem label="领取时间" v-if="formData.receive_type != 2 && formData.receive_type != 3">
<RadioGroup v-model="isReceiveTime">
<Radio :label="1">限时</Radio>
<Radio :label="0">不限时</Radio>

View File

@ -42,7 +42,7 @@
<Icon type="md-close" v-else color="#ed5565" size="14" />
</template>
<template slot-scope="{ row, index }" slot="add_time">
<span> {{ row.add_time | formatDate }}</span>
<span> {{ row.start_time | formatDate }}</span>
</template>
<template slot-scope="{ row, index }" slot="end_time">
<span> {{ row.end_time | formatDate }}</span>