Merge remote-tracking branch 'origin/master'

This commit is contained in:
zjf committed 2025-05-13 21:50:51 +08:00
commit 2bceda2499
3 files changed
+13 -3

No files matched your search

@@ -4,6 +4,7 @@ import com.bsd.pjcloud.hard.api.entity.order.HardCarEntity;
import lombok.Data;
import java.time.LocalDate;
import java.util.List;
@Data
public class HardCarDto extends HardCarEntity {
@@ -14,6 +15,8 @@ public class HardCarDto extends HardCarEntity {
private LocalDate[] createTimeList;
private List<String> orderStatusCodes;
private String hourType;
}
@@ -44,6 +44,7 @@ public class HardCanteenTotalServiceImpl implements HardCanteenTotalService {
*/
@Override
public Page<HardCarVo> proudctQuery(Page page, HardCarDto dto) {
dto.setOrderStatusCodes(HardOrderStatusEnum.getPaySuccessCodes());
return hardCarMapper.proudctQuery(page, dto);
}
}
@@ -52,7 +52,7 @@
<select id="productTotal" resultType="com.bsd.pjcloud.hard.api.vo.order.HardCanteenProductTotalVo">
select DATE_FORMAT(a.create_time, '%Y-%m-%d') as createTime,
o.hour_type,
COUNT(a.product_count) as payCount,
SUM(a.product_count) as payCount,
SUM(a.total_price) as totalPrice
from hard_car a
inner join hard_parent_car p on a.parent_car_id = p.id and p.del_flag = '0'
@@ -113,7 +113,7 @@
</if>
</where>
group by DATE_FORMAT(a.create_time, '%Y-%m-%d'), o.hour_type
order by DATE_FORMAT(a.create_time, '%Y-%m-%d') desc, o.hour_type desc;
order by DATE_FORMAT(a.create_time, '%Y-%m-%d') desc, o.hour_type;
</select>
<select id="proudctQuery" resultType="com.bsd.pjcloud.hard.api.vo.order.HardCarVo">
@@ -122,13 +122,19 @@
a.product_pic,
a.product_price,
SUM(a.product_count) as count,
SUM(a.product_price) as totalPrice,
SUM(a.total_price) as totalPrice,
DATE_FORMAT(a.create_time, '%Y-%m-%d') as create_time
from hard_car a
inner join hard_parent_car p on a.parent_car_id = p.id and p.del_flag = '0'
inner join hard_order o on o.parent_car_id = p.id and o.del_flag = '0' and o.hour_type is not null
<where>
<include refid="whereA"/>
<if test="dto.orderStatusCodes != null and dto.orderStatusCodes.size() != 0">
and o.order_status in
<foreach collection="dto.orderStatusCodes" item="v" open="(" close=")" separator=",">
#{v}
</foreach>
</if>
<if test="dto.hourType != null and dto.hourType != '' ">
and o.hour_type = #{dto.hourType}
</if>