Commit 0a1347c1 authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents 97c240a3 6eb8e941
...@@ -27,6 +27,9 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -27,6 +27,9 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
public List<OrderPageVO> pageByParm(Map<String, Object> paramMap){ public List<OrderPageVO> pageByParm(Map<String, Object> paramMap){
return mapper.pageByParm(paramMap); return mapper.pageByParm(paramMap);
} }
public List<OrderPageVO> listOrder(Map<String, Object> paramMap){
return mapper.listOrder(paramMap);
}
private static Map<Integer, List<Integer>> cancelAble; private static Map<Integer, List<Integer>> cancelAble;
static { static {
cancelAble = new HashMap<Integer, List<Integer>>(); cancelAble = new HashMap<Integer, List<Integer>>();
......
...@@ -16,4 +16,5 @@ import java.util.Map; ...@@ -16,4 +16,5 @@ import java.util.Map;
*/ */
public interface BaseOrderMapper extends Mapper<BaseOrder> { public interface BaseOrderMapper extends Mapper<BaseOrder> {
public List<OrderPageVO> pageByParm(Map<String, Object> paramMap); public List<OrderPageVO> pageByParm(Map<String, Object> paramMap);
public List<OrderPageVO> listOrder(Map<String, Object> paramMap);
} }
...@@ -36,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -36,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -79,6 +78,25 @@ public class BaseOrderController extends CommonBaseController { ...@@ -79,6 +78,25 @@ public class BaseOrderController extends CommonBaseController {
return new ObjectRestResponse<>().data(PageDataVO.pageInfo(query, () -> baseOrderBiz.pageByParm(query.getSuper()))); return new ObjectRestResponse<>().data(PageDataVO.pageInfo(query, () -> baseOrderBiz.pageByParm(query.getSuper())));
} }
@RequestMapping(value = "/list",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单列表")
@IgnoreClientToken
public ObjectRestResponse<PageDataVO<OrderPageVO>> getOrderList(QueryOrderDTO dto){
Query query = new Query(dto);
return new ObjectRestResponse<>().data(PageDataVO.pageInfo(query, () -> baseOrderBiz.selectListAll()));
}
@RequestMapping(value = "/selectByUser",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单列表")
@IgnoreClientToken
public ObjectRestResponse<PageDataVO<OrderPageVO>> selectByUser(QueryOrderList dto){
Query query = new Query(dto);
return new ObjectRestResponse<>().data(PageDataVO.pageInfo(query, () -> baseOrderBiz.listOrder(query.getSuper())));
}
// @RequestMapping(value = "/company/page",method = RequestMethod.GET) // @RequestMapping(value = "/company/page",method = RequestMethod.GET)
// @ResponseBody // @ResponseBody
// @ApiOperation(value = "结合后台人员所属公司查询订单列表") // @ApiOperation(value = "结合后台人员所属公司查询订单列表")
...@@ -264,6 +282,7 @@ public class BaseOrderController extends CommonBaseController { ...@@ -264,6 +282,7 @@ public class BaseOrderController extends CommonBaseController {
"5--出行中(进行中)\n" + "5--出行中(进行中)\n" +
"6--已完成") "6--已完成")
private Integer status; private Integer status;
} }
/** /**
...@@ -274,6 +293,16 @@ public class BaseOrderController extends CommonBaseController { ...@@ -274,6 +293,16 @@ public class BaseOrderController extends CommonBaseController {
private String no; private String no;
} }
@Data
public class QueryOrderList extends QueryOrderDetailDTO {
private Long startTime;
private Long endTime;
private Integer startCompanyId;
}
@Data @Data
public class NotifyUrlDTO{ public class NotifyUrlDTO{
//订单号 //订单号
......
...@@ -4,26 +4,26 @@ ...@@ -4,26 +4,26 @@
<mapper namespace="com.xxfc.platform.order.mapper.BaseOrderMapper"> <mapper namespace="com.xxfc.platform.order.mapper.BaseOrderMapper">
<!-- 可根据自己的需求,是否要使用 --> <!-- 可根据自己的需求,是否要使用 -->
<!-- <resultMap type="com.xxfc.platform.order.entity.BaseOrder" id="baseOrderMap">--> <resultMap type="com.xxfc.platform.order.entity.BaseOrder" id="baseOrderMap">
<!-- <result property="id" column="id"/>--> <result property="id" column="id"/>
<!-- <result property="no" column="no"/>--> <result property="no" column="no"/>
<!-- <result property="type" column="type"/>--> <result property="type" column="type"/>
<!-- <result property="detailId" column="detail_id"/>--> <result property="detailId" column="detail_id"/>
<!-- <result property="status" column="status"/>--> <result property="status" column="status"/>
<!-- <result property="productAmount" column="product_amount"/>--> <result property="productAmount" column="product_amount"/>
<!-- <result property="orderAmount" column="order_amount"/>--> <result property="orderAmount" column="order_amount"/>
<!-- <result property="detailJson" column="detail_json"/>--> <result property="detailJson" column="detail_json"/>
<!-- <result property="thirdType" column="third_type"/>--> <result property="thirdType" column="third_type"/>
<!-- <result property="outTradeNo" column="out_trade_no"/>--> <result property="outTradeNo" column="out_trade_no"/>
<!-- <result property="crtTime" column="crt_time"/>--> <result property="crtTime" column="crt_time"/>
<!-- <result property="crtUser" column="crt_user"/>--> <result property="crtUser" column="crt_user"/>
<!-- <result property="crtName" column="crt_name"/>--> <result property="crtName" column="crt_name"/>
<!-- <result property="crtHost" column="crt_host"/>--> <result property="crtHost" column="crt_host"/>
<!-- <result property="updTime" column="upd_time"/>--> <result property="updTime" column="upd_time"/>
<!-- <result property="updUser" column="upd_user"/>--> <result property="updUser" column="upd_user"/>
<!-- <result property="updName" column="upd_name"/>--> <result property="updName" column="upd_name"/>
<!-- <result property="updHost" column="upd_host"/>--> <result property="updHost" column="upd_host"/>
<!-- </resultMap>--> </resultMap>
<resultMap type="com.xxfc.platform.order.pojo.order.OrderPageVO" id="orderPageMap"> <resultMap type="com.xxfc.platform.order.pojo.order.OrderPageVO" id="orderPageMap">
<result javaType="Integer" column="type" property="type"></result> <result javaType="Integer" column="type" property="type"></result>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
and crt_user = #{crtUser} and crt_user = #{crtUser}
</if> </if>
<if test="crtCompanyId != null"> <if test="crtCompanyId != null">
and crt_user = #{crtCompanyId} and crt_company_id = #{crtCompanyId}
</if> </if>
<if test="status != null"> <if test="status != null">
and status = #{status} and status = #{status}
...@@ -57,4 +57,31 @@ ...@@ -57,4 +57,31 @@
order by crt_time desc order by crt_time desc
</select> </select>
<select id="listOrder" parameterType="Map" resultMap="orderPageMap">
select b.*
from base_order b
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
LEFT JOIN order_tour_detail t on t.order_id = b.id
<where>
<if test="crtUser != null">
and b.crt_user = #{crtUser}
</if>
<if test="status != null">
and b.status = #{status}
</if>
<if test="no != null">
and no like CONCAT ("%", #{no}, "%")
</if>
<if test="startTime != null">
and r.start_time between #{startTime} and #{endTime}
or t.start_time between #{startTime} and #{endTime}
</if>
<if test="startCompanyId != null">
and r.start_company_id = #{startCompanyId}
or t.start_company_id = #{startCompanyId}
</if>
</where>
order by b.crt_time desc
</select>
</mapper> </mapper>
\ No newline at end of file
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