提交代码

dev-discount
胡锐 2 years ago
parent 5a17aebcc9
commit 1aaab689ba
  1. 6
      hai-bweb/src/main/java/com/bweb/controller/HighCouponAgentController.java
  2. 8
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  3. 177
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  4. 1
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  5. 1
      hai-service/src/main/java/com/hai/service/HighGasOrderService.java
  6. 7
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  7. 23
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -492,7 +492,11 @@ public class HighCouponAgentController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("couponInfo", highCouponService.getCouponById(couponAgentCode.getCouponId())); map.put("couponInfo", highCouponService.getCouponById(couponAgentCode.getCouponId()));
map.put("couponCode", highCouponCodeService.getCouponCodeById(couponAgentCode.getCouponCodeId())); if (couponAgentCode.getCouponCodeId() != null) {
map.put("couponCode", highCouponCodeService.getCouponCodeById(couponAgentCode.getCouponCodeId()));
} else {
map.put("couponCode", null);
}
map.put("couponCodeOther", couponCodeOtherService.getDetailByCouponAgentCodeId(couponAgentCode.getId())); map.put("couponCodeOther", couponCodeOtherService.getDetailByCouponAgentCodeId(couponAgentCode.getId()));
map.put("couponAgentCode", couponAgentCode); map.put("couponAgentCode", couponAgentCode);
return ResponseMsgUtil.success(map); return ResponseMsgUtil.success(map);

