|
@@ -63,12 +63,11 @@ public class CallbackController {
|
|
@RequestParam("lessonId") String lessonId,
|
|
@RequestParam("lessonId") String lessonId,
|
|
@RequestParam("resTotal") int resTotal,
|
|
@RequestParam("resTotal") int resTotal,
|
|
@RequestParam("resSize") int resSize,
|
|
@RequestParam("resSize") int resSize,
|
|
- @RequestParam("data") String data) {
|
|
|
|
|
|
+ @RequestParam("mac") String mac) {
|
|
|
|
|
|
String ip = HttpUtil.getClientIp(request);
|
|
String ip = HttpUtil.getClientIp(request);
|
|
log.info("ip={}",ip);
|
|
log.info("ip={}",ip);
|
|
|
|
|
|
- String mac = null ;//HttpUtil.getMacAddrByIp(request);
|
|
|
|
|
|
|
|
log.info("mac={}",mac);
|
|
log.info("mac={}",mac);
|
|
|
|
|
|
@@ -124,8 +123,8 @@ public class CallbackController {
|
|
dto.setCourseId(courseId);
|
|
dto.setCourseId(courseId);
|
|
dto.setCourseName(course.getTitle());
|
|
dto.setCourseName(course.getTitle());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotBlank(data)){
|
|
|
|
- dto.setData(data);
|
|
|
|
|
|
+ if(StringUtils.isNotBlank(mac)){
|
|
|
|
+ dto.setData(mac);
|
|
}
|
|
}
|
|
|
|
|
|
dto.setMerchantId(user.getMerchantId());
|
|
dto.setMerchantId(user.getMerchantId());
|
|
@@ -186,6 +185,8 @@ public class CallbackController {
|
|
@RequestMapping(value = "/download/update/resource/size", method = RequestMethod.PUT)
|
|
@RequestMapping(value = "/download/update/resource/size", method = RequestMethod.PUT)
|
|
public APIResult<Boolean> updateResourceByLessonUserId(@NeedUser DeviceUserVo user,
|
|
public APIResult<Boolean> updateResourceByLessonUserId(@NeedUser DeviceUserVo user,
|
|
@RequestParam("lessonId") String lessonId) {
|
|
@RequestParam("lessonId") String lessonId) {
|
|
|
|
+
|
|
|
|
+
|
|
DownloadInfo downloadInfo = downloadInfoService.findByLessonUserId(user.getUid(),lessonId);
|
|
DownloadInfo downloadInfo = downloadInfoService.findByLessonUserId(user.getUid(),lessonId);
|
|
if(downloadInfo == null){
|
|
if(downloadInfo == null){
|
|
APIResult.error(APICode.OPERATE_ERROR);
|
|
APIResult.error(APICode.OPERATE_ERROR);
|
|
@@ -198,11 +199,7 @@ public class CallbackController {
|
|
downloadInfo.setResSize(resSize);
|
|
downloadInfo.setResSize(resSize);
|
|
}
|
|
}
|
|
|
|
|
|
- try {
|
|
|
|
- Thread.sleep(5000);
|
|
|
|
- } catch (InterruptedException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
DownloadInfo update = downloadInfoService.update(downloadInfo);
|
|
DownloadInfo update = downloadInfoService.update(downloadInfo);
|
|
if(update == null){
|
|
if(update == null){
|