给客户和仓库增加权限控制

This commit is contained in:
季圣华
2021-04-30 17:48:40 +08:00
parent 93a384dfdf
commit 831b13fee1
3 changed files with 45 additions and 14 deletions

View File

@@ -78,11 +78,11 @@ public class SupplierController {
* @return
*/
@PostMapping(value = "/findBySelect_cus")
public JSONArray findBySelectCus(@RequestParam(value = "UBType", required = false) String ubType,
@RequestParam(value = "UBKeyId", required = false) String ubKeyId,
HttpServletRequest request) {
public JSONArray findBySelectCus(HttpServletRequest request) {
JSONArray arr = new JSONArray();
try {
String type = "UserCustomer";
Long userId = userService.getUserId(request);
List<Supplier> supplierList = supplierService.findBySelectCus();
JSONArray dataArray = new JSONArray();
if (null != supplierList) {
@@ -92,7 +92,7 @@ public class SupplierController {
//勾选判断1
Boolean flag = false;
try {
flag = userBusinessService.checkIsUserBusinessExist(ubType, ubKeyId, "[" + supplier.getId().toString() + "]");
flag = userBusinessService.checkIsUserBusinessExist(type, userId.toString(), "[" + supplier.getId().toString() + "]");
} catch (DataAccessException e) {
logger.error(">>>>>>>>>>>>>>>>>查询用户对应的客户:存在异常!");
}