diff --git a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/FormController.java b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/FormController.java index 4153d4810..f2989f503 100644 --- a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/FormController.java +++ b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/FormController.java @@ -162,7 +162,7 @@ public class FormController { private String formId; /** - * 表单数据 + * 表单数据 ,key为字段id,value为字段值 */ private Map formData; diff --git a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/H5GroupController.java b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/H5GroupController.java index ddfe163eb..b60abcd65 100644 --- a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/H5GroupController.java +++ b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/controller/H5GroupController.java @@ -90,7 +90,7 @@ public class H5GroupController { @Operation(summary = "创建H5分组") @PostMapping public boolean createH5Group(@RequestBody H5Group h5Group) { - long currentTime = System.currentTimeMillis() / 1000; + long currentTime = System.currentTimeMillis(); h5Group.setCreateTime(currentTime); h5Group.setUpdateTime(currentTime); return h5GroupService.save(h5Group); @@ -107,7 +107,7 @@ public class H5GroupController { @PutMapping("/{id}") public boolean updateH5Group(@PathVariable Long id, @RequestBody H5Group h5Group) { h5Group.setId(id); - h5Group.setUpdateTime(System.currentTimeMillis() / 1000); + h5Group.setUpdateTime(System.currentTimeMillis()); return h5GroupService.updateById(h5Group); } @@ -122,4 +122,4 @@ public class H5GroupController { public boolean deleteH5Group(@PathVariable Long id) { return h5GroupService.removeById(id); } -} \ No newline at end of file +} diff --git a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FontServiceImpl.java b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FontServiceImpl.java index 714ffb61d..b0f96b344 100644 --- a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FontServiceImpl.java +++ b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FontServiceImpl.java @@ -40,7 +40,7 @@ public class FontServiceImpl extends ServiceImpl implements FontS } // 获取当前时间戳(秒) - long currentTime = System.currentTimeMillis() / 1000; + long currentTime = System.currentTimeMillis(); for (FontContent fontContent : fontContents) { // 保存到MongoDB fontContent.setCreateTime(currentTime); @@ -71,19 +71,19 @@ public class FontServiceImpl extends ServiceImpl implements FontS @Override public IPage pageFonts(String type, String name, Integer pageNum, Integer pageSize) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - + // 根据语言类型查询 if (StringUtils.hasText(type)) { queryWrapper.eq(Font::getLang, type); } - + // 根据名称模糊查询 if (StringUtils.hasText(name)) { queryWrapper.like(Font::getName, name); } - + queryWrapper.orderByDesc(Font::getCreateTime); - + IPage page = new Page<>(pageNum, pageSize); return this.page(page, queryWrapper); } @@ -97,11 +97,11 @@ public class FontServiceImpl extends ServiceImpl implements FontS // 先从MySQL查询ID列表 List fonts = this.list(new LambdaQueryWrapper() .in(Font::getFontFamily, fontFamilyList)); - + if (CollectionUtils.isEmpty(fonts)) { return null; } - + // 根据ID列表从MongoDB查询详细信息 List fontContents = new ArrayList<>(); for (Font font : fonts) { @@ -110,7 +110,7 @@ public class FontServiceImpl extends ServiceImpl implements FontS fontContents.add(fontContent); } } - + return fontContents; } @@ -118,4 +118,4 @@ public class FontServiceImpl extends ServiceImpl implements FontS public FontContent getFontDetail(Long id) { return fontContentRepository.findById(id).orElse(null); } -} \ No newline at end of file +} diff --git a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FormServiceImpl.java b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FormServiceImpl.java index 3f97ab838..133df774e 100644 --- a/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FormServiceImpl.java +++ b/ruoyi-site/ruoyi-h5/src/main/java/com/luban/api/service/impl/FormServiceImpl.java @@ -36,7 +36,7 @@ public class FormServiceImpl extends ServiceImpl