陈士柏 vor 2 Jahren
Ursprung
Commit
f00a314df6
2 geänderte Dateien mit 180 neuen und 0 gelöschten Zeilen
  1. 88 0
      mhotel/src/com/happy/dao/AppDao.java
  2. 92 0
      mhotel/src/com/happy/dao/BookDao.java

+ 88 - 0
mhotel/src/com/happy/dao/AppDao.java

@@ -0,0 +1,88 @@
+package com.happy.dao;
+
+import com.happy.Model.Admin;
+import com.happy.Model.AdminManager;
+import com.happy.Model.app.Around_product;
+import com.happy.Model.app.Arounds;
+import com.happy.Model.app.News;
+
+import java.util.List;
+
+public interface AppDao {
+
+    // 登录
+    public Admin login(String admin_name, String password);
+
+    public Admin queryByOpenid(String openid);
+
+    public Admin queryByNameAndOpenid(String admin_name,String openid);
+
+    public int updateOpenid(String openid,String admin_name);
+
+    public int updateOpenidNull(String openid);
+
+    /**********************
+     * ********商户绑定**********
+     * ********************/
+    public AdminManager login_ma(String admin_name, String password);
+
+    public AdminManager queryMaByOpenid(String openid);
+
+    public AdminManager queryMaByNameAndOpenid(String admin_name,String openid);
+
+    public int updateMaOpenid(String openid,String admin_name);
+
+    public int updateMaOpenidNull(String openid);
+
+    /** ================================资讯============================= **/
+    public int insertNews(News news);
+
+    public int delNews(int id);
+
+    public int updateNews(News news);
+
+    public int updateTop(News news);
+
+    public News queryByTit(String title);
+
+    public News queryById(int id);
+
+    public List<News> queryNewPage(int page, int rows, String sqlx);
+
+    public int queryNewTotal(String sqlx);
+
+    /** ==============================周边=================================== **/
+    public int insertRound(Arounds arounds);
+
+    public int updateRoundById(Arounds arounds);
+
+    public int updateRoundCountById(Arounds arounds);
+
+    public int delAround(int id);
+
+    public Arounds queryAroundById(int id);
+
+    public Arounds queryAroundByName(String rname);
+
+    public List<Arounds> queryAroundPage(String sqlx, int page, int rows);
+
+    public int queryAroundTotal(String sqlx);
+
+    /** =========================产品============================== **/
+    public int insertProduct(Around_product around_product);
+
+    public int updateProductById(Around_product around_product);
+
+    public int delAroundProduct(int id);
+
+    public Around_product queryAPById(int id);
+
+    public Around_product queryAPByName(int aid,String product_name);
+
+    public List<Around_product> queryAPPage(int aid,String sqlx, int page, int rows);
+
+    public int queryAPTotal(int aid,String sqlx);
+
+    public List<Around_product> queryAP(int aid,String sqlx);
+
+}

+ 92 - 0
mhotel/src/com/happy/dao/BookDao.java

@@ -0,0 +1,92 @@
+package com.happy.dao;
+
+import com.happy.Model.Booking;
+import com.happy.Model.Booking;
+import com.happy.Model.app.Tongji;
+import com.happy.dto.BookTypeEto;
+
+import java.util.List;
+
+public interface BookDao {
+
+    /**
+     * 描述:新增
+     * @param book
+     * @return
+     */
+    int insertBooking(Booking book);
+
+    /**
+     * 描述:修改
+     * @param book
+     * @return
+     */
+    int updateBooking(Booking book);
+
+    /**
+     * 描述:删除
+     * @param id
+     * @return
+     */
+    int delBooking(int id);
+
+    /**
+     * 描述:根据Id查询详细
+     * @param id
+     * @return
+     */
+    Booking getById(int id);
+
+    /**
+     * 描述:分页查询
+     * @param sqlx
+     * @param page
+     * @param rows
+     * @return
+     */
+    List<Booking> queryPage(String sqlx, int page, int rows, String orderDesc);
+
+    // 订单金额统计
+    public Tongji queryOrderT(String sqlx);
+
+    // 支付金额统计
+    public Tongji queryPayT(String sqlx);
+
+    // 退款金额统计
+    public Tongji queryRefundT(String sqlx);
+
+    // 入账金额统计
+    public Tongji queryInT(String sqlx);
+
+    /**
+     * 描述:获取总条数
+     * @param sqlx
+     * @return
+     */
+    int queryTotal(String sqlx);
+
+    /**
+     * 描述:查询列表
+     * @param sqlx
+     * @return
+     */
+    List<Booking> queryList(String sqlx);
+
+    // 清账操作
+    public int updateSaccount(Booking booking);
+
+    /**
+     * 描述:汇总查询金额
+     * @param sqlx
+     * @return
+     */
+    Double sumAccount(String sqlx);
+
+    /**
+     * 描述:查询订单类型汇总
+     * @param sqlx
+     * @return
+     */
+    BookTypeEto getBookStatusSum(String sqlx);
+
+}