广告大屏读图片

This commit is contained in:
sxu 2025-06-11 15:47:37 +08:00
parent f26518cde9
commit 984e955bba
4 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,8 @@ import java.util.List;
@Mapper
public interface DatascreenMapper {
List<String> getDashboardPictures(Long dashboardId);
Integer getDishesNum(@Param("content") DatascreenBaseDTO content, @Param("canteenList") List<DsAuthorityCanteenVO> canteenList);
List<DishIntervalNum> getIntervalDishNum(@Param("content") DatascreenBaseDTO content, @Param("canteenList") List<DsAuthorityCanteenVO> canteenList);

View File

@ -82,6 +82,12 @@ public class DatascreenServiceImpl implements DatascreenService {
mealtimeVO.setBit(BigDecimal.valueOf(presentNum).divide(BigDecimal.valueOf(capacity), 3, BigDecimal.ROUND_FLOOR));
}
}
List<String> pictures = datascreenMapper.getDashboardPictures(666L);
List<String> newPictures = new ArrayList<>();
for (String picture : pictures) {
newPictures.add(picture.replace("https://10.138.55.103:8888/lnyst", "http://sgwpdm.ah.sgcc.com.cn/canteen/lnyst"));
}
mealtimeVO.setPictures(newPictures);
list.add(mealtimeVO);
});
return list;

View File

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class CurrentMealtimeVO {
@ -25,4 +26,6 @@ public class CurrentMealtimeVO {
@ApiModelProperty(value = "是否在餐次时段 1-是 2-否")
private Integer ifInMealTime;
private List<String> pictures;
}

View File

@ -3,6 +3,10 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.report.datascreen.mapper.DatascreenMapper">
<select id="getDashboardPictures" resultType="String">
select picture_url from dashboard_pic where dashboard_id = #{dashboardId}
</select>
<select id="getDishesNum" resultType="java.lang.Integer">
SELECT
count( DISTINCT b.dishes_id ) totalNum