Sfoglia il codice sorgente

添加储蓄卡充值接口

jk-GitHub-coder 4 anni fa
parent
commit
5a4926f84d

+ 57 - 1
YijiaRestful/src/main/java/com/platform/yijia/controller/ElectronicMembershipCardController.java

@@ -11,7 +11,10 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
+import java.util.Random;
 
 
 /*
 /*
  * <Title> ElectronicMembershipCardController </Title>
  * <Title> ElectronicMembershipCardController </Title>
@@ -52,7 +55,60 @@ public class ElectronicMembershipCardController {
         //返回结果集
         //返回结果集
         ResultData resultData = null;
         ResultData resultData = null;
         if(rechargeBalance !=null){
         if(rechargeBalance !=null){
-            resultData = ResultData.success("开发中...");
+            BigDecimal amt = new BigDecimal(rechargeBalance.getAmt());
+            BigDecimal presentAmt = new BigDecimal(rechargeBalance.getPresentAmt());
+            String cardOilsType = rechargeBalance.getCardOilsType();
+            String unionId = rechargeBalance.getUnionId();
+            String openId = rechargeBalance.getOpenId();    //公众号的openId
+            Integer stationId = rechargeBalance.getStationId();
+            String stationName = rechargeBalance.getStationName();
+            String customerName = rechargeBalance.getCustomerName();
+            //String mno = rechargeBalance.getMno();
+
+            //电子会员卡使用记录
+            CustomerCardUseRecord customerCardUseRecord = new CustomerCardUseRecord();
+            customerCardUseRecord.setUnionId(unionId);
+            customerCardUseRecord.setStationId(stationId);
+            customerCardUseRecord.setAmt(amt);
+            customerCardUseRecord.setPresentAmt(presentAmt);
+            customerCardUseRecord.setCardOilsType(cardOilsType);
+            customerCardUseRecord.setStationName(stationName);
+            customerCardUseRecord.setCustomerName(customerName);
+            customerCardUseRecord.setUsageType("+");
+            customerCardUseRecord.setType("1");      //1表示微信
+            customerCardUseRecord.setCreateTime(new Date());
+            //订单规则 时间+6位随机数
+            Random random = new Random();
+            String str="";
+            for(int i=0; i<6; i++){
+                str+=random.nextInt(10);
+            }
+            String orderNo = System.nanoTime()+str;
+            customerCardUseRecord.setOrderNo(orderNo);
+
+            //电子会员卡
+            CustomerElectronicCard customerElectronicCard = new CustomerElectronicCard();
+//            customerElectronicCard.setUnionId(unionId);
+//            customerElectronicCard.setStationId(stationId);
+//            customerElectronicCard.setCardOilsType(cardOilsType);
+            customerElectronicCard.setId(rechargeBalance.getId());
+            customerElectronicCard.setRecentlyTime(new Date());
+
+            //获取当前用户要充值的的电子会员卡信息
+            CustomerElectronicCard electronicCardInfo = electronicMembershipCardService.getElectronicCardInfo(customerElectronicCard);
+            if(electronicCardInfo != null){
+                BigDecimal amtBalance = electronicCardInfo.getAmt();        //用户当前卡内余额
+                if(presentAmt !=null){  //有赠送金额时
+                    customerElectronicCard.setAmt(amtBalance.add(presentAmt).add(amt));
+                }else { //无赠送金额时
+                    customerElectronicCard.setAmt(amtBalance.add(amt));
+                }
+                electronicMembershipCardService.updateElectronicCardInfo(customerElectronicCard);   //更新电子会员看余额信息
+                electronicMembershipCardService.insetCardUseRecord(customerCardUseRecord);      //插入电子会员卡的使用记录
+                resultData = ResultData.success(CodeMsg.SUCCESS);
+            }else {
+                resultData = ResultData.error(CodeMsg.USER_EXSIST_CARD);
+            }
         }else {
         }else {
             resultData = ResultData.error(CodeMsg.REQUEST_FAIL);
             resultData = ResultData.error(CodeMsg.REQUEST_FAIL);
         }
         }

+ 18 - 0
YijiaRestful/src/main/java/com/platform/yijia/controller/IntegralShoppingMallController.java

@@ -69,6 +69,24 @@ public class IntegralShoppingMallController {
         return gson.toJson(resultData);
         return gson.toJson(resultData);
     }
     }
 
 
+    //获取油站积分商品详情信息
+    @RequestMapping(value = "/getIntegralWaresInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public String getIntegralWaresInfo(@RequestParam Integer id){
+        Gson gson =new Gson();
+        //返回结果集
+        ResultData resultData = null;
+        if(id !=null){
+            IntegralWares integralWares = new IntegralWares();
+            integralWares.setId(id);
+            IntegralWares integralWaresInfo = integralWaresService.getIntegralWaresInfo(integralWares);
+            resultData=ResultData.success(integralWaresInfo);
+        }else{
+            resultData=ResultData.error(CodeMsg.REQUEST_FAIL);
+        }
+        return gson.toJson(resultData);
+    }
+
 
 
     //获取油站积分商品信息
     //获取油站积分商品信息
     @RequestMapping(value = "/getIntegralWaresInfoList", method = RequestMethod.GET)
     @RequestMapping(value = "/getIntegralWaresInfoList", method = RequestMethod.GET)

+ 10 - 0
YijiaRestful/src/main/java/com/platform/yijia/dao/ElectronicMembershipCardMapper.java

@@ -11,6 +11,16 @@ public interface ElectronicMembershipCardMapper {
     //获取用户储蓄卡列表
     //获取用户储蓄卡列表
     List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard);
     List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard);
 
 
+    //获取活用要充值电子会员卡的信息
+    CustomerElectronicCard getElectronicCardInfo(CustomerElectronicCard customerElectronicCard);
+
+    //更新电子会员卡信息
+    void updateElectronicCardInfo(CustomerElectronicCard customerElectronicCard);
+
     //获取用户储蓄卡的使用记录
     //获取用户储蓄卡的使用记录
     List<CustomerCardUseRecord> getCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
     List<CustomerCardUseRecord> getCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
+
+    //新增电子会员卡使用记录
+    void insetCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
 }
 }

+ 3 - 0
YijiaRestful/src/main/java/com/platform/yijia/dao/IntegralWaresMapper.java

@@ -9,6 +9,9 @@ public interface IntegralWaresMapper {
     //获取油站积分商品信息
     //获取油站积分商品信息
     List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares);
     List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares);
 
 
+    //获取商品详情信息
+    IntegralWares getIntegralWaresInfo(IntegralWares integralWares);
+
     //更新商品
     //更新商品
     void updateIntegralWaresInfo(IntegralWares integralWares);
     void updateIntegralWaresInfo(IntegralWares integralWares);
 }
 }

+ 6 - 1
YijiaRestful/src/main/java/com/platform/yijia/param/request/RechargeBalance.java

@@ -9,11 +9,16 @@ import java.math.BigDecimal;
  */
  */
 @Data
 @Data
 public class RechargeBalance {
 public class RechargeBalance {
+    private Integer id;
     private String orderNo;
     private String orderNo;
-    private String oilsType;    //油类:1.柴油; 2.汽油
+    private String cardOilsType;    //油类:1.柴油; 2.汽油
     private String openId;
     private String openId;
+    private String unionId;     //微信用户唯一标识
+    private String presentAmt;      //优惠金额
+    private String customerName;    //用户名称
     private String amt;     //实收金额
     private String amt;     //实收金额
     private Integer stationId;
     private Integer stationId;
+    private String stationName;     //油站名称
     private String status;
     private String status;
     private String orderLiters;
     private String orderLiters;
     private String payType;
     private String payType;

+ 1 - 1
YijiaRestful/src/main/java/com/platform/yijia/pojo/CustomerCardUseRecord.java

@@ -16,7 +16,7 @@ public class CustomerCardUseRecord {
     private String customerName;    //''客户名'',
     private String customerName;    //''客户名'',
     private String usageType;            //'电子会员卡消费充值类型:+,充值;-,消费;',
     private String usageType;            //'电子会员卡消费充值类型:+,充值;-,消费;',
     private String type;      //'电子会员卡充值消费类型:1.微信;2.POS机',
     private String type;      //'电子会员卡充值消费类型:1.微信;2.POS机',
-    private String oilsType;        //油类:1.柴油;2.汽油;
+    private String cardOilsType;        //油类:1.柴油;2.汽油;
     private BigDecimal amt;         //'充值,消费金额'
     private BigDecimal amt;         //'充值,消费金额'
     private BigDecimal presentAmt;     //''赠送金额''
     private BigDecimal presentAmt;     //''赠送金额''
     private Date createTime;            //'记录时间'
     private Date createTime;            //'记录时间'

+ 2 - 2
YijiaRestful/src/main/java/com/platform/yijia/pojo/CustomerElectronicCard.java

@@ -15,8 +15,8 @@ public class CustomerElectronicCard {
     private String blogOpenid;      //公众号openId
     private String blogOpenid;      //公众号openId
     private String customerNo;      //会员编号
     private String customerNo;      //会员编号
     private String customerName;    //客户名称
     private String customerName;    //客户名称
-    private BigDecimal balance;     //客户余额
-    private String cardType;        //电子会员卡类型:1,柴油;2.汽油
+    private BigDecimal amt;     //客户余额
+    private String cardOilsType;        //电子会员卡类型:1,柴油;2.汽油
     private Integer stationId;      //油站ID
     private Integer stationId;      //油站ID
     private String stationName;     //油站
     private String stationName;     //油站
     private Date createTime;        //创建时间
     private Date createTime;        //创建时间

+ 9 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/ElectronicMembershipCardService.java

@@ -10,7 +10,16 @@ public interface ElectronicMembershipCardService {
     //获取用户储蓄卡列表
     //获取用户储蓄卡列表
     List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard);
     List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard);
 
 
+    //获取活用要充值电子会员卡的信息
+    CustomerElectronicCard getElectronicCardInfo(CustomerElectronicCard customerElectronicCard);
+
+    //更新电子会员卡信息
+    void updateElectronicCardInfo(CustomerElectronicCard customerElectronicCard);
+
     //获取用户储蓄卡的使用记录
     //获取用户储蓄卡的使用记录
     List<CustomerCardUseRecord> getCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
     List<CustomerCardUseRecord> getCardUseRecordList(CustomerCardUseRecord customerCardUseRecord);
 
 
+    //新增电子会员卡使用记录
+    void insetCardUseRecord(CustomerCardUseRecord customerCardUseRecord);
+
 }
 }

+ 3 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/IntegralWaresService.java

@@ -10,6 +10,9 @@ public interface IntegralWaresService {
     //获取油站积分商品信息
     //获取油站积分商品信息
     List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares);
     List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares);
 
 
