订单和商品数据隔离查询
This commit is contained in:
parent
883601d520
commit
77e577c22d
|
|
@ -236,4 +236,7 @@ public class DevInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "管理方式(0编号 1计数)")
|
@ApiModelProperty(value = "管理方式(0编号 1计数)")
|
||||||
private String manageType;
|
private String manageType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上传人id")
|
||||||
|
private Long ownId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
int saveSuccessNum = devInfoMapper.insertDevInfo(devInfo);
|
||||||
if (saveSuccessNum == 0) {
|
if (saveSuccessNum == 0) {
|
||||||
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
||||||
|
|
@ -478,6 +478,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
||||||
|
devInfo.setOwnId(SecurityUtils.getLoginUser().getUserid());
|
||||||
return devInfoMapper.selectDevInfoLists(devInfo);
|
return devInfoMapper.selectDevInfoLists(devInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -567,6 +568,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
//保存用户信息
|
//保存用户信息
|
||||||
devInfo1.setCreator(userId);
|
devInfo1.setCreator(userId);
|
||||||
|
devInfo1.setOwnId(userId);
|
||||||
devInfo1.setCode(String.valueOf(UUID.randomUUID()));
|
devInfo1.setCode(String.valueOf(UUID.randomUUID()));
|
||||||
devInfo1.setTypeId(typeInfo.getTypeId());
|
devInfo1.setTypeId(typeInfo.getTypeId());
|
||||||
devInfo1.setJsDayPrice(Float.valueOf(leasePrice));
|
devInfo1.setJsDayPrice(Float.valueOf(leasePrice));
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrderInfoDto> getOrderDetails(OrderInfoDto orderInfoDto) throws Exception {
|
public List<OrderInfoDto> getOrderDetails(OrderInfoDto orderInfoDto) throws Exception {
|
||||||
|
orderInfoDto.setOrderUser(SecurityUtils.getLoginUser().getUserid());
|
||||||
List<OrderInfoDto> orderInfoDtos = orderMapper.getOrderDetails(orderInfoDto);
|
List<OrderInfoDto> orderInfoDtos = orderMapper.getOrderDetails(orderInfoDto);
|
||||||
for (OrderInfoDto dto : orderInfoDtos) {
|
for (OrderInfoDto dto : orderInfoDtos) {
|
||||||
List<OrderDetailDto> list = new ArrayList();
|
List<OrderDetailDto> list = new ArrayList();
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isOperator != null and isOperator != ''">is_operator,</if>
|
<if test="isOperator != null and isOperator != ''">is_operator,</if>
|
||||||
<if test="isActive != null and isActive != ''">is_active,</if>
|
<if test="isActive != null and isActive != ''">is_active,</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||||
|
<if test="ownId != null">own_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||||
|
|
@ -337,6 +338,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isOperator != null and isOperator != ''">#{isOperator},</if>
|
<if test="isOperator != null and isOperator != ''">#{isOperator},</if>
|
||||||
<if test="isActive != null and isActive != ''">#{isActive},</if>
|
<if test="isActive != null and isActive != ''">#{isActive},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||||
|
<if test="ownId != null">#{ownId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -516,6 +518,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
or locate(#{keyWord},d.description) > 0
|
or locate(#{keyWord},d.description) > 0
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
and d.own_id = #{ownId}
|
||||||
and d.is_active = '1'
|
and d.is_active = '1'
|
||||||
</where>
|
</where>
|
||||||
ORDER BY d.create_time desc
|
ORDER BY d.create_time desc
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
) dept ON dept.deptId = su.dept_id
|
) dept ON dept.deptId = su.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
mt.del_flag = '0'
|
mt.del_flag = '0'
|
||||||
|
and order_user = #{orderUser}
|
||||||
<if test="deviceName != null and deviceName != ''">
|
<if test="deviceName != null and deviceName != ''">
|
||||||
AND mdi.device_name like concat('%',#{deviceName},'%')
|
AND mdi.device_name like concat('%',#{deviceName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue