瀏覽代碼

初始化

raojiaolong@163.com 2 年之前
父節點
當前提交
e6e1134703

+ 233 - 0
mhotel/src/com/happy/Model/HotelCoupon.java

@@ -0,0 +1,233 @@
+package com.happy.Model;
+
+import java.util.Date;
+
+/**
+ * @Description
+ * @Author raojiaolong
+ * @Date 2023-08-21
+ */
+public class HotelCoupon {
+
+
+    private Integer id; // 主键
+
+    private String hotelIds; // 适用民宿
+
+    private String name; // 名称
+
+    private Integer type; // 类型(1.优惠卷 2.折扣卷)
+
+    private Double rebatePrice; // 折扣
+
+    private Double deductionPrice; // 减免金额
+
+    private Double maxDeduction; // 最大减免金额
+
+    private Integer grantNumber; // 发放数量
+
+    private Date limitNumber; // 每人限领
+
+    private Date grantStartDate; // 发放开始时间
+
+    private Date grantEndDate; // 发放结束时间
+
+    private Double meetPrice; // 满减金额
+
+    private Date effectiveStartDate; // 有效期开始时间
+
+    private Date effectiveEndDate; // 有效期结束时间
+
+    private Integer effectiveDay; // 生效时间天数
+
+    private Integer loseEffectiveDay; // 失效时间天数
+
+    private Integer createId; // 创建人
+
+    private Date createDate; // 创建时间
+
+    private Date modifyDate; // 修改时间
+
+    private Integer status; // 状态(0删除 1正常)
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+
+    public String getHotelIds() {
+        return hotelIds;
+    }
+
+    public void setHotelIds(String hotelIds) {
+        this.hotelIds = hotelIds;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+
+    public Double getRebatePrice() {
+        return rebatePrice;
+    }
+
+    public void setRebatePrice(Double rebatePrice) {
+        this.rebatePrice = rebatePrice;
+    }
+
+
+    public Double getDeductionPrice() {
+        return deductionPrice;
+    }
+
+    public void setDeductionPrice(Double deductionPrice) {
+        this.deductionPrice = deductionPrice;
+    }
+
+
+    public Double getMaxDeduction() {
+        return maxDeduction;
+    }
+
+    public void setMaxDeduction(Double maxDeduction) {
+        this.maxDeduction = maxDeduction;
+    }
+
+
+    public Integer getGrantNumber() {
+        return grantNumber;
+    }
+
+    public void setGrantNumber(Integer grantNumber) {
+        this.grantNumber = grantNumber;
+    }
+
+
+    public Date getLimitNumber() {
+        return limitNumber;
+    }
+
+    public void setLimitNumber(Date limitNumber) {
+        this.limitNumber = limitNumber;
+    }
+
+
+    public Date getGrantStartDate() {
+        return grantStartDate;
+    }
+
+    public void setGrantStartDate(Date grantStartDate) {
+        this.grantStartDate = grantStartDate;
+    }
+
+
+    public Date getGrantEndDate() {
+        return grantEndDate;
+    }
+
+    public void setGrantEndDate(Date grantEndDate) {
+        this.grantEndDate = grantEndDate;
+    }
+
+
+    public Double getMeetPrice() {
+        return meetPrice;
+    }
+
+    public void setMeetPrice(Double meetPrice) {
+        this.meetPrice = meetPrice;
+    }
+
+
+    public Date getEffectiveStartDate() {
+        return effectiveStartDate;
+    }
+
+    public void setEffectiveStartDate(Date effectiveStartDate) {
+        this.effectiveStartDate = effectiveStartDate;
+    }
+
+
+    public Date getEffectiveEndDate() {
+        return effectiveEndDate;
+    }
+
+    public void setEffectiveEndDate(Date effectiveEndDate) {
+        this.effectiveEndDate = effectiveEndDate;
+    }
+
+
+    public Integer getEffectiveDay() {
+        return effectiveDay;
+    }
+
+    public void setEffectiveDay(Integer effectiveDay) {
+        this.effectiveDay = effectiveDay;
+    }
+
+
+    public Integer getLoseEffectiveDay() {
+        return loseEffectiveDay;
+    }
+
+    public void setLoseEffectiveDay(Integer loseEffectiveDay) {
+        this.loseEffectiveDay = loseEffectiveDay;
+    }
+
+
+    public Integer getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(Integer createId) {
+        this.createId = createId;
+    }
+
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+
+    public Date getModifyDate() {
+        return modifyDate;
+    }
+
+    public void setModifyDate(Date modifyDate) {
+        this.modifyDate = modifyDate;
+    }
+
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+}

+ 91 - 0
mhotel/src/com/happy/Model/HotelCouponStatus.java

@@ -0,0 +1,91 @@
+package com.happy.Model;
+
+import java.util.Date;
+
+/**
+ * @Description  
+ * @Author  raojiaolong
+ * @Date 2023-08-21 
+ */
+
+public class HotelCouponStatus {
+
+
+	private Integer id; // 主键
+
+	private Integer complaintId; // 优惠卷id
+
+	private Integer progressType; // 用户id
+
+	private Integer createId; // 创建人
+
+	private Date createDate; // 创建时间
+
+	private Date modifyDate; // 修改时间
+
+	private Integer status; // 状态(0删除/失效 1正常2.已核销已使用)
+
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+
+	public Integer getComplaintId() {
+		return complaintId;
+	}
+
+	public void setComplaintId(Integer complaintId) {
+		this.complaintId = complaintId;
+	}
+
+
+	public Integer getProgressType() {
+		return progressType;
+	}
+
+	public void setProgressType(Integer progressType) {
+		this.progressType = progressType;
+	}
+
+
+	public Integer getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(Integer createId) {
+		this.createId = createId;
+	}
+
+
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+}

+ 83 - 0
mhotel/src/com/happy/Model/HouseNumber.java

@@ -0,0 +1,83 @@
+package com.happy.Model;
+
+import java.util.Date;
+/**
+ * @Description  
+ * @Author  raojiaolong
+ * @Date 2023-08-23 
+ */
+
+public class HouseNumber {
+
+	private Integer id; // 主键
+	private Integer houseId; // 房型id
+	private String numberName; // 房间号
+	private Integer createId; // 创建人
+	private Date createDate; // 创建时间
+	private Date modifyDate; // 修改时间
+	private Integer status; // 状态(0.删除 1.正常)
+
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+
+	public Integer getHouseId() {
+		return houseId;
+	}
+
+	public void setHouseId(Integer houseId) {
+		this.houseId = houseId;
+	}
+
+
+	public String getNumberName() {
+		return numberName;
+	}
+
+	public void setNumberName(String numberName) {
+		this.numberName = numberName;
+	}
+
+
+	public Integer getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(Integer createId) {
+		this.createId = createId;
+	}
+
+
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+}

+ 103 - 0
mhotel/src/com/happy/Model/HouseNumberStatus.java

@@ -0,0 +1,103 @@
+package com.happy.Model;
+
+import java.util.Date;
+/**
+ * @Description  
+ * @Author  raojiaolong
+ * @Date 2023-08-23 
+ */
+
+public class HouseNumberStatus {
+
+	private Integer id; // 主键
+	private Integer numberId; // 房间号id
+	private Integer closeType; // 关房类型(1.停用房 2.维修房 3.保留房)
+	private String remark; // 备注
+	private String setDate; // 设置日期
+	private Integer createId; // 创建人
+	private Date createDate; // 创建时间
+	private Date modifyDate; // 修改时间
+	private Integer status; // 状态(0删除 1.正常 2.关房 3.脏房 4.净房)
+
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+
+	public Integer getNumberId() {
+		return numberId;
+	}
+
+	public void setNumberId(Integer numberId) {
+		this.numberId = numberId;
+	}
+
+
+	public Integer getCloseType() {
+		return closeType;
+	}
+
+	public void setCloseType(Integer closeType) {
+		this.closeType = closeType;
+	}
+
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+
+	public String getSetDate() {
+		return setDate;
+	}
+
+	public void setSetDate(String setDate) {
+		this.setDate = setDate;
+	}
+
+
+	public Integer getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(Integer createId) {
+		this.createId = createId;
+	}
+
+
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+}

+ 124 - 0
mhotel/src/com/happy/Model/HousePrice.java

@@ -0,0 +1,124 @@
+package com.happy.Model;
+
+import java.util.Date;
+
+/**
+ * @Description  
+ * @Author  raojiaolong
+ * @Date 2023-08-21 
+ */
+
+public class HousePrice {
+
+
+	private Integer id; // 主键
+
+	private Integer managerId; // 商家id
+
+	private Integer houseId; // 房型id
+
+	private Double price; // 单价
+
+	private String remark; // 备注
+
+	private String setDate; // 设置日期
+
+	private Integer createId; // 创建人
+
+	private Date createDate; // 创建时间
+
+	private Date modifyDate; // 修改时间
+
+	private Integer status; // 状态(0删除 1正常)
+
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+
+	public Integer getManagerId() {
+		return managerId;
+	}
+
+	public void setManagerId(Integer managerId) {
+		this.managerId = managerId;
+	}
+
+
+	public Integer getHouseId() {
+		return houseId;
+	}
+
+	public void setHouseId(Integer houseId) {
+		this.houseId = houseId;
+	}
+
+
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+
+	public String getSetDate() {
+		return setDate;
+	}
+
+	public void setSetDate(String setDate) {
+		this.setDate = setDate;
+	}
+
+
+	public Integer getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(Integer createId) {
+		this.createId = createId;
+	}
+
+
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+}

+ 135 - 0
mhotel/src/com/happy/Model/HousePriceHistory.java

@@ -0,0 +1,135 @@
+package com.happy.Model;
+
+import java.util.Date;
+
+/**
+ * @Description  
+ * @Author  raojiaolong
+ * @Date 2023-08-21 
+ */
+
+public class HousePriceHistory {
+
+
+	private Integer id; // 主键
+
+	private Integer managerId; // 商家id
+
+	private Integer houseId; // 房型id
+
+	private Double originalPrice; // 原价
+
+	private Double price; // 单价
+
+	private String remark; // 备注
+
+	private String setDate; // 设置日期
+
+	private Integer createId; // 创建人
+
+	private Date createDate; // 创建时间
+
+	private Date modifyDate; // 修改时间
+
+	private Integer status; // 状态(0删除 1正常)
+
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+
+	public Integer getManagerId() {
+		return managerId;
+	}
+
+	public void setManagerId(Integer managerId) {
+		this.managerId = managerId;
+	}
+
+
+	public Integer getHouseId() {
+		return houseId;
+	}
+
+	public void setHouseId(Integer houseId) {
+		this.houseId = houseId;
+	}
+
+
+	public Double getOriginalPrice() {
+		return originalPrice;
+	}
+
+	public void setOriginalPrice(Double originalPrice) {
+		this.originalPrice = originalPrice;
+	}
+
+
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+
+	public String getSetDate() {
+		return setDate;
+	}
+
+	public void setSetDate(String setDate) {
+		this.setDate = setDate;
+	}
+
+
+	public Integer getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(Integer createId) {
+		this.createId = createId;
+	}
+
+
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+
+	public Date getModifyDate() {
+		return modifyDate;
+	}
+
+	public void setModifyDate(Date modifyDate) {
+		this.modifyDate = modifyDate;
+	}
+
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+}

+ 119 - 0
mhotel/src/com/happy/action/hotelCoupomAction.java

@@ -0,0 +1,119 @@
+package com.happy.action;
+
+import com.baidubce.services.media.model.Job;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.happy.Model.AdminManager;
+import com.happy.Model.HotelCoupon;
+import com.happy.Model.HotelDict;
+import com.happy.Until.GetHttpParam;
+import com.happy.Until.ResUtil;
+import com.happy.common.controller.BaseController;
+import com.happy.dao.HotelCouponDao;
+import com.happy.dto.IPage;
+import com.happy.service.HotelCoupomService;
+import net.sf.json.JSONObject;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.interceptor.ServletRequestAware;
+
+public class hotelCoupomAction extends BaseController implements ServletRequestAware {
+
+    private HotelCoupomService hotelCoupomService;
+
+    /**
+     * 描述:新增优惠卷
+     * @return
+     */
+    public String inster(){
+        JSONObject resultJson = new JSONObject();
+        Gson gson = new Gson();
+        com.alibaba.fastjson.JSONObject json = GetHttpParam.getRequestParameters(request);
+        if (json == null) {
+            resultJson.put("message", "请传入参数");
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+            return null;
+        }
+        HotelCoupon hotelCoupon = null;
+        try{
+            hotelCoupon = gson.fromJson(json.toString(), new TypeToken<HotelDict>() {}.getType());
+            if(hotelCoupon==null){
+                resultJson.put("message", "数据为空");
+                resultJson.put("code", 500);
+                ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+                return null;
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            resultJson.put("message", "未知异常:"+ e);
+            resultJson.put("code", 205);
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        }
+        resultJson.put("message", "未知异常");
+        resultJson.put("code", 205);
+        ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        return null;
+    }
+
+    /**
+     * 描述:修改优惠卷
+     * @return
+     */
+    public String update(){
+        JSONObject resultJson = new JSONObject();
+        Gson gson = new Gson();
+        com.alibaba.fastjson.JSONObject json = GetHttpParam.getRequestParameters(request);
+        if (json == null) {
+            resultJson.put("message", "请传入参数");
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+            return null;
+        }
+        HotelCoupon hotelCoupon = null;
+        try{
+            hotelCoupon = gson.fromJson(json.toString(), new TypeToken<HotelDict>() {}.getType());
+        }catch (Exception e){
+            e.printStackTrace();
+            resultJson.put("message", "未知异常:"+ e);
+            resultJson.put("code", 205);
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        }
+        resultJson.put("message", "未知异常");
+        resultJson.put("code", 205);
+        ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        return null;
+    }
+
+    /**
+     * 描述:分页查询
+     * @return
+     */
+    public String queryPage(){
+        JSONObject resultJson = new JSONObject();
+        StringBuilder s1 = new StringBuilder("");
+        IPage<HotelCoupon> adminIPage = hotelCoupomService.queryPage(s1.toString(),page,rows);
+        return null;
+    }
+
+    /**
+     * 描述:根据Id查询详细
+     * @return
+     */
+    public String getById(){
+        JSONObject resultJson = new JSONObject();
+        if (id==null && id == 0) {
+            resultJson.put("message", "请传入id");
+            resultJson.put("code", 500);
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+            return null;
+        }
+        HotelCoupon hotelCoupon = hotelCoupomService.getById(id);
+        return null;
+    }
+
+    /**
+     * 描述:定时任务修改优惠卷状态
+     */
+    public void setCoupomStatus(){
+        System.out.println(1111);
+    }
+
+}

+ 54 - 0
mhotel/src/com/happy/service/HotelCoupomService.java

@@ -0,0 +1,54 @@
+package com.happy.service;
+
+import com.happy.Model.HotelCoupon;
+import com.happy.dto.IPage;
+
+import java.util.List;
+
+public interface HotelCoupomService {
+
+    /**
+     * 描述:新增
+     * @param hotelCoupon
+     * @return
+     */
+    int insert(HotelCoupon hotelCoupon);
+
+    /**
+     * 描述:修改
+     * @param hotelCoupon
+     * @return
+     */
+    int update(HotelCoupon hotelCoupon);
+
+    /**
+     * 描述:删除
+     * @param id
+     * @return
+     */
+    int delete(Integer id);
+
+    /**
+     * 描述:根据id查询
+     * @param id
+     * @return
+     */
+    HotelCoupon getById(Integer id);
+
+    /**
+     * 描述:分页查询
+     * @param sqlx
+     * @param page
+     * @param rows
+     * @return
+     */
+    IPage<HotelCoupon> queryPage(String sqlx, int page, int rows);
+
+    /**
+     * 描述:查询列表
+     * @param sqlx
+     * @return
+     */
+    List<HotelCoupon> queryList(String sqlx);
+
+}

+ 54 - 0
mhotel/src/com/happy/service/impl/HotelCoupomImplService.java

@@ -0,0 +1,54 @@
+package com.happy.service.impl;
+
+import com.happy.Model.AdminManager;
+import com.happy.Model.HotelCoupon;
+import com.happy.dao.HotelCouponDao;
+import com.happy.dto.IPage;
+import com.happy.service.HotelCoupomService;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+public class HotelCoupomImplService implements HotelCoupomService {
+
+    @Resource
+    private HotelCouponDao hotelCouponDao;
+
+    @Override
+    public int insert(HotelCoupon hotelCoupon) {
+        return hotelCouponDao.insert(hotelCoupon);
+    }
+
+    @Override
+    public int update(HotelCoupon hotelCoupon) {
+        return hotelCouponDao.update(hotelCoupon);
+    }
+
+    @Override
+    public int delete(Integer id) {
+        return hotelCouponDao.delete(id);
+    }
+
+    @Override
+    public HotelCoupon getById(Integer id) {
+        return hotelCouponDao.getById(id);
+    }
+
+    @Override
+    public IPage<HotelCoupon> queryPage(String sqlx, int page, int rows) {
+        IPage<HotelCoupon> iPage = new IPage();
+        List<HotelCoupon> hotelCouponList = hotelCouponDao.queryPage(sqlx,page,rows);
+        int total = hotelCouponDao.queryTotal(sqlx);
+        iPage.setPageList(hotelCouponList);
+        iPage.setPage(page);
+        iPage.setTotalPage( (int)Math.ceil((double)total/rows));
+        iPage.setRows(rows);
+        iPage.setTotal(total);
+        return iPage;
+    }
+
+    @Override
+    public List<HotelCoupon> queryList(String sqlx) {
+        return hotelCouponDao.queryList(sqlx);
+    }
+}