浏览代码

1.3.3采美百科与词条详情功能优化

JiangChongBo 2 年之前
父节点
当前提交
3302930b09

+ 2 - 2
src/main/java/com/caimei/www/controller/unlimited/EncyclopediaController.java

@@ -54,7 +54,7 @@ public class EncyclopediaController extends BaseController {
     @GetMapping("/list-{typeId}.html")
     @GetMapping("/list-{typeId}.html")
     public String getEncyclopediaList(final Model model,@PathVariable("typeId") Integer typeId) {
     public String getEncyclopediaList(final Model model,@PathVariable("typeId") Integer typeId) {
         //词条信息
         //词条信息
-        SimpleDateFormat sl=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat sl=new SimpleDateFormat("yyyy-MM-dd");
         List<BaikeProductVo> authUserList = productService.getAuthUserList(typeId);
         List<BaikeProductVo> authUserList = productService.getAuthUserList(typeId);
         if(null!=authUserList&&authUserList.size()>0){
         if(null!=authUserList&&authUserList.size()>0){
         for (BaikeProductVo baikeProductVo:authUserList) {
         for (BaikeProductVo baikeProductVo:authUserList) {
@@ -81,7 +81,7 @@ public class EncyclopediaController extends BaseController {
      * */
      * */
     @GetMapping("/detail-{id}.html")
     @GetMapping("/detail-{id}.html")
     public String getEncyclopediaDetail(final Model model, @PathVariable("id") Integer id) {
     public String getEncyclopediaDetail(final Model model, @PathVariable("id") Integer id) {
-        SimpleDateFormat sl=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat sl=new SimpleDateFormat("yyyy-MM-dd");
         BaikeProductVo baikeproduct = productService.getEncyclopediaDetail(id);
         BaikeProductVo baikeproduct = productService.getEncyclopediaDetail(id);
         if(null!=baikeproduct){
         if(null!=baikeproduct){
             if(null!=baikeproduct.getPublishTime()){
             if(null!=baikeproduct.getPublishTime()){

+ 1 - 1
src/main/java/com/caimei/www/service/page/impl/ProductServiceImpl.java

@@ -445,7 +445,7 @@ public class ProductServiceImpl implements ProductService {
         List<CmBaikeReferenceInfo> referenceList = baikeDao.getReferenceListById(id);
         List<CmBaikeReferenceInfo> referenceList = baikeDao.getReferenceListById(id);
         if(referenceList!=null&&referenceList.size()>0){
         if(referenceList!=null&&referenceList.size()>0){
             for(CmBaikeReferenceInfo reference : referenceList){
             for(CmBaikeReferenceInfo reference : referenceList){
-                SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
                 if(null!=reference.getPublishTime()){
                 if(null!=reference.getPublishTime()){
                     String publishTime= dateFormat.format(reference.getPublishTime());
                     String publishTime= dateFormat.format(reference.getPublishTime());
                     reference.setPublishTimeStr(publishTime);
                     reference.setPublishTimeStr(publishTime);