APP权限

master
cez 2022-08-18 08:15:42 +08:00
parent 8f166c0fd5
commit 389ea076e5
1 changed files with 42 additions and 41 deletions

View File

@ -8,6 +8,8 @@ import com.zzjee.rfid.entity.RfidBuseEntity;
import com.zzjee.uniapp.entity.WmsAppFunctionEntity; import com.zzjee.uniapp.entity.WmsAppFunctionEntity;
import com.zzjee.uniapp.entity.WmsAppRoleEntity; import com.zzjee.uniapp.entity.WmsAppRoleEntity;
import com.zzjee.uniapp.entity.WmsAppUserEntity; import com.zzjee.uniapp.entity.WmsAppUserEntity;
import com.zzjee.uniapp.service.WmsAppFunctionServiceI;
import com.zzjee.uniapp.service.WmsAppRoleServiceI;
import com.zzjee.uniapp.service.WmsAppUserServiceI; import com.zzjee.uniapp.service.WmsAppUserServiceI;
import com.zzjee.wave.controller.WaveToDownController; import com.zzjee.wave.controller.WaveToDownController;
import com.zzjee.wave.controller.WaveToFjController; import com.zzjee.wave.controller.WaveToFjController;
@ -90,6 +92,11 @@ public class ApiController {
private static final Logger logger = Logger.getLogger(ApiController.class); private static final Logger logger = Logger.getLogger(ApiController.class);
@Autowired @Autowired
private WmsAppUserServiceI wmsAppUserService; private WmsAppUserServiceI wmsAppUserService;
@Autowired
private WmsAppRoleServiceI wmsAppRoleService;
@Autowired
private WmsAppFunctionServiceI wmsAppFunctionService;
//收货相关接口begin //收货相关接口begin
//收货列表 //收货列表
@RequestMapping(value = "/wvNoticeController/list", method = RequestMethod.GET) @RequestMapping(value = "/wvNoticeController/list", method = RequestMethod.GET)
@ -341,48 +348,42 @@ public class ApiController {
* *
* @return * @return
*/ */
//
// @RequestMapping(value = "/appfunctionList", method = RequestMethod.GET)
//
// public ResponseMessage<?> appfunctionList(@PathVariable("username") String username,
// HttpServletRequest request) {
@RequestMapping(value = "/appfunctionList", method = RequestMethod.GET)
// public ResponseMessage<?> appfunctionList(@PathVariable("username") String username,
// //根据用户名获取APP用户 HttpServletRequest request) {
// CriteriaQuery queryuser = new CriteriaQuery(WmsAppUserEntity.class); //根据用户名获取APP用户
// queryuser.eq("appuser_code",username); CriteriaQuery queryuser = new CriteriaQuery(WmsAppUserEntity.class);
// List<WmsAppUserEntity> listByCriteriaQuery = wmsAppUserService.getListByCriteriaQuery(queryuser, false); queryuser.eq("appuser_code",username);
// if(CollectionUtils.isEmpty(listByCriteriaQuery)){ List<WmsAppUserEntity> listByCriteriaQuery = wmsAppUserService.getListByCriteriaQuery(queryuser, false);
// return Result.error("未找到APP用户信息"); if(CollectionUtils.isEmpty(listByCriteriaQuery)){
// } return Result.error("未找到APP用户信息");
// //获取用户角色Id }
// String roleId =listByCriteriaQuery.get(0).getApproleId(); //获取用户角色Id
// System.err.println(roleId); String roleId =listByCriteriaQuery.get(0).getApproleId();
// //根据用户角色Id获取APP角色集合 System.err.println(roleId);
// CriteriaQuery queryrole = new CriteriaQuery(WmsAppRoleEntity.class); //根据用户角色Id获取APP角色集合
// CriteriaQuery queryrole = new CriteriaQuery(WmsAppRoleEntity.class);
// queryrole.in("id",roleId.split(","));
// queryrole.in("id",roleId.split(",")); List<WmsAppRoleEntity> mesAppRole = wmsAppRoleService.getListByCriteriaQuery(queryrole,false);
// List<WmsAppRoleEntity> mesAppRole = mesAppRoleService.list(wrapper); if(mesAppRole==null){
// if(mesAppRole==null){ return Result.error("未找到APP角色信息");
// return Result.error("未找到APP角色信息"); }
// } String funidstr = "";
// String funidstr = ""; for (WmsAppRoleEntity role : mesAppRole) {
// for (WmsAppRole role : mesAppRole) { //拼接获取的APP模块id
// //拼接获取的APP模块id funidstr = funidstr + ","+role.getAppmodelId();
// funidstr = funidstr + ","+role.getAppmodelId(); System.err.println(funidstr);
// System.err.println(funidstr); }
// } //根据APP模块id获取APP功能模块集合
// //根据APP模块id获取APP功能模块集合 CriteriaQuery funcwrapper = new CriteriaQuery(WmsAppFunctionEntity.class);
// QueryWrapper<WmsAppFunction> funcwrapper = new QueryWrapper<>(); funcwrapper.in("id",funidstr.split(",")) ;
// funcwrapper.lambda().in(WmsAppFunction::getId,funidstr.split(",")).eq(WmsAppFunction::getIfBind,"0").orderByAsc(WmsAppFunction::getAppmodelSort); List<WmsAppFunctionEntity> mesAppFunctions = wmsAppFunctionService.getListByCriteriaQuery(funcwrapper,false);
// List<WmsAppFunctionEntity> mesAppFunctions = mesAppFunctionService.list(funcwrapper); if(mesAppFunctions==null){
// if(mesAppFunctions==null){ return Result.error("未找到APP功能模块信息");
// return Result.error("未找到APP功能模块信息"); }
// } return Result.success(mesAppFunctions);
// return Result.success(mesAppFunctions); }
// }