hyx 2 years ago
parent
commit
12e972e9fc

+ 3 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/PostManagement.java

@@ -2,8 +2,10 @@ package com.example.nngkxxdp.entity;
 
 import lombok.Data;
 
+import java.io.Serializable;
+
 @Data
-public class PostManagement {
+public class PostManagement implements Serializable {
     /**
      * id
      */

+ 2 - 4
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/PostManagementServiceImpl.java

@@ -2,14 +2,10 @@ package com.example.nngkxxdp.service.impl;
 
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.io.FileTypeUtil;
-import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.example.nngkxxdp.dao.ColumnDao;
 import com.example.nngkxxdp.dao.PostManagementDao;
-import com.example.nngkxxdp.entity.Column;
-import com.example.nngkxxdp.entity.ImpressionNanan;
 import com.example.nngkxxdp.entity.PostManagement;
 import com.example.nngkxxdp.service.PostManagementService;
 import com.example.nngkxxdp.util.Blank;
@@ -18,6 +14,7 @@ import com.example.nngkxxdp.util.SendUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -31,6 +28,7 @@ import java.util.*;
  * @author
  */
 @Service
+@Transactional
 public class PostManagementServiceImpl implements PostManagementService {
 
     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");