Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
779fcb8c63
|
|
@ -34,7 +34,6 @@ import com.sqx.modules.course.entity.CourseUser;
|
|||
import com.sqx.modules.course.service.CourseDetailsService;
|
||||
import com.sqx.modules.course.vo.CourseDetailsIn;
|
||||
import com.sqx.modules.course.vo.CourseDetailsSetVo;
|
||||
import com.sqx.modules.course.vo.CourseDetailsVo;
|
||||
import com.sqx.modules.orders.dao.OrdersDao;
|
||||
import com.sqx.modules.orders.service.OrdersService;
|
||||
import com.sqx.modules.redisService.impl.RedisServiceImpl;
|
||||
|
|
@ -53,7 +52,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -196,6 +195,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
if ((!freeWatch)) {
|
||||
detailsId = courseUserDao.selectUserCourseDetailsId(courseId, userId);
|
||||
}
|
||||
AtomicReference<CourseDetailsSetVo> current = new AtomicReference<>(new CourseDetailsSetVo());
|
||||
Set<Long> finalDetailsId = detailsId;
|
||||
int finalStartSort = startSort;
|
||||
int finalEndSort = endSort;
|
||||
|
|
@ -203,6 +203,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
//当前
|
||||
if (courseCollect != null && s.getCourseDetailsId().equals(courseCollect.getCourseDetailsId())) {
|
||||
s.setCurrent(1);
|
||||
current.set(s);
|
||||
}
|
||||
// 不免费 3集以后 (已买的不为空 并不在已买的包含)
|
||||
if (!freeWatch && s.getSort() > 3 && (CollectionUtil.isEmpty(finalDetailsId) || !finalDetailsId.contains(s.getCourseDetailsId()))) {
|
||||
|
|
@ -216,11 +217,13 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
});
|
||||
if (courseCollect == null) {
|
||||
courseDetailsSetVos.get(0).setCurrent(1);
|
||||
current.set(courseDetailsSetVos.get(0));
|
||||
}
|
||||
ThreadUtil.execAsync(() -> {
|
||||
setCourseView(bean);
|
||||
});
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("current", current.get());
|
||||
map.put("title", bean.getTitle());
|
||||
map.put("list", courseDetailsSetVos);
|
||||
return new Result().put("data", map);
|
||||
|
|
|
|||
|
|
@ -134,10 +134,10 @@ public class OrdersController extends AbstractController {
|
|||
//日
|
||||
Double dayMoney = ordersService.selectOrdersMoney(1, 1, 1, dateTime, courseId, sysUserId);
|
||||
Map<String, Double> result = new HashMap<>();
|
||||
result.put("sumMoney", sumMoney);
|
||||
result.put("yearMoney", yearMoney);
|
||||
result.put("monthMoney", monthMoney);
|
||||
result.put("dayMoney", dayMoney);
|
||||
result.put("sumMoney", sumMoney == null ? 0 : sumMoney);
|
||||
result.put("yearMoney", yearMoney == null ? 0 : yearMoney);
|
||||
result.put("monthMoney", monthMoney == null ? 0 : monthMoney);
|
||||
result.put("dayMoney", dayMoney == null ? 0 : dayMoney);
|
||||
return Result.success().put("data", result);
|
||||
}
|
||||
|
||||
|
|
@ -151,12 +151,12 @@ public class OrdersController extends AbstractController {
|
|||
//渠道
|
||||
Double qdMoney = ordersService.selectFenXiaoMoney(3, sysUserId, flag, time);
|
||||
//总分销
|
||||
Double sumMoney = ordersService.selectFenXiaoMoney(4, sysUserId, flag, time);
|
||||
// Double sumMoney = ordersService.selectFenXiaoMoney(4, sysUserId, flag, time);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("oneMoney", oneMoney);
|
||||
result.put("twoMoney", twoMoney);
|
||||
result.put("qdMoney", qdMoney);
|
||||
result.put("sumMoney", sumMoney);
|
||||
result.put("sumMoney", oneMoney + twoMoney + qdMoney);
|
||||
return Result.success().put("data", result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@
|
|||
</select>
|
||||
|
||||
<select id="selectOrdersMoney" resultType="Double">
|
||||
select ifnull(sum(pay_money),0.00) from orders where 1=1
|
||||
select sum(pay_money) from orders
|
||||
where 1=1
|
||||
<if test="sysUserId!=null">
|
||||
and sys_user_id=#{sysUserId}
|
||||
</if>
|
||||
|
|
@ -232,16 +233,13 @@
|
|||
<select id="selectFenXiaoMoney" resultType="Double">
|
||||
select
|
||||
<if test="type==1">
|
||||
ifnull(sum(one_money),0.00)
|
||||
sum(ifnull(one_money,0.00))
|
||||
</if>
|
||||
<if test="type==2">
|
||||
ifnull(sum(two_money),0.00)
|
||||
sum(ifnull(two_money,0.00))
|
||||
</if>
|
||||
<if test="type==3">
|
||||
ifnull(sum(qd_money),0.00)
|
||||
</if>
|
||||
<if test="type==4">
|
||||
ifnull(sum(one_money),0.00)+ifnull(sum(two_money),0.00)+ifnull(sum(qd_money),0.00)
|
||||
sum(ifnull(qd_money,0.00))
|
||||
</if>
|
||||
from orders
|
||||
where status=1
|
||||
|
|
|
|||
Loading…
Reference in New Issue