This commit is contained in:
Lemon
2023-07-05 08:16:44 +08:00
parent 551b41413f
commit fee6396d68

View File

@@ -77,8 +77,20 @@ public class OrderBasicInfoController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('order:order:list')")
@GetMapping("/order/totalData")
public AjaxResult getOrderTotalData(QueryOrderDTO orderBasicInfo) {
return AjaxResult.success(orderBasicInfoService.getOrderTotalData(orderBasicInfo));
public AjaxResult getOrderTotalData(QueryOrderDTO dto) {
// 权限过滤
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
if (authorizedMap == null) {
// 为空表示没有权限,返回空数组
return new AjaxResult();
}
String deptId = authorizedMap.getDeptId();
// 根据部门id查询merchantId
PileMerchantInfo pileMerchantInfo = pileMerchantInfoService.queryInfoByDeptId(deptId);
if (pileMerchantInfo != null) {
dto.setMerchantId(String.valueOf(pileMerchantInfo.getId()));
}
return AjaxResult.success(orderBasicInfoService.getOrderTotalData(dto));
}
/**