瀏覽代碼

优惠券

jk-GitHub-coder 3 年之前
父節點
當前提交
3025bac48f

+ 4 - 90
YijiaRestful/src/main/java/com/platform/yijia/dao/CouponMapper.java

@@ -1,96 +1,10 @@
 package com.platform.yijia.dao;
 
+
 import com.platform.yijia.pojo.Coupon;
-import com.platform.yijia.pojo.CouponExample;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface CouponMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    long countByExample(CouponExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int deleteByExample(CouponExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int deleteByPrimaryKey(Integer couponId);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int insert(Coupon record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int insertSelective(Coupon record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    List<Coupon> selectByExample(CouponExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    Coupon selectByPrimaryKey(Integer couponId);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int updateByExampleSelective(@Param("record") Coupon record, @Param("example") CouponExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int updateByExample(@Param("record") Coupon record, @Param("example") CouponExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int updateByPrimaryKeySelective(Coupon record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    int updateByPrimaryKey(Coupon record);
-}
+    //获取加油券信息
+    Coupon selectCouponInfo(Coupon coupon);
+}

+ 0 - 335
YijiaRestful/src/main/java/com/platform/yijia/pojo/Coupon.java

@@ -1,335 +0,0 @@
-package com.platform.yijia.pojo;
-
-import java.util.Date;
-
-public class Coupon {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_id
-     *
-     * @mbg.generated
-     */
-    private Integer couponId;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.station_no
-     *
-     * @mbg.generated
-     */
-    private String stationNo;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.station_name
-     *
-     * @mbg.generated
-     */
-    private String stationName;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_name
-     *
-     * @mbg.generated
-     */
-    private String couponName;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_rule
-     *
-     * @mbg.generated
-     */
-    private String couponRule;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_type
-     *
-     * @mbg.generated
-     */
-    private String couponType;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_amt
-     *
-     * @mbg.generated
-     */
-    private Double couponAmt;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_reul_amt
-     *
-     * @mbg.generated
-     */
-    private Double couponReulAmt;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.coupon_oil
-     *
-     * @mbg.generated
-     */
-    private String couponOil;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column coupon.validity_date
-     *
-     * @mbg.generated
-     */
-    private Date validityDate;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_id
-     *
-     * @return the value of coupon.coupon_id
-     *
-     * @mbg.generated
-     */
-    public Integer getCouponId() {
-        return couponId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_id
-     *
-     * @param couponId the value for coupon.coupon_id
-     *
-     * @mbg.generated
-     */
-    public void setCouponId(Integer couponId) {
-        this.couponId = couponId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.station_no
-     *
-     * @return the value of coupon.station_no
-     *
-     * @mbg.generated
-     */
-    public String getStationNo() {
-        return stationNo;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.station_no
-     *
-     * @param stationNo the value for coupon.station_no
-     *
-     * @mbg.generated
-     */
-    public void setStationNo(String stationNo) {
-        this.stationNo = stationNo == null ? null : stationNo.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.station_name
-     *
-     * @return the value of coupon.station_name
-     *
-     * @mbg.generated
-     */
-    public String getStationName() {
-        return stationName;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.station_name
-     *
-     * @param stationName the value for coupon.station_name
-     *
-     * @mbg.generated
-     */
-    public void setStationName(String stationName) {
-        this.stationName = stationName == null ? null : stationName.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_name
-     *
-     * @return the value of coupon.coupon_name
-     *
-     * @mbg.generated
-     */
-    public String getCouponName() {
-        return couponName;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_name
-     *
-     * @param couponName the value for coupon.coupon_name
-     *
-     * @mbg.generated
-     */
-    public void setCouponName(String couponName) {
-        this.couponName = couponName == null ? null : couponName.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_rule
-     *
-     * @return the value of coupon.coupon_rule
-     *
-     * @mbg.generated
-     */
-    public String getCouponRule() {
-        return couponRule;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_rule
-     *
-     * @param couponRule the value for coupon.coupon_rule
-     *
-     * @mbg.generated
-     */
-    public void setCouponRule(String couponRule) {
-        this.couponRule = couponRule == null ? null : couponRule.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_type
-     *
-     * @return the value of coupon.coupon_type
-     *
-     * @mbg.generated
-     */
-    public String getCouponType() {
-        return couponType;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_type
-     *
-     * @param couponType the value for coupon.coupon_type
-     *
-     * @mbg.generated
-     */
-    public void setCouponType(String couponType) {
-        this.couponType = couponType == null ? null : couponType.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_amt
-     *
-     * @return the value of coupon.coupon_amt
-     *
-     * @mbg.generated
-     */
-    public Double getCouponAmt() {
-        return couponAmt;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_amt
-     *
-     * @param couponAmt the value for coupon.coupon_amt
-     *
-     * @mbg.generated
-     */
-    public void setCouponAmt(Double couponAmt) {
-        this.couponAmt = couponAmt;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_reul_amt
-     *
-     * @return the value of coupon.coupon_reul_amt
-     *
-     * @mbg.generated
-     */
-    public Double getCouponReulAmt() {
-        return couponReulAmt;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_reul_amt
-     *
-     * @param couponReulAmt the value for coupon.coupon_reul_amt
-     *
-     * @mbg.generated
-     */
-    public void setCouponReulAmt(Double couponReulAmt) {
-        this.couponReulAmt = couponReulAmt;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.coupon_oil
-     *
-     * @return the value of coupon.coupon_oil
-     *
-     * @mbg.generated
-     */
-    public String getCouponOil() {
-        return couponOil;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.coupon_oil
-     *
-     * @param couponOil the value for coupon.coupon_oil
-     *
-     * @mbg.generated
-     */
-    public void setCouponOil(String couponOil) {
-        this.couponOil = couponOil == null ? null : couponOil.trim();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column coupon.validity_date
-     *
-     * @return the value of coupon.validity_date
-     *
-     * @mbg.generated
-     */
-    public Date getValidityDate() {
-        return validityDate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column coupon.validity_date
-     *
-     * @param validityDate the value for coupon.validity_date
-     *
-     * @mbg.generated
-     */
-    public void setValidityDate(Date validityDate) {
-        this.validityDate = validityDate;
-    }
-}

+ 0 - 990
YijiaRestful/src/main/java/com/platform/yijia/pojo/CouponExample.java

@@ -1,990 +0,0 @@
-package com.platform.yijia.pojo;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-public class CouponExample {
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    protected String orderByClause;
-
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    protected boolean distinct;
-
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    protected List<Criteria> oredCriteria;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public CouponExample() {
-        oredCriteria = new ArrayList<Criteria>();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public void setOrderByClause(String orderByClause) {
-        this.orderByClause = orderByClause;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public String getOrderByClause() {
-        return orderByClause;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public void setDistinct(boolean distinct) {
-        this.distinct = distinct;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public boolean isDistinct() {
-        return distinct;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public List<Criteria> getOredCriteria() {
-        return oredCriteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public void or(Criteria criteria) {
-        oredCriteria.add(criteria);
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public Criteria or() {
-        Criteria criteria = createCriteriaInternal();
-        oredCriteria.add(criteria);
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public Criteria createCriteria() {
-        Criteria criteria = createCriteriaInternal();
-        if (oredCriteria.size() == 0) {
-            oredCriteria.add(criteria);
-        }
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    protected Criteria createCriteriaInternal() {
-        Criteria criteria = new Criteria();
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public void clear() {
-        oredCriteria.clear();
-        orderByClause = null;
-        distinct = false;
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    protected abstract static class GeneratedCriteria {
-        protected List<Criterion> criteria;
-
-        protected GeneratedCriteria() {
-            super();
-            criteria = new ArrayList<Criterion>();
-        }
-
-        public boolean isValid() {
-            return criteria.size() > 0;
-        }
-
-        public List<Criterion> getAllCriteria() {
-            return criteria;
-        }
-
-        public List<Criterion> getCriteria() {
-            return criteria;
-        }
-
-        protected void addCriterion(String condition) {
-            if (condition == null) {
-                throw new RuntimeException("Value for condition cannot be null");
-            }
-            criteria.add(new Criterion(condition));
-        }
-
-        protected void addCriterion(String condition, Object value, String property) {
-            if (value == null) {
-                throw new RuntimeException("Value for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value));
-        }
-
-        protected void addCriterion(String condition, Object value1, Object value2, String property) {
-            if (value1 == null || value2 == null) {
-                throw new RuntimeException("Between values for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value1, value2));
-        }
-
-        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
-            if (value == null) {
-                throw new RuntimeException("Value for " + property + " cannot be null");
-            }
-            addCriterion(condition, new java.sql.Date(value.getTime()), property);
-        }
-
-        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
-            if (values == null || values.size() == 0) {
-                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
-            }
-            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
-            Iterator<Date> iter = values.iterator();
-            while (iter.hasNext()) {
-                dateList.add(new java.sql.Date(iter.next().getTime()));
-            }
-            addCriterion(condition, dateList, property);
-        }
-
-        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
-            if (value1 == null || value2 == null) {
-                throw new RuntimeException("Between values for " + property + " cannot be null");
-            }
-            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
-        }
-
-        public Criteria andCouponIdIsNull() {
-            addCriterion("coupon_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdIsNotNull() {
-            addCriterion("coupon_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdEqualTo(Integer value) {
-            addCriterion("coupon_id =", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdNotEqualTo(Integer value) {
-            addCriterion("coupon_id <>", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdGreaterThan(Integer value) {
-            addCriterion("coupon_id >", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("coupon_id >=", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdLessThan(Integer value) {
-            addCriterion("coupon_id <", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdLessThanOrEqualTo(Integer value) {
-            addCriterion("coupon_id <=", value, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdIn(List<Integer> values) {
-            addCriterion("coupon_id in", values, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdNotIn(List<Integer> values) {
-            addCriterion("coupon_id not in", values, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdBetween(Integer value1, Integer value2) {
-            addCriterion("coupon_id between", value1, value2, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("coupon_id not between", value1, value2, "couponId");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoIsNull() {
-            addCriterion("station_no is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoIsNotNull() {
-            addCriterion("station_no is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoEqualTo(String value) {
-            addCriterion("station_no =", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoNotEqualTo(String value) {
-            addCriterion("station_no <>", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoGreaterThan(String value) {
-            addCriterion("station_no >", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoGreaterThanOrEqualTo(String value) {
-            addCriterion("station_no >=", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoLessThan(String value) {
-            addCriterion("station_no <", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoLessThanOrEqualTo(String value) {
-            addCriterion("station_no <=", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoLike(String value) {
-            addCriterion("station_no like", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoNotLike(String value) {
-            addCriterion("station_no not like", value, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoIn(List<String> values) {
-            addCriterion("station_no in", values, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoNotIn(List<String> values) {
-            addCriterion("station_no not in", values, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoBetween(String value1, String value2) {
-            addCriterion("station_no between", value1, value2, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNoNotBetween(String value1, String value2) {
-            addCriterion("station_no not between", value1, value2, "stationNo");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameIsNull() {
-            addCriterion("station_name is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameIsNotNull() {
-            addCriterion("station_name is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameEqualTo(String value) {
-            addCriterion("station_name =", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameNotEqualTo(String value) {
-            addCriterion("station_name <>", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameGreaterThan(String value) {
-            addCriterion("station_name >", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameGreaterThanOrEqualTo(String value) {
-            addCriterion("station_name >=", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameLessThan(String value) {
-            addCriterion("station_name <", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameLessThanOrEqualTo(String value) {
-            addCriterion("station_name <=", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameLike(String value) {
-            addCriterion("station_name like", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameNotLike(String value) {
-            addCriterion("station_name not like", value, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameIn(List<String> values) {
-            addCriterion("station_name in", values, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameNotIn(List<String> values) {
-            addCriterion("station_name not in", values, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameBetween(String value1, String value2) {
-            addCriterion("station_name between", value1, value2, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andStationNameNotBetween(String value1, String value2) {
-            addCriterion("station_name not between", value1, value2, "stationName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameIsNull() {
-            addCriterion("coupon_name is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameIsNotNull() {
-            addCriterion("coupon_name is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameEqualTo(String value) {
-            addCriterion("coupon_name =", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameNotEqualTo(String value) {
-            addCriterion("coupon_name <>", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameGreaterThan(String value) {
-            addCriterion("coupon_name >", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameGreaterThanOrEqualTo(String value) {
-            addCriterion("coupon_name >=", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameLessThan(String value) {
-            addCriterion("coupon_name <", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameLessThanOrEqualTo(String value) {
-            addCriterion("coupon_name <=", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameLike(String value) {
-            addCriterion("coupon_name like", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameNotLike(String value) {
-            addCriterion("coupon_name not like", value, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameIn(List<String> values) {
-            addCriterion("coupon_name in", values, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameNotIn(List<String> values) {
-            addCriterion("coupon_name not in", values, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameBetween(String value1, String value2) {
-            addCriterion("coupon_name between", value1, value2, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponNameNotBetween(String value1, String value2) {
-            addCriterion("coupon_name not between", value1, value2, "couponName");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleIsNull() {
-            addCriterion("coupon_rule is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleIsNotNull() {
-            addCriterion("coupon_rule is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleEqualTo(String value) {
-            addCriterion("coupon_rule =", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleNotEqualTo(String value) {
-            addCriterion("coupon_rule <>", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleGreaterThan(String value) {
-            addCriterion("coupon_rule >", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleGreaterThanOrEqualTo(String value) {
-            addCriterion("coupon_rule >=", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleLessThan(String value) {
-            addCriterion("coupon_rule <", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleLessThanOrEqualTo(String value) {
-            addCriterion("coupon_rule <=", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleLike(String value) {
-            addCriterion("coupon_rule like", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleNotLike(String value) {
-            addCriterion("coupon_rule not like", value, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleIn(List<String> values) {
-            addCriterion("coupon_rule in", values, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleNotIn(List<String> values) {
-            addCriterion("coupon_rule not in", values, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleBetween(String value1, String value2) {
-            addCriterion("coupon_rule between", value1, value2, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponRuleNotBetween(String value1, String value2) {
-            addCriterion("coupon_rule not between", value1, value2, "couponRule");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeIsNull() {
-            addCriterion("coupon_type is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeIsNotNull() {
-            addCriterion("coupon_type is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeEqualTo(String value) {
-            addCriterion("coupon_type =", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeNotEqualTo(String value) {
-            addCriterion("coupon_type <>", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeGreaterThan(String value) {
-            addCriterion("coupon_type >", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeGreaterThanOrEqualTo(String value) {
-            addCriterion("coupon_type >=", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeLessThan(String value) {
-            addCriterion("coupon_type <", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeLessThanOrEqualTo(String value) {
-            addCriterion("coupon_type <=", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeLike(String value) {
-            addCriterion("coupon_type like", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeNotLike(String value) {
-            addCriterion("coupon_type not like", value, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeIn(List<String> values) {
-            addCriterion("coupon_type in", values, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeNotIn(List<String> values) {
-            addCriterion("coupon_type not in", values, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeBetween(String value1, String value2) {
-            addCriterion("coupon_type between", value1, value2, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponTypeNotBetween(String value1, String value2) {
-            addCriterion("coupon_type not between", value1, value2, "couponType");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtIsNull() {
-            addCriterion("coupon_amt is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtIsNotNull() {
-            addCriterion("coupon_amt is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtEqualTo(Double value) {
-            addCriterion("coupon_amt =", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtNotEqualTo(Double value) {
-            addCriterion("coupon_amt <>", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtGreaterThan(Double value) {
-            addCriterion("coupon_amt >", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtGreaterThanOrEqualTo(Double value) {
-            addCriterion("coupon_amt >=", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtLessThan(Double value) {
-            addCriterion("coupon_amt <", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtLessThanOrEqualTo(Double value) {
-            addCriterion("coupon_amt <=", value, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtIn(List<Double> values) {
-            addCriterion("coupon_amt in", values, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtNotIn(List<Double> values) {
-            addCriterion("coupon_amt not in", values, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtBetween(Double value1, Double value2) {
-            addCriterion("coupon_amt between", value1, value2, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponAmtNotBetween(Double value1, Double value2) {
-            addCriterion("coupon_amt not between", value1, value2, "couponAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtIsNull() {
-            addCriterion("coupon_reul_amt is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtIsNotNull() {
-            addCriterion("coupon_reul_amt is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtEqualTo(Double value) {
-            addCriterion("coupon_reul_amt =", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtNotEqualTo(Double value) {
-            addCriterion("coupon_reul_amt <>", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtGreaterThan(Double value) {
-            addCriterion("coupon_reul_amt >", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtGreaterThanOrEqualTo(Double value) {
-            addCriterion("coupon_reul_amt >=", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtLessThan(Double value) {
-            addCriterion("coupon_reul_amt <", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtLessThanOrEqualTo(Double value) {
-            addCriterion("coupon_reul_amt <=", value, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtIn(List<Double> values) {
-            addCriterion("coupon_reul_amt in", values, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtNotIn(List<Double> values) {
-            addCriterion("coupon_reul_amt not in", values, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtBetween(Double value1, Double value2) {
-            addCriterion("coupon_reul_amt between", value1, value2, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponReulAmtNotBetween(Double value1, Double value2) {
-            addCriterion("coupon_reul_amt not between", value1, value2, "couponReulAmt");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilIsNull() {
-            addCriterion("coupon_oil is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilIsNotNull() {
-            addCriterion("coupon_oil is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilEqualTo(String value) {
-            addCriterion("coupon_oil =", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilNotEqualTo(String value) {
-            addCriterion("coupon_oil <>", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilGreaterThan(String value) {
-            addCriterion("coupon_oil >", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilGreaterThanOrEqualTo(String value) {
-            addCriterion("coupon_oil >=", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilLessThan(String value) {
-            addCriterion("coupon_oil <", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilLessThanOrEqualTo(String value) {
-            addCriterion("coupon_oil <=", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilLike(String value) {
-            addCriterion("coupon_oil like", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilNotLike(String value) {
-            addCriterion("coupon_oil not like", value, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilIn(List<String> values) {
-            addCriterion("coupon_oil in", values, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilNotIn(List<String> values) {
-            addCriterion("coupon_oil not in", values, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilBetween(String value1, String value2) {
-            addCriterion("coupon_oil between", value1, value2, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andCouponOilNotBetween(String value1, String value2) {
-            addCriterion("coupon_oil not between", value1, value2, "couponOil");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateIsNull() {
-            addCriterion("validity_date is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateIsNotNull() {
-            addCriterion("validity_date is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateEqualTo(Date value) {
-            addCriterionForJDBCDate("validity_date =", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateNotEqualTo(Date value) {
-            addCriterionForJDBCDate("validity_date <>", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateGreaterThan(Date value) {
-            addCriterionForJDBCDate("validity_date >", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateGreaterThanOrEqualTo(Date value) {
-            addCriterionForJDBCDate("validity_date >=", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateLessThan(Date value) {
-            addCriterionForJDBCDate("validity_date <", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateLessThanOrEqualTo(Date value) {
-            addCriterionForJDBCDate("validity_date <=", value, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateIn(List<Date> values) {
-            addCriterionForJDBCDate("validity_date in", values, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateNotIn(List<Date> values) {
-            addCriterionForJDBCDate("validity_date not in", values, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateBetween(Date value1, Date value2) {
-            addCriterionForJDBCDate("validity_date between", value1, value2, "validityDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andValidityDateNotBetween(Date value1, Date value2) {
-            addCriterionForJDBCDate("validity_date not between", value1, value2, "validityDate");
-            return (Criteria) this;
-        }
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table coupon
-     *
-     * @mbg.generated do_not_delete_during_merge
-     */
-    public static class Criteria extends GeneratedCriteria {
-
-        protected Criteria() {
-            super();
-        }
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table coupon
-     *
-     * @mbg.generated
-     */
-    public static class Criterion {
-        private String condition;
-
-        private Object value;
-
-        private Object secondValue;
-
-        private boolean noValue;
-
-        private boolean singleValue;
-
-        private boolean betweenValue;
-
-        private boolean listValue;
-
-        private String typeHandler;
-
-        public String getCondition() {
-            return condition;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object getSecondValue() {
-            return secondValue;
-        }
-
-        public boolean isNoValue() {
-            return noValue;
-        }
-
-        public boolean isSingleValue() {
-            return singleValue;
-        }
-
-        public boolean isBetweenValue() {
-            return betweenValue;
-        }
-
-        public boolean isListValue() {
-            return listValue;
-        }
-
-        public String getTypeHandler() {
-            return typeHandler;
-        }
-
-        protected Criterion(String condition) {
-            super();
-            this.condition = condition;
-            this.typeHandler = null;
-            this.noValue = true;
-        }
-
-        protected Criterion(String condition, Object value, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.typeHandler = typeHandler;
-            if (value instanceof List<?>) {
-                this.listValue = true;
-            } else {
-                this.singleValue = true;
-            }
-        }
-
-        protected Criterion(String condition, Object value) {
-            this(condition, value, null);
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.secondValue = secondValue;
-            this.typeHandler = typeHandler;
-            this.betweenValue = true;
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue) {
-            this(condition, value, secondValue, null);
-        }
-    }
-}

+ 11 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/CouponService.java

@@ -0,0 +1,11 @@
+package com.platform.yijia.service;
+
+
+import com.platform.yijia.pojo.Coupon;
+
+public interface CouponService {
+
+    //获取加油券信息
+    Coupon selectCouponInfo(Coupon coupon);
+
+}

+ 20 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/impl/CouponServiceImpl.java

@@ -0,0 +1,20 @@
+package com.platform.yijia.service.impl;
+
+import com.platform.yijia.dao.CouponMapper;
+import com.platform.yijia.pojo.Coupon;
+import com.platform.yijia.service.CouponService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service("couponService")
+public class CouponServiceImpl implements CouponService {
+    @Resource
+    private CouponMapper couponMapper;
+
+    //获取加油券信息
+    @Override
+    public Coupon selectCouponInfo(Coupon coupon) {
+        return couponMapper.selectCouponInfo(coupon);
+    }
+}

+ 29 - 343
YijiaRestful/src/main/resources/mapper/CouponMapper.xml

@@ -2,350 +2,36 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.platform.yijia.dao.CouponMapper">
   <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.Coupon">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <id column="coupon_id" jdbcType="INTEGER" property="couponId" />
-    <result column="station_no" jdbcType="VARCHAR" property="stationNo" />
-    <result column="station_name" jdbcType="VARCHAR" property="stationName" />
-    <result column="coupon_name" jdbcType="VARCHAR" property="couponName" />
-    <result column="coupon_rule" jdbcType="VARCHAR" property="couponRule" />
-    <result column="coupon_type" jdbcType="CHAR" property="couponType" />
-    <result column="coupon_amt" jdbcType="DOUBLE" property="couponAmt" />
-    <result column="coupon_reul_amt" jdbcType="DOUBLE" property="couponReulAmt" />
-    <result column="coupon_oil" jdbcType="VARCHAR" property="couponOil" />
-    <result column="validity_date" jdbcType="DATE" property="validityDate" />
+    <id column="id"                           jdbcType="INTEGER"   property="couponId" />
+    <result column="coupon_name"              jdbcType="VARCHAR"   property="couponName" />
+    <result column="coupon_type"              jdbcType="VARCHAR"   property="couponType" />
+    <result column="coupon_threshold_amt"     jdbcType="DECIMAL"   property="couponThresholdAmt" />
+    <result column="oil_type"                 jdbcType="VARCHAR"   property="oilType" />
+    <result column="coupon_amt"               jdbcType="VARCHAR"   property="couponAmt" />
+    <result column="coupon_num"               jdbcType="INTEGER"   property="couponNum" />
+    <result column="effective_time_type"      jdbcType="VARCHAR"   property="effectiveTimeType" />
+    <result column="effective_time_start"     jdbcType="TIMESTAMP" property="effectiveTimeStart" />
+    <result column="effective_time_end"       jdbcType="TIMESTAMP" property="effectiveTimeEnd" />
+    <result column="effective_day_num"        jdbcType="INTEGER"   property="effectiveDayNum" />
+    <result column="coupon_receive_num"       jdbcType="INTEGER"   property="couponReceiveNum" />
+    <result column="open_platform"            jdbcType="VARCHAR"   property="openPlatform" />
+    <result column="grant_status"             jdbcType="VARCHAR"   property="grantStatus" />
+    <result column="status"                   jdbcType="VARCHAR"   property="status" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
+
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    coupon_id, station_no, station_name, coupon_name, coupon_rule, coupon_type, coupon_amt, 
-    coupon_reul_amt, coupon_oil, validity_date
+    id, coupon_name, coupon_type, coupon_threshold_amt, oil_type, coupon_amt, coupon_num, effective_time_type,
+    effective_time_start, effective_time_end, effective_day_num, coupon_receive_num, open_platform, grant_status, status
   </sql>
-  <select id="selectByExample" parameterType="com.platform.yijia.pojo.CouponExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from coupon
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from coupon
-    where coupon_id = #{couponId,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    delete from coupon
-    where coupon_id = #{couponId,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.platform.yijia.pojo.CouponExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    delete from coupon
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.platform.yijia.pojo.Coupon">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into coupon (coupon_id, station_no, station_name, 
-      coupon_name, coupon_rule, coupon_type, 
-      coupon_amt, coupon_reul_amt, coupon_oil, 
-      validity_date)
-    values (#{couponId,jdbcType=INTEGER}, #{stationNo,jdbcType=VARCHAR}, #{stationName,jdbcType=VARCHAR}, 
-      #{couponName,jdbcType=VARCHAR}, #{couponRule,jdbcType=VARCHAR}, #{couponType,jdbcType=CHAR}, 
-      #{couponAmt,jdbcType=DOUBLE}, #{couponReulAmt,jdbcType=DOUBLE}, #{couponOil,jdbcType=VARCHAR}, 
-      #{validityDate,jdbcType=DATE})
-  </insert>
-  <insert id="insertSelective" parameterType="com.platform.yijia.pojo.Coupon">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into coupon
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="couponId != null">
-        coupon_id,
-      </if>
-      <if test="stationNo != null">
-        station_no,
-      </if>
-      <if test="stationName != null">
-        station_name,
-      </if>
-      <if test="couponName != null">
-        coupon_name,
-      </if>
-      <if test="couponRule != null">
-        coupon_rule,
-      </if>
-      <if test="couponType != null">
-        coupon_type,
-      </if>
-      <if test="couponAmt != null">
-        coupon_amt,
-      </if>
-      <if test="couponReulAmt != null">
-        coupon_reul_amt,
-      </if>
-      <if test="couponOil != null">
-        coupon_oil,
-      </if>
-      <if test="validityDate != null">
-        validity_date,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="couponId != null">
-        #{couponId,jdbcType=INTEGER},
-      </if>
-      <if test="stationNo != null">
-        #{stationNo,jdbcType=VARCHAR},
-      </if>
-      <if test="stationName != null">
-        #{stationName,jdbcType=VARCHAR},
-      </if>
-      <if test="couponName != null">
-        #{couponName,jdbcType=VARCHAR},
-      </if>
-      <if test="couponRule != null">
-        #{couponRule,jdbcType=VARCHAR},
-      </if>
-      <if test="couponType != null">
-        #{couponType,jdbcType=CHAR},
-      </if>
-      <if test="couponAmt != null">
-        #{couponAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="couponReulAmt != null">
-        #{couponReulAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="couponOil != null">
-        #{couponOil,jdbcType=VARCHAR},
-      </if>
-      <if test="validityDate != null">
-        #{validityDate,jdbcType=DATE},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.platform.yijia.pojo.CouponExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select count(*) from coupon
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
+  <!--获取加油券信息-->
+  <select id="selectCouponInfo" parameterType="com.platform.yijia.pojo.Coupon" resultMap="BaseResultMap">
+        SELECT
+            <include refid="Base_Column_List"/>
+        <where>
+          <if test="id !=null">
+            id = #{id}
+          </if>
+        </where>
   </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update coupon
-    <set>
-      <if test="record.couponId != null">
-        coupon_id = #{record.couponId,jdbcType=INTEGER},
-      </if>
-      <if test="record.stationNo != null">
-        station_no = #{record.stationNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.stationName != null">
-        station_name = #{record.stationName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.couponName != null">
-        coupon_name = #{record.couponName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.couponRule != null">
-        coupon_rule = #{record.couponRule,jdbcType=VARCHAR},
-      </if>
-      <if test="record.couponType != null">
-        coupon_type = #{record.couponType,jdbcType=CHAR},
-      </if>
-      <if test="record.couponAmt != null">
-        coupon_amt = #{record.couponAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="record.couponReulAmt != null">
-        coupon_reul_amt = #{record.couponReulAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="record.couponOil != null">
-        coupon_oil = #{record.couponOil,jdbcType=VARCHAR},
-      </if>
-      <if test="record.validityDate != null">
-        validity_date = #{record.validityDate,jdbcType=DATE},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update coupon
-    set coupon_id = #{record.couponId,jdbcType=INTEGER},
-      station_no = #{record.stationNo,jdbcType=VARCHAR},
-      station_name = #{record.stationName,jdbcType=VARCHAR},
-      coupon_name = #{record.couponName,jdbcType=VARCHAR},
-      coupon_rule = #{record.couponRule,jdbcType=VARCHAR},
-      coupon_type = #{record.couponType,jdbcType=CHAR},
-      coupon_amt = #{record.couponAmt,jdbcType=DOUBLE},
-      coupon_reul_amt = #{record.couponReulAmt,jdbcType=DOUBLE},
-      coupon_oil = #{record.couponOil,jdbcType=VARCHAR},
-      validity_date = #{record.validityDate,jdbcType=DATE}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.platform.yijia.pojo.Coupon">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update coupon
-    <set>
-      <if test="stationNo != null">
-        station_no = #{stationNo,jdbcType=VARCHAR},
-      </if>
-      <if test="stationName != null">
-        station_name = #{stationName,jdbcType=VARCHAR},
-      </if>
-      <if test="couponName != null">
-        coupon_name = #{couponName,jdbcType=VARCHAR},
-      </if>
-      <if test="couponRule != null">
-        coupon_rule = #{couponRule,jdbcType=VARCHAR},
-      </if>
-      <if test="couponType != null">
-        coupon_type = #{couponType,jdbcType=CHAR},
-      </if>
-      <if test="couponAmt != null">
-        coupon_amt = #{couponAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="couponReulAmt != null">
-        coupon_reul_amt = #{couponReulAmt,jdbcType=DOUBLE},
-      </if>
-      <if test="couponOil != null">
-        coupon_oil = #{couponOil,jdbcType=VARCHAR},
-      </if>
-      <if test="validityDate != null">
-        validity_date = #{validityDate,jdbcType=DATE},
-      </if>
-    </set>
-    where coupon_id = #{couponId,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.platform.yijia.pojo.Coupon">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update coupon
-    set station_no = #{stationNo,jdbcType=VARCHAR},
-      station_name = #{stationName,jdbcType=VARCHAR},
-      coupon_name = #{couponName,jdbcType=VARCHAR},
-      coupon_rule = #{couponRule,jdbcType=VARCHAR},
-      coupon_type = #{couponType,jdbcType=CHAR},
-      coupon_amt = #{couponAmt,jdbcType=DOUBLE},
-      coupon_reul_amt = #{couponReulAmt,jdbcType=DOUBLE},
-      coupon_oil = #{couponOil,jdbcType=VARCHAR},
-      validity_date = #{validityDate,jdbcType=DATE}
-    where coupon_id = #{couponId,jdbcType=INTEGER}
-  </update>
-</mapper>
+
+</mapper>