Commit 34e6c75a authored by libin's avatar libin

小程序租车申请列表

parent 6d12fea3
...@@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(scanBasePackages = { @SpringBootApplication(scanBasePackages = {
"com.xxfc.platform", "com.xxfc.platform",
"com.github.wxiaoqi.security.admin.support.aop",
"com.github.wxiaoqi.security.common.handler", "com.github.wxiaoqi.security.common.handler",
"com.github.wxiaoqi.security.common.log" "com.github.wxiaoqi.security.common.log"
}) })
......
...@@ -21,7 +21,7 @@ public class VehicleUserReserveBiz extends BaseBiz<VehicleUserReserveMapper, Veh ...@@ -21,7 +21,7 @@ public class VehicleUserReserveBiz extends BaseBiz<VehicleUserReserveMapper, Veh
//获取列表 //获取列表
public ObjectRestResponse getList(VehicleUserReserveDTO reserveDTO){ public ObjectRestResponse getList(VehicleUserReserveDTO reserveDTO,Integer userId){
Integer page=1; Integer page=1;
Integer limit=10; Integer limit=10;
if (reserveDTO.getPage()!=null&&reserveDTO.getPage()>0){ if (reserveDTO.getPage()!=null&&reserveDTO.getPage()>0){
...@@ -30,7 +30,7 @@ public class VehicleUserReserveBiz extends BaseBiz<VehicleUserReserveMapper, Veh ...@@ -30,7 +30,7 @@ public class VehicleUserReserveBiz extends BaseBiz<VehicleUserReserveMapper, Veh
if (reserveDTO.getLimit()!=null&&reserveDTO.getLimit()>0){ if (reserveDTO.getLimit()!=null&&reserveDTO.getLimit()>0){
limit=reserveDTO.getLimit(); limit=reserveDTO.getLimit();
} }
return ObjectRestResponse.succ(PageDataVO.pageInfo(page, limit, ()->mapper.getList(reserveDTO))); return ObjectRestResponse.succ(PageDataVO.pageInfo(page, limit, ()->mapper.getList(reserveDTO,userId)));
} }
//新增预定 //新增预定
......
...@@ -5,6 +5,7 @@ package com.xxfc.platform.vehicle.mapper; ...@@ -5,6 +5,7 @@ package com.xxfc.platform.vehicle.mapper;
import com.xxfc.platform.vehicle.entity.VehicleUserReserve; import com.xxfc.platform.vehicle.entity.VehicleUserReserve;
import com.xxfc.platform.vehicle.pojo.dto.VehicleUserReserveDTO; import com.xxfc.platform.vehicle.pojo.dto.VehicleUserReserveDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleUserReserveVo; import com.xxfc.platform.vehicle.pojo.vo.VehicleUserReserveVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.util.List; import java.util.List;
...@@ -13,6 +14,6 @@ import java.util.List; ...@@ -13,6 +14,6 @@ import java.util.List;
public interface VehicleUserReserveMapper extends Mapper<VehicleUserReserve> { public interface VehicleUserReserveMapper extends Mapper<VehicleUserReserve> {
//获取预约列表 //获取预约列表
List<VehicleUserReserveVo> getList(VehicleUserReserveDTO reserveDTO); List<VehicleUserReserveVo> getList(VehicleUserReserveDTO reserveDTO,@Param("userId") Integer userId);
} }
\ No newline at end of file
package com.xxfc.platform.vehicle.rest; package com.xxfc.platform.vehicle.rest;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...@@ -20,8 +21,8 @@ public class VehicleUserReserveController extends BaseController<VehicleUserRese ...@@ -20,8 +21,8 @@ public class VehicleUserReserveController extends BaseController<VehicleUserRese
@ApiOperation("查询预定列表") @ApiOperation("查询预定列表")
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
public ObjectRestResponse getList(VehicleUserReserveDTO reserveDTO){ public ObjectRestResponse getList(VehicleUserReserveDTO reserveDTO, AppUserDTO appUserDTO){
return baseBiz.getList(reserveDTO); return baseBiz.getList(reserveDTO,appUserDTO.getUserid());
} }
@ApiOperation("添加预定信息") @ApiOperation("添加预定信息")
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
LEFT JOIN `branch_company` AS `bct` ON bct.id = r.company_Id LEFT JOIN `branch_company` AS `bct` ON bct.id = r.company_Id
LEFT JOIN `branch_company` AS `bcr` ON bcr.id = r.arrival_companyId LEFT JOIN `branch_company` AS `bcr` ON bcr.id = r.arrival_companyId
<where> <where>
r.is_del=0 r.is_del=0 and r.user_id=#{userId}
</where> </where>
order by r.upd_time desc order by r.upd_time desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment