diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java index 28e1137..177c754 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java @@ -236,4 +236,7 @@ public class DevInfo extends BaseEntity { @ApiModelProperty(value = "管理方式(0编号 1计数)") private String manageType; + @ApiModelProperty(value = "上传人id") + private Long ownId; + } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java index 3d62b89..0d4c8c2 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java @@ -287,9 +287,9 @@ public class DevInfoServiceImpl implements DevInfoService { } //获取用户信息 - Long userId = SecurityUtils.getUserId(); + Long userId = SecurityUtils.getLoginUser().getUserid(); //保存用户信息 - devInfo.setCreator(userId).setMaStatus(ON_HIRE.getCode()); + devInfo.setCreator(userId).setMaStatus(ON_HIRE.getCode()).setOwnId(userId); int saveSuccessNum = devInfoMapper.insertDevInfo(devInfo); if (saveSuccessNum == 0) { return AjaxResult.error("设备信息SQL保存失败,请修改后重试"); @@ -478,6 +478,7 @@ public class DevInfoServiceImpl implements DevInfoService { */ @Override public List selectDevInfoLists(DevInfoVo devInfo) { + devInfo.setOwnId(SecurityUtils.getLoginUser().getUserid()); return devInfoMapper.selectDevInfoLists(devInfo); } @@ -567,6 +568,7 @@ public class DevInfoServiceImpl implements DevInfoService { Long userId = SecurityUtils.getUserId(); //保存用户信息 devInfo1.setCreator(userId); + devInfo1.setOwnId(userId); devInfo1.setCode(String.valueOf(UUID.randomUUID())); devInfo1.setTypeId(typeInfo.getTypeId()); devInfo1.setJsDayPrice(Float.valueOf(leasePrice)); diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java index 81c7be8..c34d71b 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java @@ -65,6 +65,7 @@ public class OrderServiceImpl implements OrderService { @Override public List getOrderDetails(OrderInfoDto orderInfoDto) throws Exception { + orderInfoDto.setOrderUser(SecurityUtils.getLoginUser().getUserid()); List orderInfoDtos = orderMapper.getOrderDetails(orderInfoDto); for (OrderInfoDto dto : orderInfoDtos) { List list = new ArrayList(); diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index fc3ce87..671a6a8 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -300,6 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" is_operator, is_active, update_by, + own_id, #{deviceName}, @@ -337,6 +338,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{isOperator}, #{isActive}, #{updateBy}, + #{ownId}, @@ -516,6 +518,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" or locate(#{keyWord},d.description) > 0 ) + and d.own_id = #{ownId} and d.is_active = '1' ORDER BY d.create_time desc diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml index d3f7368..549338a 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml @@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) dept ON dept.deptId = su.dept_id WHERE mt.del_flag = '0' + and order_user = #{orderUser} AND mdi.device_name like concat('%',#{deviceName},'%')