Added updating last_dowloaded_report
This commit is contained in:
parent
adb134c8bb
commit
1d582edf80
4 changed files with 13 additions and 0 deletions
|
|
@ -39,4 +39,6 @@ public interface SignalMapper {
|
|||
List<SignalService.PackageData> findPackagesByStatus(@Param("status") String status);
|
||||
|
||||
void setHits(@Param("hits") List<SignalService.HitsData> hits);
|
||||
|
||||
void setPackageLastDownloadedReport(@Param("id") Integer id, @Param("fileName") String fileName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public class MonitoringService {
|
|||
String fileName = createResponseFile(packageData, response);
|
||||
if (fileName != null) {
|
||||
updateSignalHits(packageData, response, fileName);
|
||||
signalService.updateLastDownloadedReport(packageData.getId(), fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,6 +208,10 @@ public class SignalService {
|
|||
mapper.setHits(hits);
|
||||
}
|
||||
|
||||
public void updateLastDownloadedReport(Integer id, String fileName) {
|
||||
mapper.setPackageLastDownloadedReport(id, fileName);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class PackageData {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@
|
|||
WHERE id = #{packageId}
|
||||
</update>
|
||||
|
||||
<update id="setPackageLastDownloadedReport">
|
||||
UPDATE signals_user_packages
|
||||
SET last_downloaded_report = #{fileName}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="findSubjectsData" resultMap="subjectDataResultMap" resultType="java.util.List">
|
||||
SELECT id, subject_id, phone
|
||||
FROM signals_phone_fid_map
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue