提交修改

dev-discount
袁野 3 years ago
parent e97ae4783a
commit 29ff257088
  1. 8
      hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
  2. 13
      hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrderCount.java
  3. 15
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
  4. 10
      hai-service/src/main/java/com/hai/model/OutOrderModel.java
  5. 9
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

@ -314,6 +314,7 @@ public class OutRechargeOrderController {
public ResponseData getOrderCountList(
@RequestParam(name = "finishTimeS", required = false) Long finishTimeS,
@RequestParam(name = "finishTimeE", required = false) Long finishTimeE,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) {
@ -328,6 +329,9 @@ public class OutRechargeOrderController {
if (finishTimeE != null){
map.put("finishTimeE", finishTimeE.toString());
}
if (status != null){
map.put("status", status.toString());
}
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(outRechargeOrderService.getListOrderCount(map)));
@ -342,6 +346,7 @@ public class OutRechargeOrderController {
@ResponseBody
@ApiOperation(value = "导出订单")
public ResponseData exportOrderListCount(@RequestParam(name = "finishTimeS", required = false) Long finishTimeS,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "finishTimeE", required = false) Long finishTimeE) {
try {
@ -354,6 +359,9 @@ public class OutRechargeOrderController {
if (finishTimeE != null){
map.put("finishTimeE", finishTimeE.toString());
}
if (status != null){
map.put("status", status.toString());
}
List<OutOrderModel> list = outRechargeOrderService.getListOrderCount(map);

@ -1,6 +1,7 @@
package com.bweb.model;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.models.auth.In;
import java.math.BigDecimal;
import java.util.Date;
@ -10,6 +11,9 @@ public class ExportOutRechargeOrderCount {
@ExcelProperty("时间")
private Date day;
@ExcelProperty("状态")
private Integer status;
@ExcelProperty("数量")
private Long count;
@ -19,6 +23,15 @@ public class ExportOutRechargeOrderCount {
@ExcelProperty("充值金额")
private BigDecimal orderPrice;
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getDay() {
return day;
}

@ -21,13 +21,15 @@ public interface OutRechargeOrderMapperExt {
@Select(value = {
"<script>",
"SELECT DATE_FORMAT(finish_time, '%Y-%m-%d') as day,",
"SELECT DATE_FORMAT(create_timed, '%Y-%m-%d') as day,",
"count(1) as count,",
"sum(pay_price) as pay_price,",
"sum(order_price) as order_price",
"sum(order_price) as order_price,",
"`status`",
"from out_recharge_order",
"where status = 3",
" and finish_time between #{finishTimeS} and #{finishTimeE} " ,
"where ",
" create_timed between #{finishTimeS} and #{finishTimeE} " ,
"<if test='status != null'> and status = #{status} </if>",
"GROUP BY day",
"</script>"
})
@ -36,8 +38,9 @@ public interface OutRechargeOrderMapperExt {
@Result(column="day", property="day", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
})
List<OutOrderModel> getListOrderCount(String finishTimeS , String finishTimeE);
List<OutOrderModel> getListOrderCount(String finishTimeS , String finishTimeE , Integer status);
@Select(value = {
"<script>",
@ -95,4 +98,4 @@ public interface OutRechargeOrderMapperExt {
"</script>"
})
List<OutRechargeOrderModel> selectOrderCount(@Param("map") Map<String,Object> map);
}
}

@ -18,6 +18,16 @@ public class OutOrderModel {
*/
private BigDecimal orderPrice;
private Integer status;
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getDay() {
return day;
}

@ -8,6 +8,7 @@ import com.hai.model.OutOrderModel;
import com.hai.model.OutRechargeOrderModel;
import com.hai.model.OutUserOrderModel;
import com.hai.service.OutRechargeOrderService;
import io.swagger.models.auth.In;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@ -157,6 +158,12 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
public List<OutOrderModel> getListOrderCount(Map<String, String> map) throws Exception {
String finishTimeS = map.get("finishTimeS");
String finishTimeE = map.get("finishTimeE");
Integer status;
if (StringUtils.isNotBlank(map.get("status"))) {
status = Integer.valueOf(map.get("status"));
} else {
status = null;
}
String fTimeS;
String fTimeE;
if (StringUtils.isNotBlank(finishTimeS)) {
@ -186,7 +193,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
} else {
fTimeE = DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss");
}
return outRechargeOrderMapperExt.getListOrderCount(fTimeS , fTimeE);
return outRechargeOrderMapperExt.getListOrderCount(fTimeS , fTimeE , status);
}
@Override

Loading…
Cancel
Save