Helius
2021-06-28 d1f64b7d4b316f58594999257bb9146f68a51355
modify
4 files modified
22 ■■■■ changed files
gc-order/src/main/java/com/xzx/gc/order/controller/ApiJhyOrderController.java 3 ●●●● patch | view | raw | blame | history
gc-order/src/main/java/com/xzx/gc/order/dto/JhyOrderListDto.java 6 ●●●● patch | view | raw | blame | history
gc-order/src/main/java/com/xzx/gc/order/vo/JhyOrderListVo.java 3 ●●●●● patch | view | raw | blame | history
gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml 10 ●●●● patch | view | raw | blame | history
gc-order/src/main/java/com/xzx/gc/order/controller/ApiJhyOrderController.java
@@ -41,7 +41,8 @@
            @ApiResponse(code = 200, message = "success", response = JhyOrderListVo.class)
    )
    @PostMapping(value = "/jhy/order/list")
    public JsonResult<PageInfo<JhyOrderListVo>> orderList(@RequestBody JhyOrderListDto jhyOrderListDto) {
    public JsonResult<PageInfo<JhyOrderListVo>> orderList(@RequestBody JhyOrderListDto jhyOrderListDto, HttpServletRequest request) {
        jhyOrderListDto.setUserId(getUserId(request));
        PageInfo<JhyOrderListVo> result = jhyOrderService.orderList(jhyOrderListDto);
        return JsonResult.success(result);
    }
gc-order/src/main/java/com/xzx/gc/order/dto/JhyOrderListDto.java
@@ -15,8 +15,12 @@
    @ApiModelProperty(value="每页显示记录数")
    private int pageSize=10;
    @ApiModelProperty(value = "状态 1-新任务 2-服务中 3-待入库 4-已完成")
    @ApiModelProperty(value = "状态 用户:1-待接单 2-服务中 3-已完成 5-已取消  集物员:1-新任务 2-服务中 3-待入库 4-已完成")
    private Integer status;
    @ApiModelProperty(value = "1-用户 2-集物员")
    private Integer type;
    @ApiModelProperty(hidden = true)
    private String userId;
}
gc-order/src/main/java/com/xzx/gc/order/vo/JhyOrderListVo.java
@@ -55,4 +55,7 @@
    @ApiModelProperty(value = "损耗重量")
    private int lossWeight;
    @ApiModelProperty(value = "状态")
    private Integer status;
}
gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml
@@ -10,14 +10,20 @@
            ,a.longitude
            ,a.latitude
            ,a.weight
            ,a.status
            ,a.remark
            ,CONCAT(a.reserve_date, ' ', a.reserve_time) reserveTime
            ,GROUP_CONCAT(b.title) items
        from xzx_jhy_order a
        inner join xzx_jhy_order_items b on a.id=b.order_id
        <where>
            <if test="record.status != 1">
                and jhy_id=#{record.userId}
            <if test="record.type == 1">
                and user_id=#{record.userId}
            </if>
            <if test="record.type == 2">
                <if test="record.status != 1">
                    and jhy_id=#{record.userId}
                </if>
            </if>
            <if test="record.status != null and record.status != ''">
                and a.status = #{record.status}