提交代码

dev
胡锐 5 months ago
parent eaf7871b10
commit 3396738145
  1. 6
      bweb/src/main/java/com/bweb/controller/BsGasStaffController.java
  2. 4
      service/src/main/java/com/hfkj/service/gas/impl/BsGasStaffServiceImpl.java

@ -247,7 +247,7 @@ public class BsGasStaffController {
@RequestMapping(value="/getStaffList",method = RequestMethod.GET) @RequestMapping(value="/getStaffList",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询员工列表") @ApiOperation(value = "查询员工列表")
public ResponseData getStaffList(@RequestParam(name = "merchantStoreId", required = false) Long merchantStoreId, public ResponseData getStaffList(@RequestParam(name = "merId", required = false) Long merId,
@RequestParam(name = "name", required = false) String name, @RequestParam(name = "name", required = false) String name,
@RequestParam(name = "telephone", required = false) String telephone, @RequestParam(name = "telephone", required = false) String telephone,
@RequestParam(name = "positionType", required = false) Integer positionType, @RequestParam(name = "positionType", required = false) Integer positionType,
@ -261,9 +261,9 @@ public class BsGasStaffController {
} }
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merchantStoreId", merchantStoreId); param.put("merId", merId);
} else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) {
param.put("merchantStoreId", userInfoModel.getAccount().getObjectId()); param.put("merId", userInfoModel.getAccount().getObjectId());
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
} }

@ -124,8 +124,8 @@ public class BsGasStaffServiceImpl implements BsGasStaffService {
BsGasStaffExample example = new BsGasStaffExample(); BsGasStaffExample example = new BsGasStaffExample();
BsGasStaffExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); BsGasStaffExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0);
if (MapUtils.getLong(param, "merchantStoreId") != null) { if (MapUtils.getLong(param, "merId") != null) {
criteria.andMerchantStoreIdEqualTo(MapUtils.getLong(param, "merchantStoreId")); criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "name"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "name"))) {

Loading…
Cancel
Save