zoujiajian 10 månader sedan
förälder
incheckning
353710bce5

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/views/DistributeOrderStatisticsDataView.java

@@ -17,4 +17,9 @@ public class DistributeOrderStatisticsDataView {
 	private Long userId;
 
 	private String nickname;
+
+	/**
+	 * true 普通渠道
+	 */
+	private Boolean isGeneral;
 }

+ 2 - 1
netflix-dao/src/main/resources/mapper/OrderDonMapper.xml

@@ -539,6 +539,7 @@
     <select id="getDistributeOrderView"
             resultType="com.cyksj.model.views.DistributeOrderStatisticsDataView">
         select us.shared_id as user_id,
+        o.goods_id,
         (select nickname from `user` where id = us.shared_id limit 1) as nickname,
         sum(money)/100 as money
         from user_distribute_shared us
@@ -548,7 +549,7 @@
         inner join order_don o on o.user_Id = us.user_id
         where o.`status` not in ('close','noPayment','refund')
         and o.created_time BETWEEN #{start} and #{end}
-        and o.goods_id = 1 and o.is_fixed_distribute
+        and o.goods_id = #{goodsId} and o.is_fixed_distribute
         <if test="isGeneral != null">
             <if test="isGeneral">
                 and ud.id is null

+ 1 - 9
netflix-web/src/main/java/com/cyksj/web/controller/manage/statistics/StatisticsDataController.java

@@ -675,15 +675,7 @@ public class StatisticsDataController {
 	 * @return
 	 */
 	@GetMapping("/get/distributeOrder/brokenLine")
-	public Result<DistributeOrderStatisticsView> getDistributeOrderView(Long goodsId, Long firstDate, Long lastDate, Boolean isGeneral) {
-		String first = null;
-		String end = null;
-		if (firstDate != null) {
-			first = DateUtil.format(DateTime.of(firstDate), "yyyy-MM-dd");
-		}
-		if (lastDate != null) {
-			end = DateUtil.format(DateTime.of(lastDate), "yyyy-MM-dd");
-		}
+	public Result<DistributeOrderStatisticsView> getDistributeOrderView(Long goodsId, String first, String end, Boolean isGeneral) {
 		DistributeOrderStatisticsView distributeOrderStatisticsView = new DistributeOrderStatisticsView();
 		List<DistributeOrderStatisticsDataView> dataList = orderDonMapper.getDistributeOrderView(goodsId, first, end, isGeneral);
 		distributeOrderStatisticsView.setDataList(dataList);