|
@@ -1,10 +1,7 @@
|
|
|
package org.jeecg.modules.adminuser.controller;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.UUID;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
@@ -21,6 +18,7 @@ import org.jeecg.common.util.PasswordUtil;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.config.shiro.ShiroRealm;
|
|
|
import org.jeecg.modules.adminuser.entity.*;
|
|
|
+import org.jeecg.modules.adminuser.service.IAdminCompSelectService;
|
|
|
import org.jeecg.modules.adminuser.service.IAdminTransferAccountsService;
|
|
|
import org.jeecg.modules.adminuser.service.IAdminUserService;
|
|
|
|
|
@@ -62,6 +60,8 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
|
|
|
private ISysUserService sysUserService;
|
|
|
@Autowired
|
|
|
private IAdminTransferAccountsService adminTransferAccountsService;
|
|
|
+ @Autowired
|
|
|
+ private IAdminCompSelectService adminCompSelectService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -79,28 +79,58 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
HttpServletRequest req, String ssname, String ssphone, String ssksname, String ssdwname) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
QueryWrapper<AdminUser> queryWrapper = QueryGenerator.initQueryWrapper(adminUser, req.getParameterMap());
|
|
|
- queryWrapper.eq("doctor_and_specialist", "1");
|
|
|
- if (ssname != null) {
|
|
|
- queryWrapper.like("name", ssname);
|
|
|
- }
|
|
|
- if (ssphone != null) {
|
|
|
- queryWrapper.like("phone", ssphone);
|
|
|
- }
|
|
|
- if (ssksname != null) {
|
|
|
- queryWrapper.like("ksname", ssksname);
|
|
|
- }
|
|
|
- if (ssdwname != null) {
|
|
|
- queryWrapper.like("dwname", ssdwname);
|
|
|
- }
|
|
|
+ ArrayList<AdminUser> adminUsers = new ArrayList<>();
|
|
|
+ IPage<AdminUser> pageList = null;
|
|
|
+
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
List<String> role = sysUserService.getRole(sysUser.getUsername());
|
|
|
+
|
|
|
+ QueryWrapper<AdminCompSelect> adminCompSelectLambdaQueryWrapper = new QueryWrapper<>();
|
|
|
+
|
|
|
if (!role.contains("admin")) {
|
|
|
- queryWrapper.eq("sys_org_code", sysUser.getOrgCode());
|
|
|
+ adminCompSelectLambdaQueryWrapper.eq("sys_org_code", sysUser.getOrgCode());
|
|
|
+ }
|
|
|
+ List<AdminCompSelect> list = adminCompSelectService.list(adminCompSelectLambdaQueryWrapper);
|
|
|
+
|
|
|
+ for (AdminCompSelect adminCompSelect : list) {
|
|
|
+ String orderId = adminCompSelect.getOrderId();
|
|
|
+
|
|
|
+ queryWrapper.eq("doctor_and_specialist", "1");
|
|
|
+ if (ssname != null) {
|
|
|
+ queryWrapper.like("name", ssname);
|
|
|
+ }
|
|
|
+ if (ssphone != null) {
|
|
|
+ queryWrapper.like("phone", ssphone);
|
|
|
+ }
|
|
|
+ if (ssksname != null) {
|
|
|
+ queryWrapper.like("ksname", ssksname);
|
|
|
+ }
|
|
|
+ if (ssdwname != null) {
|
|
|
+ queryWrapper.like("dwname", ssdwname);
|
|
|
+ }
|
|
|
+ queryWrapper.eq("id", orderId);
|
|
|
+
|
|
|
+ Page<AdminUser> page = new Page<AdminUser>(pageNo, pageSize);
|
|
|
+ pageList = adminUserService.page(page, queryWrapper);
|
|
|
+ List<AdminUser> records = pageList.getRecords();
|
|
|
+ for (AdminUser record : records) {
|
|
|
+ record.setAvatar(adminCompSelect.getAvatar());
|
|
|
+ record.setCardPic(adminCompSelect.getCardPic());
|
|
|
+ record.setKsname(adminCompSelect.getKsName());
|
|
|
+ record.setDwname(adminCompSelect.getDwName());
|
|
|
+ adminUsers.add(record);
|
|
|
+ }
|
|
|
}
|
|
|
- Page<AdminUser> page = new Page<AdminUser>(pageNo, pageSize);
|
|
|
- IPage<AdminUser> pageList = adminUserService.page(page, queryWrapper);
|
|
|
+ pageList.setRecords(adminUsers);
|
|
|
+
|
|
|
+
|
|
|
return Result.OK(pageList);
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -128,7 +158,7 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
|
|
|
@ApiOperation(value = "用户管理-编辑", notes = "用户管理-编辑")
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
|
|
public Result<String> edit(@RequestBody AdminUser adminUser) {
|
|
|
- adminUserService.updateById(adminUser);
|
|
|
+ adminUserService.updateByUser(adminUser);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
|
|
@@ -285,15 +315,15 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
|
|
|
|
|
|
@ApiOperation(value = "支付回调接口", notes = "支付回调接口")
|
|
|
@PostMapping(value = "notifyUrl")
|
|
|
- public String notifyUrl(@RequestHeader("dealer-id") String dealerId,
|
|
|
- @RequestHeader("request-id") String requestId,
|
|
|
- @RequestParam(name = "data", required = true) String data,
|
|
|
- @RequestParam(name = "mess", required = true) String mess,
|
|
|
- @RequestParam(name = "timestamp", required = true) String timestamp,
|
|
|
- @RequestParam(name = "sign", required = true) String sign,
|
|
|
- @RequestParam(name = "sign_type", required = true) String sign_type,
|
|
|
- HttpServletRequest request) {
|
|
|
- return adminTransferAccountsService.notifyUrl(requestId,data,mess,timestamp,sign,sign_type);
|
|
|
+ public String notifyUrl(@RequestHeader("dealer-id") String dealerId,
|
|
|
+ @RequestHeader("request-id") String requestId,
|
|
|
+ @RequestParam(name = "data", required = true) String data,
|
|
|
+ @RequestParam(name = "mess", required = true) String mess,
|
|
|
+ @RequestParam(name = "timestamp", required = true) String timestamp,
|
|
|
+ @RequestParam(name = "sign", required = true) String sign,
|
|
|
+ @RequestParam(name = "sign_type", required = true) String sign_type,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ return adminTransferAccountsService.notifyUrl(requestId, data, mess, timestamp, sign, sign_type);
|
|
|
}
|
|
|
|
|
|
// @ApiOperation(value = "云账户批量支付接口信息存储", notes = "云账户批量支付接口信息存储")
|
|
@@ -310,6 +340,4 @@ public class AdminDoctorUserController extends JeecgController<AdminUser, IAdmin
|
|
|
// }
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|