+    //获取商品详情信息
+    IntegralWares getIntegralWaresInfo(IntegralWares integralWares);
+
     //更新商品
     //更新商品
     void updateIntegralWaresInfo(IntegralWares integralWares);
     void updateIntegralWaresInfo(IntegralWares integralWares);
 
 

+ 18 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/impl/ElectronicMembershipCardServiceImpl.java

@@ -28,4 +28,22 @@ public class ElectronicMembershipCardServiceImpl implements ElectronicMembership
     public List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard) {
     public List<CustomerElectronicCard> getElectronicCardList(CustomerElectronicCard customerElectronicCard) {
         return electronicMembershipCardMapper.getElectronicCardList(customerElectronicCard);
         return electronicMembershipCardMapper.getElectronicCardList(customerElectronicCard);
     }
     }
+
+    //更新电子会员卡(储蓄卡)的信息
+    @Override
+    public void updateElectronicCardInfo(CustomerElectronicCard customerElectronicCard) {
+        electronicMembershipCardMapper.updateElectronicCardInfo(customerElectronicCard);
+    }
+
+    //新增电子会员卡的使用记录
+    @Override
+    public void insetCardUseRecord(CustomerCardUseRecord customerCardUseRecord) {
+        electronicMembershipCardMapper.insetCardUseRecord(customerCardUseRecord);
+    }
+
+    //获取活用要充值电子会员卡的信息
+    @Override
+    public CustomerElectronicCard getElectronicCardInfo(CustomerElectronicCard customerElectronicCard) {
+        return electronicMembershipCardMapper.getElectronicCardInfo(customerElectronicCard);
+    }
 }
 }

