提交修改

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

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

@ -21,13 +21,15 @@ public interface OutRechargeOrderMapperExt {
@Select(value = { @Select(value = {
"<script>", "<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,", "count(1) as count,",
"sum(pay_price) as pay_price,", "sum(pay_price) as pay_price,",
"sum(order_price) as order_price", "sum(order_price) as order_price,",
"`status`",
"from out_recharge_order", "from out_recharge_order",
"where status = 3", "where ",
" and finish_time between #{finishTimeS} and #{finishTimeE} " , " create_timed between #{finishTimeS} and #{finishTimeE} " ,
"<if test='status != null'> and status = #{status} </if>",
"GROUP BY day", "GROUP BY day",
"</script>" "</script>"
}) })
@ -36,8 +38,9 @@ public interface OutRechargeOrderMapperExt {
@Result(column="day", property="day", jdbcType=JdbcType.TIMESTAMP), @Result(column="day", property="day", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_price", property="orderPrice", 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 = { @Select(value = {
"<script>", "<script>",

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

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

Loading…
Cancel
Save