@ -270,7 +270,8 @@ public class HighGasController {
} }
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highOrderService.getGasOrderList(param))); // return ResponseMsgUtil.success(new PageInfo<>(highOrderService.getGasOrderList(param)));
return ResponseMsgUtil.success(null);
} catch (Exception e) { } catch (Exception e) {
log.error("HighGasController -> getGasOrderList() error!",e); log.error("HighGasController -> getGasOrderList() error!",e);
@ -545,7 +546,7 @@ public class HighGasController {
List<List<Object>> dataList = new ArrayList<>(); List<List<Object>> dataList = new ArrayList<>();
List<Object> data; List<Object> data;
List<GasOrderModel> orderList = highOrderService.getGasOrderList(param); /* List<GasOrderModel> orderList = highOrderService.getGasOrderList(param);
for (GasOrderModel orderModel: orderList) { for (GasOrderModel orderModel: orderList) {
data = new ArrayList<>(); data = new ArrayList<>();
data.add(orderModel.getOrderNo()); data.add(orderModel.getOrderNo());
@ -573,7 +574,8 @@ public class HighGasController {
} }
EasyExcel.write(fileUrl+pathName).head(generationHead(headList)).sheet("加油订单").doWrite(dataList); EasyExcel.write(fileUrl+pathName).head(generationHead(headList)).sheet("加油订单").doWrite(dataList);
return ResponseMsgUtil.success(pathName); return ResponseMsgUtil.success(pathName);*/
return ResponseMsgUtil.success(null);
} catch (Exception e) { } catch (Exception e) {
log.error("HighGasController -> getGasOrderList() error!",e); log.error("HighGasController -> getGasOrderList() error!",e);

@ -1,5 +1,4 @@
package com.hai.dao; package com.hai.dao;
import com.hai.entity.HighOrder; import com.hai.entity.HighOrder;
import com.hai.model.*; import com.hai.model.*;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -142,7 +141,6 @@ public interface HighOrderMapperExt {
" (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," + " (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," +
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' when 3 then '加油缴费' end goodsType, " + " case a.goods_type when 1 then '卡券' when 2 then '金币充值' when 3 then '加油缴费' end goodsType, " +
" a.goods_name goodsName, " + " a.goods_name goodsName, " +
" b.id orderId, " +
" a.goods_type goodsTypeId," + " a.goods_type goodsTypeId," +
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," + " case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," +
" b.order_no orderNo," + " b.order_no orderNo," +
@ -176,7 +174,7 @@ public interface HighOrderMapperExt {
" <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " + " <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " +
" <if test='map.memDiscountName != null'> and c.coupon_name = #{map.memDiscountName} </if>", " <if test='map.memDiscountName != null'> and c.coupon_name = #{map.memDiscountName} </if>",
" <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" + " <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" +
" <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>", " <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>",
" <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>", " <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>",
" <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>", " <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>",
" <if test='map.payType != null'> and b.pay_type = #{map.payType} </if>", " <if test='map.payType != null'> and b.pay_type = #{map.payType} </if>",
@ -187,62 +185,10 @@ public interface HighOrderMapperExt {
" <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>", " <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>",
" <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>", " <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>",
" GROUP BY a.id" + " GROUP BY a.id" +
" ORDER BY b.create_time desc" + " ORDER BY b.create_time desc" +
"</script>"}) "</script>"})
List<HighOrderModel> selectGoodsOrderList(@Param("map") Map<String,Object> map); List<HighOrderModel> selectGoodsOrderList(@Param("map") Map<String,Object> map);
@Select({"<script>" +
" SELECT" +
" (select st.store_name from high_merchant_store st where st.id = a.goods_id) merchantName," +
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' when 3 then '加油缴费' end goodsType," +
" b.id orderId, " +
" a.goods_name goodsName, " +
" a.goods_type goodsTypeId," +
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," +
" b.order_no orderNo," +
" b.mem_name memName," +
" b.mem_phone memPhone," +
" case b.pay_model when 1 then '金币' when 2 then '第三方' end payModel, " +
" case b.pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' when 4 then '工会卡' when 5 then '银联' end payType," +
" b.pay_serial_no paySerialNo," +
" case a.giveaway_type when 0 then b.total_price when 1 then 0 end totalPrice," +
" b.mem_discount_name memDiscountName," +
" b.deduction_price deductionPrice," +
" case a.giveaway_type when 0 then case when b.pay_gold is null then 0 else pay_gold end when 1 then 0 end payGold," +
" case a.giveaway_type when 0 then b.pay_price when 1 then 0 end payPrice," +
" case a.giveaway_type when 0 then case when b.pay_gold is not null then convert(b.pay_gold / 100,decimal(10,2)) else b.pay_real_price end when 1 then 0 end payRealPrice," +
" case b.order_status when 1 then '待支付' when 2 then '已支付' when 3 then '已完成' when 4 then '已退款' when 5 then '已取消' when 6 then '退款中' when 7 then '退款失败' end orderStatus, " +
" b.order_status orderStatusId," +
" b.create_time createTime," +
" b.pay_time payTime," +
" b.cancel_time cancelTime," +
" b.refund_time refundTime," +
" b.refund_content refundContent," +
" b.refusal_refund_content refusalRefundContent" +
" FROM" +
" high_child_order a," +
" high_order b" +
" WHERE" +
" a.order_id = b.id" +
" and a.goods_type = 3" +
" and a.giveaway_type = 0" +
" and EXISTS (select 1 from high_merchant_store c where c.id = a.goods_id " +
" <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " +
" <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" +
" <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>",
" <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>",
" <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>",
" <if test='map.payType != null'> and b.pay_type = #{map.payType} </if>",
" <if test='map.orderStatus != null'> and b.order_status in (#{map.orderStatus}) </if>",
" <if test='map.createTimeS != null'> <![CDATA[ and b.create_time >= #{map.createTimeS} ]]> </if>",
" <if test='map.createTimeE != null'> <![CDATA[ and b.create_time <= #{map.createTimeE} ]]> </if>",
" <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>",
" <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>",
" GROUP BY a.id ORDER BY b.create_time desc" +
"</script>"})
List<HighOrderModel> selectGasOrderList(@Param("map") Map<String,Object> map);
@Select({"<script>" + @Select({"<script>" +
" SELECT" + " SELECT" +
" (select st.store_name from high_merchant_store st where st.id = a.goods_id) merchantName," + " (select st.store_name from high_merchant_store st where st.id = a.goods_id) merchantName," +
@ -346,7 +292,7 @@ public interface HighOrderMapperExt {
" <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>", " <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>",
" <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>", " <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>",
" GROUP BY a.id ORDER BY b.create_time desc" + " GROUP BY a.id ORDER BY b.create_time desc" +
"</script>"}) "</script>"})
List<HighOrderModel> selectCinemaOrderList(@Param("map") Map<String,Object> map); List<HighOrderModel> selectCinemaOrderList(@Param("map") Map<String,Object> map);
@Select({"<script>" + @Select({"<script>" +
@ -397,10 +343,10 @@ public interface HighOrderMapperExt {
" <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>", " <if test='map.payTimeS != null'> <![CDATA[ and b.pay_time >= #{map.payTimeS} ]]> </if>",
" <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>", " <if test='map.payTimeE != null'> <![CDATA[ and b.pay_time <= #{map.payTimeE} ]]> </if>",
" GROUP BY a.id ORDER BY b.create_time desc" + " GROUP BY a.id ORDER BY b.create_time desc" +
"</script>"}) "</script>"})
List<HighOrderModel> getMobileOrderList(@Param("map") Map<String,Object> map); List<HighOrderModel> getMobileOrderList(@Param("map") Map<String,Object> map);
@Select({"<script>" + @Select({"<script>" +
" SELECT" + " SELECT" +
" (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," + " (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," +
@ -658,7 +604,7 @@ public interface HighOrderMapperExt {
" <if test='map.companyId != null'> and op.company_id = #{map.companyId} </if> " + " <if test='map.companyId != null'> and op.company_id = #{map.companyId} </if> " +
" <if test='map.merchantStoreId != null'> and op.merchant_store_id = #{map.merchantStoreId} </if>", " <if test='map.merchantStoreId != null'> and op.merchant_store_id = #{map.merchantStoreId} </if>",
" <if test='map.merchantId != null'> and op.merchant_id = #{map.merchantId} </if> " + " <if test='map.merchantId != null'> and op.merchant_id = #{map.merchantId} </if> " +
" <if test='map.orderNo != null'> and op.order_no = #{map.orderNo}</if>", " <if test='map.orderNo != null'> and op.order_no = #{map.orderNo}</if>",
" <if test='map.preOrderNo != null'> and op.pre_order_no = #{map.preOrderNo} </if>", " <if test='map.preOrderNo != null'> and op.pre_order_no = #{map.preOrderNo} </if>",
" <if test='map.pre_user_name != null'> and op.pre_user_name = #{map.pre_user_name} </if>", " <if test='map.pre_user_name != null'> and op.pre_user_name = #{map.pre_user_name} </if>",
" <if test='map.pre_user_phone != null'> and op.preUserName = #{map.pre_user_phone} </if>", " <if test='map.pre_user_phone != null'> and op.preUserName = #{map.pre_user_phone} </if>",
@ -666,7 +612,7 @@ public interface HighOrderMapperExt {
" <if test='map.status != null'> and op.status = #{map.status} </if>", " <if test='map.status != null'> and op.status = #{map.status} </if>",
" <if test='map.createTimeS != null'> <![CDATA[ and op.create_time >= #{map.createTimeS} ]]> </if>", " <if test='map.createTimeS != null'> <![CDATA[ and op.create_time >= #{map.createTimeS} ]]> </if>",
" <if test='map.createTimeE != null'> <![CDATA[ and op.create_time <= #{map.createTimeE} ]]> </if>", " <if test='map.createTimeE != null'> <![CDATA[ and op.create_time <= #{map.createTimeE} ]]> </if>",
" ORDER BY op.create_time desc" + " ORDER BY op.create_time desc" +
"</script>"}) "</script>"})
List<HighOrderPreModel> ExportPreOrderList(@Param("map") Map<String,Object> map); List<HighOrderPreModel> ExportPreOrderList(@Param("map") Map<String,Object> map);
@ -708,7 +654,7 @@ public interface HighOrderMapperExt {
" <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " + " <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " +
" <if test='map.memDiscountName != null'> and c.coupon_name = #{map.memDiscountName} </if>", " <if test='map.memDiscountName != null'> and c.coupon_name = #{map.memDiscountName} </if>",
" <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" + " <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" +
" <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>", " <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>",
" <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>", " <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>",
" <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>", " <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>",
" <if test='map.payType != null'> and b.pay_type = #{map.payType} </if>", " <if test='map.payType != null'> and b.pay_type = #{map.payType} </if>",
@ -1010,9 +956,9 @@ public interface HighOrderMapperExt {
"<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " , "<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " ,
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " + "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " +
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " + "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " +
"<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " + "<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " +
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " ,
"<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " , "<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " ,
"<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " , "<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " ,
") as hh; " , ") as hh; " ,
@ -1036,9 +982,9 @@ public interface HighOrderMapperExt {
"<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " , "<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " ,
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " + "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " +
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " + "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " +
"<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " + "<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " +
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " ,
"<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " , "<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " ,
"<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " , "<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " ,
") as hh; " , ") as hh; " ,
@ -1061,7 +1007,7 @@ public interface HighOrderMapperExt {
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " , "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " ,
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " , "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " ,
"<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " + "<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " +
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " ,
"<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " , "<if test='map.orgId != null'> and hco.gas_org_id = #{map.orgId} </if> " ,
"<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " , "<if test='map.agentId != null'> and hco.gas_agent_id = #{map.agentId} </if> " ,
") as hh; " , ") as hh; " ,
@ -1073,12 +1019,12 @@ public interface HighOrderMapperExt {
@Select(value = { @Select(value = {
"<script>", "<script>",
"select count(*) as value , " + "select count(*) as value , " +
"case pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' when 4 then '工会卡' when 5 then '银联' end name " + "case pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' when 4 then '工会卡' when 5 then '银联' end name " +
"from high_order ho join high_child_order hco on ho.id = hco.order_id ", "from high_order ho join high_child_order hco on ho.id = hco.order_id ",
"where hco.goods_type = 3 and ho.order_status in (2, 3) ", "where hco.goods_type = 3 and ho.order_status in (2, 3) ",
"<if test='map.payType != null'> and ho.pay_type = #{map.payType} </if> " , "<if test='map.payType != null'> and ho.pay_type = #{map.payType} </if> " ,
"<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " + "<if test='map.companyId != null'> AND hco.gas_org_id in (select id from bs_organization WHERE company_id = #{map.companyId} and `status` = 1) </if> " +
"<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " , "<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " ,
"<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " , "<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " ,
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id = #{map.gasSalesmanId} </if> " ,
@ -1120,100 +1066,43 @@ public interface HighOrderMapperExt {
@Select({" select" + @Select({" select" +
" case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + " case when SUM(gas_refuel_price) is null then 0 else SUM(gas_refuel_price) end price," +
" count(1) count" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order where store_id = #{storeId} and status in (${status}) " +
" where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) " +
" and to_days(pay_time) = to_days(now())"}) " and to_days(pay_time) = to_days(now())"})
Map<String, Object> selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status); Map<String, Object> selectGasTheDayOrderCount(@Param("storeId") Long storeId, @Param("status") String status);
@Select({" select" + @Select({" select" +
" case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," +
" count(1) count" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) " +
" where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) " +
" and to_days(pay_time) = to_days(now())"}) " and to_days(pay_time) = to_days(now())"})
Map<String, Object> selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); Map<String, Object> selectGasStaffTheDayOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status);
@Select({" select" + @Select({" select" +
" case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + " case when SUM(a.gas_refuel_price) is null then 0 else SUM(a.gas_refuel_price) end price," +
" count(1) count" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where store_id = #{storeId} and a.status in (${status}) "})
" where a.order_id = b.id and goods_type = 3 and goods_id = #{storeId} and b.order_status in (${status}) "})
Map<String, Object> selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status); Map<String, Object> selectGasHistoryOrderCount(@Param("storeId") Long storeId, @Param("status") String status);
@Select({" select" + @Select({" select" +
" case when SUM(b.total_price) is null then 0 else SUM(b.total_price) end price," + " case when SUM(a.total_price) is null then 0 else SUM(a.total_price) end price," +
" count(1) count" + " count(1) count" +
" from high_child_order a,high_order b " + " from high_gas_order a where a.gas_staff_id = #{gasStaffId} and a.status in (${status}) "})
" where a.order_id = b.id and goods_type = 3 and gas_staff_id = #{gasStaffId} and b.order_status in (${status}) "})
Map<String, Object> selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status); Map<String, Object> selectGasStaffHistoryOrderCount(@Param("gasStaffId") Long gasStaffId, @Param("status") String status);
@Select({
"<script> " +
" select " +
" b.id orderId," +
" b.order_no orderNo," +
" a.gas_order_no gasOrderNo," +
" b.mem_discount_name memDiscountName," +
" b.pay_type payType," +
" b.total_price totalPrice," +
" b.deduction_price deductionPrice," +
" b.payable_price payablePrice," +
" b.pay_gold payGold," +
" b.pay_real_price payRealPrice," +
" b.order_status status," +
" REPLACE(b.mem_phone, SUBSTR(b.mem_phone,4,4), '****') merPhone," +
" a.goods_name gasName," +
" (select address from high_merchant_store where id = a.goods_id) gasAddress," +
" a.goods_img gasLogo," +
" a.gas_oil_type gasOilType," +
" a.gas_oil_no gasOilNo," +
" a.gas_gun_no gasGunNo," +
" a.gas_staff_name gasStaffName," +
" a.gas_price_gun gasPriceGun," +
" a.gas_oil_liters gasOilLiters," +
" a.gas_discount gasDiscount," +
" a.gas_oil_subsidy gasOilSubsidy," +
" a.gas_liters_preferences gasLitersPreferences," +
" a.gas_price_preferences gasPricePreferences," +
" b.create_time createTime," +
" b.pay_time payTime," +
" b.refund_time refundTime," +
" b.refund_price refundPrice," +
" b.refund_content refundContent," +
" b.print_status printStatus," +
" b.print_num printNum" +
" from high_child_order a,high_order b " +
" where a.order_id = b.id " +
" and goods_type = 3 " +
"<if test='param.storeId != null'> and goods_id in (${param.storeId}) </if>" +
"<if test='param.gasStaffId != null'> and a.gas_staff_id = #{param.gasStaffId}</if>" +
"<if test='param.gasOilNo != null'> and a.gas_oil_no = #{param.gasOilNo}</if>" +
"<if test='param.status != null'> and b.order_status in (${param.status})</if>" +
"<if test='param.createTimeS != null'> <![CDATA[ and b.create_time >= #{param.createTimeS} ]]> </if>",
"<if test='param.createTimeE != null'> <![CDATA[ and b.create_time <= #{param.createTimeE} ]]> </if>",
"<if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>",
"<if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>",
"<if test='param.orderNo != null'> and b.order_no LIKE concat('%', #{param.orderNo}, '%')</if>" +
" ORDER BY create_time desc" +
"</script>"
})
List<GasOrderModel> selectGasStoreOrderList(@Param("param") Map<String, Object> param);
@Select({ @Select({
"<script> " + "<script> " +
" select" + " select" +
" case when sum(b.total_price) is not null then sum(b.total_price) else 0 end refuelPrice," + " case when sum(b.gas_refuel_price) is not null then sum(b.gas_refuel_price) else 0 end refuelPrice," +
" count(1) refuelNum," + " count(1) refuelNum," +
" case when sum(a.gas_oil_liters) is not null then sum(a.gas_oil_liters) else 0 end refuelLiters" + " case when sum(a.gas_oil_liters) is not null then sum(a.gas_oil_liters) else 0 end refuelLiters" +
" from high_child_order a,high_order b " + " from high_gas_order a" +
" where a.order_id = b.id " + " where " +
" and goods_type = 3 " +
" <if test='param.storeId != null'> and goods_id in (${param.storeId}) </if>" + " <if test='param.storeId != null'> and goods_id in (${param.storeId}) </if>" +
" <if test='param.gasStaffId != null'> and a.gas_staff_id = #{param.gasStaffId}</if>" + " <if test='param.gasStaffId != null'> and a.gas_staff_id = #{param.gasStaffId}</if>" +
" <if test='param.gasOilNo != null'> and a.gas_oil_no = #{param.gasOilNo}</if>" + " <if test='param.gasOilNo != null'> and a.gas_oil_no = #{param.gasOilNo}</if>" +
" <if test='param.status != null'> and b.order_status in (${param.status})</if>" + " <if test='param.status != null'> and b.order_status in (${param.status} )</if>" +
" <if test='param.createTimeS != null'> <![CDATA[ and b.create_time >= #{param.createTimeS} ]]> </if>", " <if test='param.createTimeS != null'> <![CDATA[ and b.create_time >= #{param.createTimeS} ]]> </if>",
" <if test='param.createTimeE != null'> <![CDATA[ and b.create_time <= #{param.createTimeE} ]]> </if>", " <if test='param.createTimeE != null'> <![CDATA[ and b.create_time <= #{param.createTimeE} ]]> </if>",
" <if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>", " <if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>",
@ -1286,6 +1175,7 @@ public interface HighOrderMapperExt {
}) })
List<HighOrder> integralRebateOrder(); List<HighOrder> integralRebateOrder();
@Select({"<script>" + @Select({"<script>" +
"SELECT" + "SELECT" +
" ho.id as orderId ," + " ho.id as orderId ," +
@ -1313,5 +1203,4 @@ public interface HighOrderMapperExt {
"</script>" "</script>"
}) })
List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map); List<ApiThirdOrderModel> getApiThirdOrderByList(@Param("map") Map<String,Object> map);
} }

@ -428,7 +428,6 @@ public class OrderServiceImpl implements OrderService {
HighOrder orderData = insertOrderData(order); HighOrder orderData = insertOrderData(order);
if (orderData.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) { if (orderData.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
// 10分钟内未支付,自动取消订单 // 10分钟内未支付,自动取消订单
Message<HighOrder> rocketMsg = MessageBuilder.withPayload(order).build(); Message<HighOrder> rocketMsg = MessageBuilder.withPayload(order).build();

@ -46,4 +46,5 @@ public interface HighGasOrderService {
*/ */
List<HighGasOrder> getGasOrderList(Map<String, Object> param); List<HighGasOrder> getGasOrderList(Map<String, Object> param);
} }

@ -474,13 +474,6 @@ public interface HighOrderService {
*/ */
Map<String, Object> getGasStaffHistoryOrderCount(Long gasStaffId, String status); Map<String, Object> getGasStaffHistoryOrderCount(Long gasStaffId, String status);
/**
* 查询加油站订单列表
* @param param
* @return
*/
List<GasOrderModel> getGasOrderList(Map<String, Object> param) throws Exception;
/** /**
* 统计加油站订单 * 统计加油站订单
* @param param * @param param

@ -2155,7 +2155,7 @@ public class HighOrderServiceImpl implements HighOrderService {
map.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(map, "payTimeE")), "yyyy-MM-dd HH:mm:ss")); map.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(map, "payTimeE")), "yyyy-MM-dd HH:mm:ss"));
} }
return highOrderMapper.selectGasOrderList(map); return null;//highOrderMapper.selectGasOrderList(map);
} }
@Override @Override
@ -2572,23 +2572,6 @@ public class HighOrderServiceImpl implements HighOrderService {
return highOrderMapperExt.selectGasStaffHistoryOrderCount(gasStaffId,status); return highOrderMapperExt.selectGasStaffHistoryOrderCount(gasStaffId,status);
} }
@Override
public List<GasOrderModel> getGasOrderList(Map<String, Object> param) throws Exception {
if (MapUtils.getLong(param, "createTimeS") != null) {
param.put("createTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "createTimeS")), "yyyy-MM-dd HH:mm:ss"));
}
if (MapUtils.getLong(param, "createTimeE") != null) {
param.put("createTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "createTimeE")), "yyyy-MM-dd HH:mm:ss"));
}
if (MapUtils.getLong(param, "payTimeS") != null) {
param.put("payTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeS")), "yyyy-MM-dd HH:mm:ss"));
}
if (MapUtils.getLong(param, "payTimeE") != null) {
param.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeE")), "yyyy-MM-dd HH:mm:ss"));
}
return highOrderMapperExt.selectGasStoreOrderList(param);
}
@Override @Override
public Map<String, Object> countGasOrder(Map<String, Object> param) throws Exception { public Map<String, Object> countGasOrder(Map<String, Object> param) throws Exception {
if (MapUtils.getLong(param, "createTimeS") != null) { if (MapUtils.getLong(param, "createTimeS") != null) {
@ -2610,10 +2593,10 @@ public class HighOrderServiceImpl implements HighOrderService {
public GasOrderModel getGasOrderDetail(String orderNo) { public GasOrderModel getGasOrderDetail(String orderNo) {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("orderNo", orderNo); param.put("orderNo", orderNo);
List<GasOrderModel> list = highOrderMapperExt.selectGasStoreOrderList(param); /*List<GasOrderModel> list = highOrderMapperExt.selectGasOrderList(param);
if (list.size() > 0) { if (list.size() > 0) {
return list.get(0); return list.get(0);
} }*/
return null; return null;
} }

Loading…
Cancel
Save