|
@@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -10,7 +11,11 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.dao.EmployeeDao;
|
|
|
import com.ym.mec.biz.dal.dto.WithdrawDto;
|
|
|
+import com.ym.mec.biz.dal.entity.Employee;
|
|
|
import com.ym.mec.biz.dal.enums.DealStatusEnum;
|
|
|
import com.ym.mec.biz.dal.enums.TransTypeEnum;
|
|
|
import com.ym.mec.biz.service.StudentWithdrawService;
|
|
@@ -24,6 +29,12 @@ public class StudentWithdrawController extends BaseController {
|
|
|
@Autowired
|
|
|
private StudentWithdrawService studentWithdrawService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private EmployeeDao employeeDao;
|
|
|
+
|
|
|
@PostMapping("confirm")
|
|
|
@ApiOperation(value = "确认提现")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentWithdraw/confirm')")
|
|
@@ -36,6 +47,16 @@ public class StudentWithdrawController extends BaseController {
|
|
|
@GetMapping("/queryPage")
|
|
|
@PreAuthorize("@pcs.hasPermissions('studentWithdraw/queryPage')")
|
|
|
public Object queryPage(WithdrawDto queryInfo) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ if(!sysUser.getIsSuperAdmin()){
|
|
|
+ if(StringUtils.isEmpty(queryInfo.getOrganId())){
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
+ }
|
|
|
+ }
|
|
|
return succeed(studentWithdrawService.queryPage(queryInfo));
|
|
|
}
|
|
|
}
|