Browse Source

更新文件 ArticleTweetImplDao.java

陈士柏 2 years atrás
parent
commit
914ee9b27a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      mhotel/src/com/happy/dao/impl/ArticleTweetImplDao.java

+ 3 - 2
mhotel/src/com/happy/dao/impl/ArticleTweetImplDao.java

@@ -61,8 +61,8 @@ public class ArticleTweetImplDao implements ArticleTweetDao {
     @Override
     public int insert(ArticleTweet articleTweet) {
         KeyHolder key = new GeneratedKeyHolder();
-        String sql = "insert into `article_tweet` (user_id,user_name,user_photo,title,content,location_id,hotel_id,create_id,create_date,status,approve,type) " +
-                "values(:userId,:userName,:userPhoto,:title,:content,:locationId,:hotelId,:createId,:createDate,:status,:approve,:type) ";
+        String sql = "insert into `article_tweet` (user_id,user_name,user_photo,title,content,location_id,hotel_id,create_id,create_date,status,approve,type,is_top) " +
+                "values(:userId,:userName,:userPhoto,:title,:content,:locationId,:hotelId,:createId,:createDate,:status,:approve,:type,:is_top) ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("userId", articleTweet.getUserId());
         sps.addValue("userName", articleTweet.getUserName());
@@ -76,6 +76,7 @@ public class ArticleTweetImplDao implements ArticleTweetDao {
         sps.addValue("status", articleTweet.getStatus());
         sps.addValue("approve", articleTweet.getApprove());
         sps.addValue("type", articleTweet.getType());
+        sps.addValue("is_top", articleTweet.getIsTop());
 
         int num = 0;
         try {