zhangxu
2022-12-05 8d2e92fd940f3eff60568efb7dafe32b1b80cde4
部分退款
2个文件已添加
121 ■■■■■ 已修改文件
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/RefundRecordCouponMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/platform/RefundRecordCouponMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/dao/mapper/RefundRecordCouponMapper.java
New file
@@ -0,0 +1,35 @@
package com.hx.phip.dao.mapper;
import java.util.List;
import java.util.Map;
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.model.refund.RefundRecordCoupon;
public interface RefundRecordCouponMapper {
    /**新增,返回主键*/
    int insert(RefundRecordCoupon refundRecordCoupon);
    /**查询条数*/
    int selectCount(SqlSentence sqlSentence);
    /**查询条数*/
    int selectCountSql(SqlSentence sqlSentence);
    /**查询列表,返回实体类的List*/
    List<RefundRecordCoupon> selectList(SqlSentence sqlSentence);
    /**查询列表,返回Map的List*/
    List<Map<String,Object>> selectListMap(SqlSentence sqlSentence);
    /**查询,返回单个实体*/
    RefundRecordCoupon selectOne(SqlSentence sqlSentence);
    /**查询,返回单个map*/
    Map<String,Object> selectOneMap(SqlSentence sqlSentence);
    /**查询,返回实体类没有大数据的*/
    RefundRecordCoupon selectOneByKey(Object object);
    /**查询,返回实体类有大数据的*/
    RefundRecordCoupon selectOneByKeyBlob(Object object);
    /**更新,返回更新数量*/
    int updateWhere(SqlSentence sqlSentence);
    /**更新,返回更新数量*/
    int updateAll(RefundRecordCoupon refundRecordCoupon);
    /**删除,返回删除数量*/
    int deleteWhere(SqlSentence sqlSentence);
    /**删除,返回删除数量*/
    int deleteById(Object object);
}
phi_platform_common/src/main/resources/mapper/platform/RefundRecordCouponMapper.xml
New file
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
<mapper namespace="com.hx.phip.dao.mapper.RefundRecordCouponMapper">
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,orderId = #{orderId},refundRecordId = #{refundRecordId},userId = #{userId},refundNum = #{refundNum},realRefundNum = #{realRefundNum},couponOrderId = #{couponOrderId},couponId = #{couponId},couponTitle = #{couponTitle},couponNumberId = #{couponNumberId},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
        </trim>
    </sql>
    <!--  后续通过  namespace.id-->
    <!--parameterType:输入参数的类型
    resultType:查询返回结果值的类型  ,返回类型  -->
    <insert id="insert" parameterType="com.hx.phiappt.model.refund.RefundRecordCoupon">
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into refund_record_coupon (id,orderId,refundRecordId,userId,refundNum,realRefundNum,couponOrderId,couponId,couponTitle,couponNumberId,isDel,createTime,editTime)  values (#{id},#{orderId},#{refundRecordId},#{userId},#{refundNum},#{realRefundNum},#{couponOrderId},#{couponId},#{couponTitle},#{couponNumberId},#{isDel},#{createTime},#{editTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.refund.RefundRecordCoupon" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectOne" resultType="com.hx.phiappt.model.refund.RefundRecordCoupon" parameterType="com.hx.mybatisTool.SqlSentence" >
        ${sqlSentence}
    </select>
    <select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
    </select>
    <select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            select
                COUNT(*)
            from refund_record_coupon
                WHERE ${sqlSentence}
    </select>
    <select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
            ${sqlSentence}
     </select>
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.refund.RefundRecordCoupon" parameterType="java.lang.Object" >
        select
            id,orderId,refundRecordId,userId,refundNum,realRefundNum,couponOrderId,couponId,couponTitle,couponNumberId,isDel,createTime,editTime
        from refund_record_coupon
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.refund.RefundRecordCoupon" parameterType="java.lang.Object" >
        select
            id,orderId,refundRecordId,userId,refundNum,realRefundNum,couponOrderId,couponId,couponTitle,couponNumberId,isDel,createTime,editTime
        from refund_record_coupon
        WHERE id = #{value}
    </select>
    <update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
        update
            refund_record_coupon
        SET ${sqlSentence}
    </update>
    <update id="updateAll" parameterType="com.hx.phiappt.model.refund.RefundRecordCoupon">
        update refund_record_coupon
            SET <include refid="Update_Column_All"/>
        WHERE id = #{id}
    </update>
    <delete id="deleteWhere"  parameterType="com.hx.mybatisTool.SqlSentence">
        delete from refund_record_coupon WHERE ${sqlSentence}
    </delete>
    <delete id="deleteById"  parameterType="java.lang.Object">
        delete from refund_record_coupon WHERE id = #{value}
    </delete>
</mapper>