mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 15:31:03 +00:00
Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev
This commit is contained in:
commit
7c6136e6aa
@ -37,7 +37,7 @@ class StorePointRecord extends AuthController
|
||||
{
|
||||
$where = $this->request->getMore([
|
||||
['time', ''],
|
||||
['trading_type', 0]
|
||||
['trading_type', '']
|
||||
]);
|
||||
$date = $this->services->pointRecord($where);
|
||||
return app('json')->success($date);
|
||||
|
||||
@ -170,6 +170,9 @@ class User extends AuthController
|
||||
* 获取用户账户详情
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function read($id)
|
||||
{
|
||||
@ -194,6 +197,9 @@ class User extends AuthController
|
||||
* 执行赠送会员等级
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function save_give_level($id)
|
||||
{
|
||||
@ -208,6 +214,7 @@ class User extends AuthController
|
||||
* 赠送付费会员时长表单
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \FormBuilder\Exception\FormBuilderException
|
||||
*/
|
||||
public function give_level_time($id)
|
||||
{
|
||||
@ -219,6 +226,9 @@ class User extends AuthController
|
||||
* 执行赠送付费会员时长
|
||||
* @param $id
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function save_give_level_time($id)
|
||||
{
|
||||
|
||||
@ -28,7 +28,11 @@ class CategoryController
|
||||
|
||||
/**
|
||||
* 获取分类列表
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function category(Request $request)
|
||||
{
|
||||
|
||||
@ -142,7 +142,11 @@ class UserInvoiceController
|
||||
$uid = (int)$request->uid();
|
||||
$re = $this->services->saveInvoice($uid, $data);
|
||||
if ($re) {
|
||||
return app('json')->success($re['type'] == 'edit' ? 100001 : $re['data']);
|
||||
if ($re['type'] == 'edit') {
|
||||
return app('json')->success(100001);
|
||||
} else {
|
||||
return app('json')->success(100021, $re['data']);
|
||||
}
|
||||
} else {
|
||||
return app('json')->fail(100005);
|
||||
}
|
||||
|
||||
@ -82,7 +82,9 @@ class UserDao extends BaseDao
|
||||
|
||||
/**
|
||||
* @param $uid
|
||||
* @param string $field
|
||||
* @return \think\Collection
|
||||
* @throws \ReflectionException
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
|
||||
@ -59,7 +59,7 @@ class WechatQrcode extends BaseModel
|
||||
|
||||
public function searchNameAttr($query, $value)
|
||||
{
|
||||
if ($value != '') $query->where('name', $value);
|
||||
if ($value != '') $query->whereLike('name', '%' . $value . '%');
|
||||
}
|
||||
|
||||
public function searchIsDelAttr($query, $value)
|
||||
|
||||
@ -725,12 +725,15 @@ class StoreIntegralOrderServices extends BaseServices
|
||||
* @param int $id
|
||||
* @param string $remark
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function remark(int $id, string $remark)
|
||||
{
|
||||
if (!$remark) throw new AdminException(400106);
|
||||
if (!$id) throw new AdminException(100100);
|
||||
if (!$order = $this->services->get($id)) {
|
||||
if (!$order = $this->dao->get($id)) {
|
||||
throw new AdminException(100025);
|
||||
}
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ class ArticleCategoryServices extends BaseServices
|
||||
*/
|
||||
public function getTreeList()
|
||||
{
|
||||
$where['is_show'] = 1;
|
||||
$where['status'] = 1;
|
||||
return sort_list_tier($this->dao->getMenus($where));
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ class OutStoreOrderServices extends BaseServices
|
||||
* @param array $list
|
||||
* @return array
|
||||
*/
|
||||
public function tidyCartList(array $cartInfo, array $list, int $cartId = 0): array
|
||||
public function tidyCartList(array $cartInfo, array $list, $cartId = 0): array
|
||||
{
|
||||
$list[] = [
|
||||
'cart_id' => $cartId,
|
||||
|
||||
@ -433,18 +433,18 @@ class StoreOrderRefundServices extends BaseServices
|
||||
/** @var StoreOrderStatusServices $statusService */
|
||||
$statusService = app()->make(StoreOrderStatusServices::class);
|
||||
$res = true;
|
||||
//回退优惠卷 拆分子订单不退优惠券
|
||||
if (!$order['pid'] && $order['coupon_id'] && $order['coupon_price']) {
|
||||
/** @var StoreCouponUserServices $couponUserServices */
|
||||
$couponUserServices = app()->make(StoreCouponUserServices::class);
|
||||
$res = $couponUserServices->recoverCoupon((int)$order['coupon_id']);
|
||||
$statusService->save([
|
||||
'oid' => $order['id'],
|
||||
'change_type' => 'coupon_back',
|
||||
'change_message' => '商品退优惠券',
|
||||
'change_time' => time()
|
||||
]);
|
||||
}
|
||||
// //回退优惠卷 拆分子订单不退优惠券
|
||||
// if (!$order['pid'] && $order['coupon_id'] && $order['coupon_price']) {
|
||||
// /** @var StoreCouponUserServices $couponUserServices */
|
||||
// $couponUserServices = app()->make(StoreCouponUserServices::class);
|
||||
// $res = $couponUserServices->recoverCoupon((int)$order['coupon_id']);
|
||||
// $statusService->save([
|
||||
// 'oid' => $order['id'],
|
||||
// 'change_type' => 'coupon_back',
|
||||
// 'change_message' => '商品退优惠券',
|
||||
// 'change_time' => time()
|
||||
// ]);
|
||||
// }
|
||||
//回退积分
|
||||
$order = $this->regressionIntegral($order);
|
||||
$statusService->save([
|
||||
|
||||
@ -107,17 +107,16 @@ class StoreCategoryServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 设置分类状态
|
||||
* @param $id
|
||||
* @param $is_show
|
||||
* @param int $id
|
||||
* @param int $is_show
|
||||
*/
|
||||
public function setShow(int $id, int $is_show)
|
||||
{
|
||||
$res = $this->dao->update($id, ['is_show' => $is_show]);
|
||||
$res = $res && $this->dao->update($id, ['is_show' => $is_show], 'pid');
|
||||
$this->cacheDriver()->clear();
|
||||
if (!$res) {
|
||||
throw new AdminException(100005);
|
||||
} else {
|
||||
$this->cacheDriver()->clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,6 +183,10 @@ class StoreCategoryServices extends BaseServices
|
||||
/**
|
||||
* 保存新增数据
|
||||
* @param $data
|
||||
* @return int
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function createData($data)
|
||||
{
|
||||
|
||||
@ -82,6 +82,9 @@ class UserAddressServices extends BaseServices
|
||||
* @param int $uid
|
||||
* @param string $field
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function getUserDefaultAddress(int $uid, string $field = '*')
|
||||
{
|
||||
|
||||
@ -47,8 +47,10 @@ class UserLabelRelationServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 用户设置标签
|
||||
* @param int $uid
|
||||
* @param $uids
|
||||
* @param array $labels
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function setUserLable($uids, array $labels)
|
||||
{
|
||||
|
||||
@ -40,6 +40,9 @@ class UserLabelServices extends BaseServices
|
||||
* 获取某一本标签
|
||||
* @param $id
|
||||
* @return array|\think\Model|null
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function getLable($id)
|
||||
{
|
||||
@ -110,6 +113,9 @@ class UserLabelServices extends BaseServices
|
||||
* @param int $id
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function save(int $id, array $data)
|
||||
{
|
||||
@ -144,8 +150,11 @@ class UserLabelServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param $id
|
||||
* @throws \Exception
|
||||
* @param int $id
|
||||
* @return bool
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function delLabel(int $id)
|
||||
{
|
||||
|
||||
@ -117,6 +117,7 @@ class UserServices extends BaseServices
|
||||
* @param int $spreadUid
|
||||
* @param string $userType
|
||||
* @return User|\think\Model
|
||||
* @throws Exception
|
||||
*/
|
||||
public function setUserInfo($user, int $spreadUid = 0, string $userType = 'wechat')
|
||||
{
|
||||
@ -992,9 +993,13 @@ class UserServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 执行赠送会员等级
|
||||
* @param int $uid
|
||||
* @param int $id
|
||||
* @param int $level_id
|
||||
* @return mixed
|
||||
* */
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function saveGiveLevel(int $id, int $level_id)
|
||||
{
|
||||
if (!$this->getUserInfo($id)) {
|
||||
@ -1039,19 +1044,26 @@ class UserServices extends BaseServices
|
||||
$field[] = Form::input('time_diff', '到期时间', $timeDiff)->style(['width' => '200px'])->readonly(true);
|
||||
if ($userInfo['is_ever_level'] == 0) {
|
||||
$field[] = Form::input('day_diff', '剩余天数', $dayDiff)->style(['width' => '200px'])->readonly(true);
|
||||
$field[] = Form::number('days', '增加时长(天)')->precision(0)->style(['width' => '200px'])->required();
|
||||
}
|
||||
$field[] = Form::number('days', '增加时长(天)')->precision(0)->style(['width' => '200px'])->required();
|
||||
return create_form('赠送付费会员时长', $field, Url::buildUrl('/user/save_give_level_time/' . $id), 'PUT');
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行赠送付费会员时长
|
||||
* @param int $uid
|
||||
* @param int $id
|
||||
* @param int $days
|
||||
* @return mixed
|
||||
* */
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function saveGiveLevelTime(int $id, int $days)
|
||||
{
|
||||
$userInfo = $this->getUserInfo($id);
|
||||
if ($userInfo->is_ever_level == 1) {
|
||||
return true;
|
||||
}
|
||||
if (!$userInfo) {
|
||||
throw new AdminException(400214);
|
||||
}
|
||||
@ -1117,7 +1129,12 @@ class UserServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 用户详细信息
|
||||
* @param $uid
|
||||
* @param int $uid
|
||||
* @param array $userIfno
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function getUserDetailed(int $uid, $userIfno = [])
|
||||
{
|
||||
@ -1214,6 +1231,9 @@ class UserServices extends BaseServices
|
||||
* 用户详情
|
||||
* @param int $uid
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function read(int $uid)
|
||||
{
|
||||
@ -1222,6 +1242,16 @@ class UserServices extends BaseServices
|
||||
throw new AdminException(100026);
|
||||
}
|
||||
$userInfo['avatar'] = strpos($userInfo['avatar'], 'http') === false ? (sys_config('site_url') . $userInfo['avatar']) : $userInfo['avatar'];
|
||||
$userInfo['overdue_time'] = date('Y-m-d H:i:s', $userInfo['overdue_time']);
|
||||
$userInfo['birthday'] = $userInfo['birthday'] < 0 ? 0 : $userInfo['birthday'];
|
||||
if ($userInfo['addres'] == '') {
|
||||
$defaultAddressInfo = app()->make(UserAddressServices::class)->getUserDefaultAddress($uid);
|
||||
$userInfo['addres'] = $defaultAddressInfo['province'] . $defaultAddressInfo['city'] . $defaultAddressInfo['district'] . $defaultAddressInfo['detail'];
|
||||
}
|
||||
$userInfo['vip_name'] = app()->make(SystemUserLevelServices::class)->value(['grade' => $userInfo['level']], 'name');
|
||||
$userInfo['group_name'] = app()->make(UserGroupServices::class)->value(['id' => $userInfo['group_id']], 'group_name');
|
||||
$userInfo['spread_uid_nickname'] = $this->dao->value(['uid' => $userInfo['spread_uid']], 'nickname') . '(' . $userInfo['spread_uid'] . ')';
|
||||
$userInfo['label_list'] = implode(',', array_column(app()->make(UserLabelRelationServices::class)->getUserLabelList([$uid]), 'label_name'));
|
||||
return [
|
||||
'uid' => $uid,
|
||||
'userinfo' => $this->getUserDetailed($uid, $userInfo),
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
</div>
|
||||
<span v-show="formValidate.type === 'image'">文件最大2Mb,支持bmp/png/jpeg/jpg/gif格式</span>
|
||||
<span v-show="formValidate.type === 'voice'"
|
||||
>文件最大2Mb,支持mp3/wma/wav/amr格式,播放长度不超过60s</span
|
||||
>文件最大2Mb,支持mp3格式,播放长度不超过60s</span
|
||||
>
|
||||
</FormItem>
|
||||
</Form>
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
</Upload>
|
||||
</div>
|
||||
<span v-show="formData.type === 'image'">文件最大2Mb,支持bmp/png/jpeg/jpg/gif格式</span>
|
||||
<span v-show="formData.type === 'voice'">文件最大2Mb,支持mp3/wma/wav/amr格式,播放长度不超过60s</span>
|
||||
<span v-show="formData.type === 'voice'">文件最大2Mb,支持mp3格式,播放长度不超过60s</span>
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@ -84,7 +84,7 @@ export default {
|
||||
name: `${pre}distributionSet`,
|
||||
meta: {
|
||||
...meta,
|
||||
title: '小程序配置',
|
||||
title: '分销配置',
|
||||
},
|
||||
component: () => import('@/pages/setting/setSystem/index'),
|
||||
},
|
||||
|
||||
@ -55,8 +55,12 @@
|
||||
<view>{{$t(`支付积分`)}}:</view>
|
||||
<view class='conter'>{{cartInfo.total_price}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="cartInfo.mark">
|
||||
<view>{{$t(`订单备注`)}}:</view>
|
||||
<view class='conter'>{{cartInfo.mark}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="cartInfo.remark">
|
||||
<view>{{$t(`备注`)}}:</view>
|
||||
<view>{{$t(`商家备注`)}}:</view>
|
||||
<view class='conter'>{{cartInfo.remark}}</view>
|
||||
</view>
|
||||
<view class='item acea-row row-between' v-if="cartInfo.delivery_type === 'express'">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user