+ 6 - 0
YijiaRestful/src/main/java/com/platform/yijia/service/impl/IntegralWaresServiceImpl.java

@@ -12,6 +12,12 @@ public class IntegralWaresServiceImpl implements IntegralWaresService {
     @Resource
     @Resource
     private IntegralWaresMapper integralWaresMapper;
     private IntegralWaresMapper integralWaresMapper;
 
 
+    //获取商品详情信息
+    @Override
+    public IntegralWares getIntegralWaresInfo(IntegralWares integralWares) {
+        return integralWaresMapper.getIntegralWaresInfo(integralWares);
+    }
+
     //获取油站积分商品信息
     //获取油站积分商品信息
     @Override
     @Override
     public List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares) {
     public List<IntegralWares> getIntegralWaresInfoList(IntegralWares integralWares) {

+ 1 - 0
YijiaRestful/src/main/java/com/platform/yijia/utils/CodeMsg.java

@@ -8,6 +8,7 @@ public class CodeMsg {
     public static CodeMsg SUCCESS = new CodeMsg(0,"success");
     public static CodeMsg SUCCESS = new CodeMsg(0,"success");
     public static CodeMsg SERVER_EXCEPTION = new CodeMsg(500100,"服务端异常");
     public static CodeMsg SERVER_EXCEPTION = new CodeMsg(500100,"服务端异常");
     public static CodeMsg USER_NOT_EXSIST = new CodeMsg(-1,"用户不存在");
     public static CodeMsg USER_NOT_EXSIST = new CodeMsg(-1,"用户不存在");
+    public static CodeMsg USER_EXSIST_CARD = new CodeMsg(-1,"该用户暂无此卡");
     public static CodeMsg USER_EXSIST = new CodeMsg(-1,"用户已存在");
     public static CodeMsg USER_EXSIST = new CodeMsg(-1,"用户已存在");
     public static CodeMsg PASSWORD_ERROR = new CodeMsg(-2,"密码错误");
     public static CodeMsg PASSWORD_ERROR = new CodeMsg(-2,"密码错误");
     public static CodeMsg ACCOUNT_DISABLE = new CodeMsg(-3,"该账号已被停用");
     public static CodeMsg ACCOUNT_DISABLE = new CodeMsg(-3,"该账号已被停用");

+ 148 - 29
YijiaRestful/src/main/resources/mapper/ElectronicMembershipCardMapper.xml

@@ -8,8 +8,8 @@
       <result column="blog_openid"             jdbcType="VARCHAR"   property="blogOpenid" />
       <result column="blog_openid"             jdbcType="VARCHAR"   property="blogOpenid" />
       <result column="customer_no"             jdbcType="VARCHAR"   property="customerNo" />
       <result column="customer_no"             jdbcType="VARCHAR"   property="customerNo" />
       <result column="customer_name"           jdbcType="VARCHAR"   property="customerName" />
       <result column="customer_name"           jdbcType="VARCHAR"   property="customerName" />
-      <result column="balance"                 jdbcType="DECIMAL"   property="balance" />
-      <result column="card_type"               jdbcType="VARCHAR"   property="cardType" />
+      <result column="amt"                     jdbcType="DECIMAL"   property="amt" />
+      <result column="card_oils_type"               jdbcType="VARCHAR"   property="cardOilsType" />
       <result column="station_id"              jdbcType="INTEGER"   property="stationId" />
       <result column="station_id"              jdbcType="INTEGER"   property="stationId" />
       <result column="station_name"            jdbcType="VARCHAR"   property="stationName" />
       <result column="station_name"            jdbcType="VARCHAR"   property="stationName" />
       <result column="create_time"             jdbcType="TIMESTAMP" property="createTime" />
       <result column="create_time"             jdbcType="TIMESTAMP" property="createTime" />
@@ -24,7 +24,7 @@
         <result column="customer_name"         jdbcType="VARCHAR"   property="customerName" />
         <result column="customer_name"         jdbcType="VARCHAR"   property="customerName" />
         <result column="usage_type"            jdbcType="VARCHAR"   property="usageType" />
         <result column="usage_type"            jdbcType="VARCHAR"   property="usageType" />
         <result column="type"                  jdbcType="VARCHAR"   property="type" />
         <result column="type"                  jdbcType="VARCHAR"   property="type" />
-        <result column="oils_type"             jdbcType="VARCHAR"   property="oilsType" />
+        <result column="card_oils_type"        jdbcType="VARCHAR"   property="cardOilsType" />
         <result column="amt"                   jdbcType="DECIMAL"   property="amt" />
         <result column="amt"                   jdbcType="DECIMAL"   property="amt" />
         <result column="present_amt"           jdbcType="DECIMAL"   property="presentAmt" />
         <result column="present_amt"           jdbcType="DECIMAL"   property="presentAmt" />
         <result column="create_time"           jdbcType="TIMESTAMP" property="createTime" />
         <result column="create_time"           jdbcType="TIMESTAMP" property="createTime" />
@@ -32,6 +32,81 @@
         <result column="station_name"          jdbcType="VARCHAR"   property="stationName" />
         <result column="station_name"          jdbcType="VARCHAR"   property="stationName" />
     </resultMap>
     </resultMap>
 
 
+    <!--插入用户电子会员卡的使用记录-->
+    <insert id="insetCardUseRecord" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord">
+        INSERT INTO customer_card_use_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo !=null">
+                order_no,
+            </if>
+            <if test="unionId !=null">
+                union_id,
+            </if>
+            <if test="customerName !=null">
+                customer_name,
+            </if>
+            <if test="usageType !=null">
+                usage_type,
+            </if>
+            <if test="type !=null">
+                type,
+            </if>
+            <if test="cardOilsType !=null">
+                card_oils_type,
+            </if>
+            <if test="amt !=null">
+                amt,
+            </if>
+            <if test="presentAmt !=null">
+                present_amt,
+            </if>
+            <if test="createTime !=null">
+                create_time,
+            </if>
+            <if test="stationId !=null">
+                station_id,
+            </if>
+            <if test="stationName !=null">
+                station_name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderNo !=null">
+                #{orderNo},
+            </if>
+            <if test="unionId !=null">
+                #{unionId},
+            </if>
+            <if test="customerName !=null">
+                #{customerName},
+            </if>
+            <if test="usageType !=null">
+                #{usageType},
+            </if>
+            <if test="type !=null">
+                #{type},
+            </if>
+            <if test="cardOilsType !=null">
+                #{cardOilsType},
+            </if>
+            <if test="amt !=null">
+                #{amt},
+            </if>
+            <if test="presentAmt !=null">
+                #{presentAmt},
+            </if>
+            <if test="createTime !=null">
+                #{create_time},
+            </if>
+            <if test="stationId !=null">
+                #{stationId},
+            </if>
+            <if test="stationName !=null">
+                #{stationName},
+            </if>
+        </trim>
+    </insert>
+
     <!--查询客户电子会员卡的使用记录-->
     <!--查询客户电子会员卡的使用记录-->
     <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord">
     <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord">
          SELECT
          SELECT
@@ -41,7 +116,7 @@
             customer_name,
             customer_name,
             usage_type,
             usage_type,
             type,
             type,
-            oils_type,
+            card_oils_type,
             amt,
             amt,
             present_amt,
             present_amt,
             create_time,
             create_time,
@@ -60,34 +135,78 @@
                 AND union_id = #{unionId}
                 AND union_id = #{unionId}
             </if>
             </if>
         </where>
         </where>
+        ORDER BY create_time DESC
     </select>
     </select>
 
 
 
 
-  <!--查询用户储蓄卡-->
-  <select id="getElectronicCardList" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
-    SELECT
-        id,
-        union_id,
-        blog_openid,
-        customer_no,
-        customer_name,
-        balance,
-        card_type,
-        station_id,
-        station_name,
-        create_time,
-        recently_time
-    FROM
-        customer_electronic_card
-    <where>
-          <if test="stationId !=null and stationId !=''">
-             station_id = #{stationId}
-          </if>
-          <if test="unionId !=null and unionId !=''">
-            AND union_id = #{unionId}
-          </if>
-    </where>
-  </select>
+    <!--查询用户所拥有的储蓄卡-->
+    <select id="getElectronicCardList" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
+        SELECT
+            id,
+            union_id,
+            blog_openid,
+            customer_no,
+            customer_name,
+            amt,
+            card_oils_type,
+            station_id,
+            station_name,
+            create_time,
+            recently_time
+        FROM
+            customer_electronic_card
+        <where>
+              <if test="stationId !=null and stationId !=''">
+                 station_id = #{stationId}
+              </if>
+              <if test="unionId !=null and unionId !=''">
+                AND union_id = #{unionId}
+              </if>
+              <if test="cardOilsType !=null and cardOilsType !=''">
+                AND card_oils_type = #{cardOilsType}
+              </if>
+        </where>
+    </select>
 
 
+    <!--获取用户用要充值电子会员卡(储蓄卡)信息-->
+    <select id="getElectronicCardInfo" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
+        SELECT
+            id,
+            union_id,
+            blog_openid,
+            customer_no,
+            customer_name,
+            amt,
+            card_oils_type,
+            station_id,
+            station_name,
+            create_time,
+            recently_time
+        FROM
+            customer_electronic_card
+        <where>
+            <if test="id !=null and id !=''">
+                id = #{id}
+            </if>
+        </where>
+    </select>
 
 
+    <!--更新用户的电子会员卡的信息-->
+    <update id="updateElectronicCardInfo" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
+        UPDATE
+            customer_electronic_card
+        <set>
+            <if test="amt !=null">
+                amt = #{amt},
+            </if>
+            <if test="recentlyTime !=null">
+                recently_time = #{recentlyTime}
+            </if>
+        </set>
+        <where>
+            <if test="id !=null and id != ''">
+                id = #{id}
+            </if>
+        </where>
+    </update>
 </mapper>
 </mapper>

+ 13 - 0
YijiaRestful/src/main/resources/mapper/IntegralWaresMapper.xml

@@ -44,6 +44,19 @@
     </where>
     </where>
   </select>
   </select>
 
 
+  <!--查询油站商品信息-->
+  <select id="getIntegralWaresInfo" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.IntegralWares">
+    SELECT
+        <include refid="Base_Column_List" />
+    FROM integral_wares
+    <where>
+      wares_status = "1"
+      <if test="id !=null and id !=''">
+        AND id = #{id}
+      </if>
+    </where>
+  </select>
+
   <!--更新油站商品已售数量-->
   <!--更新油站商品已售数量-->
   <update id="updateIntegralWaresInfo" parameterType="com.platform.yijia.pojo.IntegralWares">
   <update id="updateIntegralWaresInfo" parameterType="com.platform.yijia.pojo.IntegralWares">
     UPDATE
     UPDATE