1
This commit is contained in:
1 parent
efc7f1bf27
commit
3d3c8f17e1
3 files changed
+42
No files matched your search
+23
@@ -274,6 +274,29 @@ public class HardOrderController {
|
||||
return R.ok(hardwareOrderService.scopePageList(page, dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询未识别订单", description = "分页查询未识别订单")
|
||||
@PostMapping("/no-recog/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardwareOrderNoRecog_view')")
|
||||
public R<Page<HardOrderVo>> noRecogPageJoin(@ParameterObject Page page, @RequestBody HardOrderDto dto) {
|
||||
DataScope dataScope = DataScope.of().func(DataScopeFuncEnum.ALL);
|
||||
dataScope.setScopeDeptName("merchant_dept_id");
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
CurrentUserHardTypeInfoDto hardTypeInfo = hardManagerService.getCurrentUserHardTypeInfo(user);
|
||||
dto.setMchTypeCodes(hardTypeInfo.getHardTypeList());
|
||||
// 查询商户和下面的子商户
|
||||
List<Long> mchDtoIds = dto.getMchIds();
|
||||
if (ObjectUtil.isNotEmpty(mchDtoIds) && mchDtoIds.size() == 1) {
|
||||
Long mchId = mchDtoIds.get(0);
|
||||
List<MchManageVo> mchList = mchService.getByParentId(mchId).getData();
|
||||
if (ObjectUtil.isNotEmpty(mchList)) {
|
||||
List<Long> mchIds = mchList.stream().map(MchManageVo::getId).toList();
|
||||
mchDtoIds.addAll(mchIds);
|
||||
dto.setMchIds(mchDtoIds);
|
||||
}
|
||||
}
|
||||
return R.ok(hardwareOrderService.noRecogScopePageJoin(page, dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
@GetMapping("/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardwareOrder_view')")
|
||||
|
||||
+6
@@ -38,6 +38,11 @@ public interface HardOrderService extends IService<HardOrderEntity> {
|
||||
|
||||
Page<HardOrderVo> scopePageList(Page page, HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
/**
|
||||
* 分页查询未识别订单
|
||||
*/
|
||||
Page<HardOrderVo> noRecogScopePageJoin(Page page, HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
List<HardOrderVo> scopeList(HardOrderDto dto, DataScope dataScope);
|
||||
|
||||
HardOrderVo join(Long id);
|
||||
@@ -145,4 +150,5 @@ public interface HardOrderService extends IService<HardOrderEntity> {
|
||||
* 是否需要支付
|
||||
*/
|
||||
boolean isPay(HardOrderTypeEnum type, HardPayTypeEnum payType);
|
||||
|
||||
}
|
||||
+13
@@ -19,6 +19,7 @@ import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
|
||||
import com.bsd.pjcloud.admin.api.utils.DataUtil;
|
||||
import com.bsd.pjcloud.admin.api.vo.UserVO;
|
||||
import com.bsd.pjcloud.canteen.api.feign.RemoteOnlineCanteenSpuService;
|
||||
import com.bsd.pjcloud.canteen.constant.OrderTypeEnum;
|
||||
import com.bsd.pjcloud.canteen.dto.CanteenSpuUpdateStockReqDTO;
|
||||
import com.bsd.pjcloud.common.core.constant.CacheConstants;
|
||||
import com.bsd.pjcloud.common.core.constant.CommonConstants;
|
||||
@@ -60,6 +61,7 @@ import com.bsd.pjcloud.hard.api.vo.HardDoorFlowVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.manager.HardManagerVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardCarVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardCreateHardQrCodeScanOrderVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardOrderPayTypeVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardOrderVo;
|
||||
import com.bsd.pjcloud.hard.api.vo.wechat.WechatMicropayVo;
|
||||
import com.bsd.pjcloud.hard.mapper.manager.HardManagerMapper;
|
||||
@@ -188,6 +190,17 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询未识别订单
|
||||
*/
|
||||
@Override
|
||||
public Page<HardOrderVo> noRecogScopePageJoin(Page page, HardOrderDto dto, DataScope dataScope) {
|
||||
dto.setOrderPayTypeCodes(List.of(HardPayTypeEnum.HARD_DOOR_FREE_PAY.getType()));
|
||||
dto.setOrderStatus(HardOrderStatusEnum.CREATE.getType());
|
||||
Page<HardOrderVo> list = baseMapper.scopePageList(page, dto, dataScope);
|
||||
disposeList(list.getRecords(), dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HardOrderVo join(Long id) {
|
||||
|
||||
Reference in new issue
Block a user