zoujiajian hace 1 año
padre
commit
981a81c774

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/model/views/UserDistributeOrdersDetailView.java

@@ -36,7 +36,7 @@ public class UserDistributeOrdersDetailView {
 	@DbField("select spec_val from goods_don_sku where id = od.sku_id limit 1")
 	private String specVal;
 
-	@DbField("cast(if(od.is_dp and od.ori_money != 0,od.ori_money,od.money)/100 as decimal(10,2))")
+	@DbField("cast(sum(if(od.id is null,vod.money,if(od.is_dp and od.ori_money != 0,od.ori_money,od.money))/100 as decimal(10,2)))")
 	private BigDecimal money;
 
 	@DbField("od.coupon_money")
@@ -57,6 +57,6 @@ public class UserDistributeOrdersDetailView {
 	@DbField("dp.send_status")
 	private String sendStatus;
 
-	@DbField("od.created_time")
+	@DbField("ifnull(od.created_time,vod.created_time)")
 	private Date createdTime;
 }

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/cps/CpsDistribtueDataController.java

@@ -160,11 +160,11 @@ public class CpsDistribtueDataController {
 		String timeSql = StrUtil.EMPTY;
 		if (firstDate != null) {
 			first = DateUtil.format(DateTime.of(firstDate), "yyyy-MM-dd HH:mm:ss");
-			timeSql += String.format(" and o.created_time >= '%s'", first);
+			timeSql += String.format(" and created_time >= '%s'", first);
 		}
 		if (lastDate != null) {
 			end = DateUtil.format(DateTime.of(lastDate), "yyyy-MM-dd HH:mm:ss");
-			timeSql += String.format(" and o.created_time < '%s'", end);
+			timeSql += String.format(" and created_time < '%s'", end);
 		}
 		MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
 		builder.put("sharedId", String.format("shared_id = %s", cpsUserId));