提交 2d69443d authored 作者: 吴德鹏's avatar 吴德鹏

优化订单管理

上级 ced42832
......@@ -248,7 +248,7 @@ public class TbCfOrderController extends AbstractController {
OrderBasicVo orderBasicVo = tbCfOrderListService.queryorderBasic(orderId);
orderBasicVo.setAtcTime("35天(day)");
// orderBasicVo.setCountry("赞比亚(Zambia)");
if (orderBasicVo.getOrderSource()!=null)
if (orderBasicVo.getOrderSource() != null)
orderBasicVo.setSource(orderBasicVo.getOrderSource().toString());
orderBasicVo.setDeliveryOrderList(tbCfOrderListService.queryOrderDeliveryList(orderId));
......@@ -353,14 +353,19 @@ public class TbCfOrderController extends AbstractController {
@GetMapping("/getHotCommodity")
@ResponseBody
public R getHotCommodity(@RequestParam Map<String, Object> params) {
Query query=new Query(params);
Query query = new Query(params);
List<SearchKeywords> itemList = tbCfOrderService.getHotCommodity(query);
int total = tbCfOrderService.queryCommodityTotal();
PageUtils pageUtil = new PageUtils(itemList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
@PutMapping("/setToTestOrder/{orderId}")
@ResponseBody
public R setToTestOrder(@PathVariable("orderId") String orderId) {
tbCfOrderListService.setToTestOrder(orderId);
return R.ok();
}
//==========================================================================================================
......
......@@ -17,6 +17,7 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
/**
* 查看订单列表(运营简表)
*
* @param map
* @return
*/
......@@ -29,6 +30,7 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
int queryOrderDeliveryTotal(String orderId);
List<DeliveryOrderVo> queryOrderDeliveryList(String orderId);
List<DeliveryOrderVo> queryOrderDeliveryWebList(String orderId);
OrderBasicVo queryorderBasic(String orderId);
......@@ -40,4 +42,6 @@ public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
OrderBasicVo getMemoOrder(String orderId);
int saveOrUpdatemMemoOrder(OrderBasicVo memoOrderVo);
int setToTestOrder(String orderId);
}
......@@ -59,4 +59,6 @@ public interface TbCfOrderListService {
List<StatisticalVo> getOrderPaidByDate(String start, String end,String flag);
Long getOrderNum(String status);
int setToTestOrder(String orderId);
}
......@@ -132,4 +132,6 @@ public interface TbCfOrderService {
int queryCommodityTotal();
}
......@@ -140,4 +140,9 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
return tbCfOrderDao.getOrderNum(status);
}
@Override
public int setToTestOrder(String orderId) {
return tbCfOrderListDao.setToTestOrder(orderId);
}
}
......@@ -258,4 +258,5 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
return tbCfOrderDao.queryTotal1() + tbCfOrderDao.queryTotal2();
}
}
......@@ -35,6 +35,7 @@
<result property="payStatus" column="pay_status"/>
<result property="enableFlag" column="enable_flag"/>
<result property="descripitionName" column="descripition_name"/>
<result property="tested" column="tested"/>
</resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfOrderEntity">
......@@ -308,6 +309,7 @@
AND i.order_status=#{orderStatus}
</if>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
......@@ -512,9 +514,9 @@
from tb_cf_item_order_r t1 left join tb_cf_item_detail t2 on t2.item_id=t1.item_id where t1.order_id =#{orderId} and t1.enable_flag=1
</select>
<select id="getOrderCount" resultType="int">
select count(1) from tb_cf_item_order_r where order_id=#{orderId}
<if test="flag!=null">
and delivery_flag=#{flag}
select count(1) from tb_cf_item_order_r where order_id=#{orderId}
<if test="flag!=null">
and delivery_flag=#{flag}
</if>
</select>
......
......@@ -51,6 +51,14 @@
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<choose>
<when test="tested != null and tested.trim() != ''">
AND o.tested=#{tested}
</when>
<otherwise>
AND o.tested is null
</otherwise>
</choose>
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
......@@ -60,11 +68,14 @@
<if test="orderStatus != null and orderStatus.trim() != ''">
AND o.order_status LIKE concat('%',#{orderStatus},'%')
</if>
<if test="start != null and start.trim() != '' ">
AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')
</if>
<if test="end != null and end.trim() != '' ">
AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')
<!-- <if test="start != null and start.trim() != '' ">-->
<!-- AND o.order_time <![CDATA[>=]]> CONCAT('', #{start},' 00:00:00')-->
<!-- </if>-->
<!-- <if test="end != null and end.trim() != '' ">-->
<!-- AND o.order_time <![CDATA[<=]]> CONCAT('', #{end},' 23:59:59')-->
<!-- </if>-->
<if test="start != null and start.trim() != '' and end != null and end.trim() != ''">
AND o.order_time between #{start} and #{end}
</if>
<if test="payWayCode != null and payWayCode.trim() != ''">
AND f.pay_way_code =#{payWayCode}
......@@ -96,6 +107,14 @@
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
WHERE 1=1 and o.enable_flag=1
<choose>
<when test="tested != null and tested.trim() != ''">
AND o.tested=#{tested}
</when>
<otherwise>
AND o.tested is null
</otherwise>
</choose>
<if test="name != null and name.trim() != ''">
AND o.order_no LIKE concat('%',#{name},'%')
</if>
......@@ -227,6 +246,9 @@
update tb_cf_order set order_status=60 where order_id=#{orderId}
</update>
<update id="setToTestOrder">
update tb_cf_order set tested='T' where order_id=#{orderId}
</update>
<select id="getMemoOrder" resultType="com.platform.vo.OrderBasicVo">
select
order_id,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论