|
@@ -61,8 +61,8 @@ public class ArticleTweetImplDao implements ArticleTweetDao {
|
|
|
@Override
|
|
@Override
|
|
|
public int insert(ArticleTweet articleTweet) {
|
|
public int insert(ArticleTweet articleTweet) {
|
|
|
KeyHolder key = new GeneratedKeyHolder();
|
|
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();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("userId", articleTweet.getUserId());
|
|
sps.addValue("userId", articleTweet.getUserId());
|
|
|
sps.addValue("userName", articleTweet.getUserName());
|
|
sps.addValue("userName", articleTweet.getUserName());
|
|
@@ -76,6 +76,7 @@ public class ArticleTweetImplDao implements ArticleTweetDao {
|
|
|
sps.addValue("status", articleTweet.getStatus());
|
|
sps.addValue("status", articleTweet.getStatus());
|
|
|
sps.addValue("approve", articleTweet.getApprove());
|
|
sps.addValue("approve", articleTweet.getApprove());
|
|
|
sps.addValue("type", articleTweet.getType());
|
|
sps.addValue("type", articleTweet.getType());
|
|
|
|
|
+ sps.addValue("is_top", articleTweet.getIsTop());
|
|
|
|
|
|
|
|
int num = 0;
|
|
int num = 0;
|
|
|
try {
|
|
try {
|