提交代码

master
胡锐 6 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)
@ResponseBody
@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 = "telephone", required = false) String telephone,
@RequestParam(name = "positionType", required = false) Integer positionType,
@ -261,9 +261,9 @@ public class BsGasStaffController {
}
Map<String,Object> param = new HashMap<>();
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())) {
param.put("merchantStoreId", userInfoModel.getAccount().getObjectId());
param.put("merId", userInfoModel.getAccount().getObjectId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}

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

Loading…
Cancel
Save