mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
This commit is contained in:
parent
970e524088
commit
3110e427fb
@ -20,7 +20,8 @@ public enum TradeOrderOperateTypeEnum {
|
||||
ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"),
|
||||
MEMBER_RECEIVE(30, "用户已收货"),
|
||||
SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"),
|
||||
PICK_UP_RECEIVE(32, "自提收货"),
|
||||
ADMIN_PICK_UP_RECEIVE(32, "管理员自提收货"),
|
||||
MEMBER_PICK_UP_RECEIVE(32, "用户自提收货"),
|
||||
MEMBER_COMMENT(33, "用户评价"),
|
||||
SYSTEM_COMMENT(34, "到期未评价,系统自动评价"),
|
||||
MEMBER_CANCEL(40, "取消订单"),
|
||||
|
@ -126,11 +126,17 @@ public class TradeOrderController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
// TODO @疯狂:1、在【订单列表】界面,增加一个【核销按钮】。点击后,弹窗出一个核销码输入的窗口。
|
||||
//
|
||||
//2、输入核销码后,点击确认,基于 code 查询对应的订单,之后弹窗展示。
|
||||
//
|
||||
//3、新的弹窗,下面有个【确认核销】按钮。确认后,进行订单核销逻辑。注意,只有门店自提的订单,才可以核销。
|
||||
// TODO 这里的 id 应该是 pickUpVerifyCode 参数哈;
|
||||
@PutMapping("/pick-up")
|
||||
@Operation(summary = "订单核销")
|
||||
@PreAuthorize("@ss.hasPermission('trade:order:pick-up')")
|
||||
public CommonResult<Boolean> pickUpOrder(@RequestParam("id") Long id) {
|
||||
tradeOrderUpdateService.pickUpOrder(id);
|
||||
tradeOrderUpdateService.pickUpOrderByMember(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
@ -120,14 +120,14 @@ public interface TradeOrderUpdateService {
|
||||
*
|
||||
* @param id 订单编号
|
||||
*/
|
||||
void pickUpOrder(Long id);
|
||||
void pickUpOrderByMember(Long id);
|
||||
|
||||
/**
|
||||
* 【管理员】核销订单
|
||||
*
|
||||
* @param pickUpVerifyCode 自提核销码
|
||||
*/
|
||||
void pickUpOrder(String pickUpVerifyCode);
|
||||
void pickUpOrderByAdmin(String pickUpVerifyCode);
|
||||
|
||||
// =================== Order Item ===================
|
||||
|
||||
@ -178,9 +178,9 @@ public interface TradeOrderUpdateService {
|
||||
* @param combinationRecordId 拼团记录编号
|
||||
* @param headId 团长编号
|
||||
*/
|
||||
// TODO 芋艿:再 review 拼团
|
||||
void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId);
|
||||
|
||||
// TODO 芋艿:拼团取消,不调这个接口哈;
|
||||
/**
|
||||
* 取消支付订单
|
||||
*
|
||||
|
@ -670,17 +670,18 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pickUpOrder(Long id) {
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_PICK_UP_RECEIVE)
|
||||
public void pickUpOrderByMember(Long id) {
|
||||
getSelf().pickUpOrder(tradeOrderMapper.selectById(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pickUpOrder(String pickUpVerifyCode) {
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_PICK_UP_RECEIVE)
|
||||
public void pickUpOrderByAdmin(String pickUpVerifyCode) {
|
||||
getSelf().pickUpOrder(tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.PICK_UP_RECEIVE)
|
||||
public void pickUpOrder(TradeOrderDO order) {
|
||||
if (order == null) {
|
||||
throw exception(ORDER_NOT_FOUND);
|
||||
@ -688,7 +689,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
if (ObjUtil.notEqual(DeliveryTypeEnum.PICK_UP.getType(), order.getDeliveryType())) {
|
||||
throw exception(ORDER_RECEIVE_FAIL_DELIVERY_TYPE_NOT_PICK_UP);
|
||||
}
|
||||
// todo 校验核销操作人?
|
||||
receiveOrder0(order);
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
||||
import cn.iocoder.yudao.module.system.service.social.SocialUserService;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -30,6 +30,7 @@ import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ -101,6 +102,9 @@ public class AuthController {
|
||||
|
||||
// 1.2 获得角色列表
|
||||
Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(getLoginUserId());
|
||||
if (CollUtil.isEmpty(roleIds)) {
|
||||
return success(AuthConvert.INSTANCE.convert(user, Collections.emptyList(), Collections.emptyList()));
|
||||
}
|
||||
List<RoleDO> roles = roleService.getRoleList(roleIds);
|
||||
roles.removeIf(role -> !CommonStatusEnum.ENABLE.getStatus().equals(role.getStatus())); // 移除禁用的角色
|
||||
|
||||
@ -154,4 +158,4 @@ public class AuthController {
|
||||
return success(authService.socialLogin(reqVO));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.convert.auth;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
|
||||
@ -46,6 +47,9 @@ public interface AuthConvert {
|
||||
* @return 菜单树
|
||||
*/
|
||||
default List<AuthPermissionInfoRespVO.MenuVO> buildMenuTree(List<MenuDO> menuList) {
|
||||
if (CollUtil.isEmpty(menuList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 移除按钮
|
||||
menuList.removeIf(menu -> menu.getType().equals(MenuTypeEnum.BUTTON.getType()));
|
||||
// 排序,保证菜单的有序性
|
||||
|
Loading…
Reference in New Issue
Block a user