xuhy
2024-10-31 5a1cf66467a80fee6b2eedf5c973b6f71d883290
修改
3个文件已修改
30 ■■■■ 已修改文件
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingPileNotificationMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingPileNotificationMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingPileNotificationMapper.java
@@ -27,4 +27,10 @@
     */
    List<TChargingPileNotification> chargingPileNotificationPageList(PageInfo<TChargingPileNotification> pageInfo, @Param("siteIds") Set<Integer> siteIds);
    /**
     * 保存通知数据
     * @param notification
     */
    void saveData(TChargingPileNotification notification);
}
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java
@@ -95,11 +95,11 @@
    @Override
    public void saveData(Integer type,Integer siteId,Integer chargingPileId, String phone, String data) {
        TChargingPileNotification notification = new TChargingPileNotification();
        notification.setSiteId(siteId==null?-1:siteId);
        notification.setChargingPileId(chargingPileId==null?-1:chargingPileId);
        notification.setSiteId(siteId);
        notification.setChargingPileId(chargingPileId);
        notification.setPhone(phone);
        notification.setContent(data);
        this.save(notification);
        this.baseMapper.saveData(notification);
    }
}
ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingPileNotificationMapper.xml
@@ -17,9 +17,23 @@
    <sql id="Base_Column_List">
        id, site_id, charging_pile_id, content, create_time, del_flag
    </sql>
    <insert id="saveData" parameterType="com.ruoyi.chargingPile.api.model.TChargingPileNotification">
            insert into sys_menu(
            <if test="siteId != null and siteId != 0">site_id,</if>
            <if test="chargingPileId != null and chargingPileId != 0">charging_pile_id,</if>
            <if test="phone != null and phone != ''">phone,</if>
            <if test="content != null and content != ''">content,</if>
            create_time
            )values(
            <if test="siteId != null and siteId != 0">#{siteId},</if>
            <if test="chargingPileId != null and chargingPileId != 0">#{chargingPileId},</if>
            <if test="phone != null and phone != ''">#{phone},</if>
            <if test="content != null and content != ''">#{content},</if>
            sysdate()
            )
    </insert>
    <select id="chargingPileNotificationPageList" resultType="com.ruoyi.chargingPile.api.model.TChargingPileNotification">
        select
        a.id,