Kaynağa Gözat

显示商家回复

lijie 2 yıl önce
ebeveyn
işleme
efdecfab2a

+ 1 - 0
mhotel/src/com/happy/action/bookCommentAction.java

@@ -148,6 +148,7 @@ public class bookCommentAction extends BaseController implements ServletRequestA
                 ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
                 return null;
             }
+            bookingComment.setCommentName("商家");//商家回复
             int m = bookingCommentService.insterCommpent(bookingComment);
             if (m > 0){
                 resultJson.put("message", "回复成功");

+ 3 - 1
mhotel/src/com/happy/dao/impl/BookingCommentDaoImpl.java

@@ -278,7 +278,7 @@ public class BookingCommentDaoImpl implements BookingCommentDao {
 
     @Override
     public int insterCommpent(BookingComment bookingComment) {
-        String sql = "INSERT INTO booking_comment (id, comment_id, comment_parent_id, comment_name, content,create_date,modify_date, status,comment_status) VALUES (:id, :comment_id, :comment_parent_id, :comment_name, :content, :create_date, :modify_date, :status,:comment_status)";
+        String sql = "INSERT INTO booking_comment (id, comment_id, comment_parent_id, comment_name, content,create_date,modify_date, status,comment_status,create_id,create_username) VALUES (:id, :comment_id, :comment_parent_id, :comment_name, :content, :create_date, :modify_date, :status,:comment_status,:create_id,:create_username)";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("comment_id",bookingComment.getCommentId());
         sps.addValue("comment_parent_id",bookingComment.getCommentParentId());
@@ -288,6 +288,8 @@ public class BookingCommentDaoImpl implements BookingCommentDao {
         sps.addValue("modify_date",UUIDUtil.getNewDate());
         sps.addValue("status",1);
         sps.addValue("comment_status",1);
+        sps.addValue("create_id",bookingComment.getCreateId());
+        sps.addValue("create_username",bookingComment.getCreateUsername());
         if(bookingComment.getId()==null){
             sps.addValue("id", String.valueOf(UUID.randomUUID()));
         }else{