admin
2019-05-31 4e2381fe3f9228d89ba82c703416b10da6dfdf64
提现增加资金预测
13个文件已修改
3个文件已添加
1050 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/HongBaoOrderMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/money/ExtractOrderStatisticDTO.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ExtractAuditRecord.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractAuditRecordMapper.xml 670 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/GoodsSubClassMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/HongBaoOrderMapper.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushInfoMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderUserStatisticServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ExtractAuditRecordServiceImpl.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ExtractServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderUserStatisticService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -398,6 +398,19 @@
                    }
                }
                if (record.getExtraInfo() != null) {
                    if (record.getExtraInfo().getOrderCount50More() > 0
                            || record.getExtraInfo().getWeiQuanOrderCount() > 0
                            || record.getExtraInfo().getWeiQuanOrderFanAmount().compareTo(new BigDecimal(0)) > 0)
                        warnLevel = 2;
                    StringBuffer desc = new StringBuffer();
                    desc.append("大于50元订单:" + record.getExtraInfo().getOrderCount50More() + "\n#");
                    desc.append("维权订单数:" + record.getExtraInfo().getWeiQuanOrderCount() + "\n#");
                    desc.append("维权订单退回金额:" + record.getExtraInfo().getWeiQuanOrderFanAmount() + "\n#");
                    desc.append("180天安全订单数:" + record.getExtraInfo().getSafeOrderCount());
                    record.setExtraInfoStr(desc.toString());
                }
                record.setWarnLevel(warnLevel);
            }
@@ -631,6 +644,18 @@
                return;
            }
            for (ExtractAuditRecord record : list) {
                if (record.getExtraInfo() != null) {
                    StringBuffer desc = new StringBuffer();
                    desc.append("大于50元订单:" + record.getExtraInfo().getOrderCount50More() + "\n#");
                    desc.append("维权订单数:" + record.getExtraInfo().getWeiQuanOrderCount() + "\n#");
                    desc.append("维权订单退回金额:" + record.getExtraInfo().getWeiQuanOrderFanAmount() + "\n#");
                    desc.append("180天安全订单数:" + record.getExtraInfo().getSafeOrderCount());
                    record.setExtraInfoStr(desc.toString());
                }
            }
            int count = extractAuditRecordService.getByUidCount(uid);
            int totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -755,7 +755,7 @@
        data.put("error", "0");
        data.put("maxError", 1);
        String minMoney = configService.get(EXTRACT_MIN_MONEY); // 单笔提现的最小金额
        String maxMoney = configService.get(EXTRACT_MAX_MONEY); // 单笔提现的最大金额
        String maxMoney = configService.get("extract_money_day"); // 每日最大提现金额
        int maxDayCount = Integer.parseInt(configService.get("extract_count_day"));
        ExtractRecord extractRecord = extractRecordService.getExtractRecordByUid(uid);
        boolean canExtract = true;
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/HongBaoOrderMapper.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.dao.mybatis.order;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
@@ -53,4 +54,36 @@
    long countByOrderNoAndHongBaoType(@Param("orderNo") String orderNo, @Param("type") int type,
            @Param("sourceType") int sourceType);
    /**
     * 返利超过一定金额的订单数量
     *
     * @param uid
     * @return
     */
    public int countHongBaoOrderCountMoreByUid(@Param("money") BigDecimal money, @Param("uid") Long uid);
    /**
     * 维权订单数量(包含邀请赚)
     *
     * @param uid
     * @return
     */
    public int countWeiQuanOrderByUid(Long uid);
    /**
     * 维权订单返还的金额
     *
     * @param uid
     * @return
     */
    public BigDecimal sumWeiQuanOrderFanAmountByUid(Long uid);
    /**
     * 安全订单数量
     *
     * @param uid
     * @return
     */
    public int countSafeOrderByUid(Long uid);
}
fanli/src/main/java/com/yeshi/fanli/dto/money/ExtractOrderStatisticDTO.java
New file
@@ -0,0 +1,65 @@
package com.yeshi.fanli.dto.money;
import java.math.BigDecimal;
/**
 * 发起提现时的资金统计
 *
 * @author Administrator
 *
 */
public class ExtractOrderStatisticDTO {
    private int orderCount50More;// 返利超过超过50元的订单数量
    private int weiQuanOrderCount;// 维权订单数量
    private BigDecimal weiQuanOrderFanAmount;// 维权订单返还的金额
    private int safeOrderCount;// 安全订单数量
    public ExtractOrderStatisticDTO(int orderCount50More, int weiQuanOrderCount, BigDecimal weiQuanOrderFanAmount,
            int safeOrderCount) {
        this.orderCount50More = orderCount50More;
        this.weiQuanOrderCount = weiQuanOrderCount;
        this.weiQuanOrderFanAmount = weiQuanOrderFanAmount;
        this.safeOrderCount = safeOrderCount;
    }
    public ExtractOrderStatisticDTO() {
    }
    public int getOrderCount50More() {
        return orderCount50More;
    }
    public void setOrderCount50More(int orderCount50More) {
        this.orderCount50More = orderCount50More;
    }
    public int getWeiQuanOrderCount() {
        return weiQuanOrderCount;
    }
    public void setWeiQuanOrderCount(int weiQuanOrderCount) {
        this.weiQuanOrderCount = weiQuanOrderCount;
    }
    public BigDecimal getWeiQuanOrderFanAmount() {
        return weiQuanOrderFanAmount;
    }
    public void setWeiQuanOrderFanAmount(BigDecimal weiQuanOrderFanAmount) {
        this.weiQuanOrderFanAmount = weiQuanOrderFanAmount;
    }
    public int getSafeOrderCount() {
        return safeOrderCount;
    }
    public void setSafeOrderCount(int safeOrderCount) {
        this.safeOrderCount = safeOrderCount;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ExtractAuditRecord.java
@@ -6,6 +6,7 @@
import org.yeshi.utils.mybatis.Table;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.dto.money.ExtractOrderStatisticDTO;
import com.yeshi.fanli.entity.common.AdminUser;
/**
@@ -62,6 +63,28 @@
    @Expose // 风险等级
    private int warnLevel;
    
    @Expose
    private ExtractOrderStatisticDTO extraInfo;//extraInfoStr对象
    @Column(name = "extraInfo")
    private String extraInfoStr;//附加信息JSON格式
    public ExtractOrderStatisticDTO getExtraInfo() {
        return extraInfo;
    }
    public void setExtraInfo(ExtractOrderStatisticDTO extraInfo) {
        this.extraInfo = extraInfo;
    }
    public String getExtraInfoStr() {
        return extraInfoStr;
    }
    public void setExtraInfoStr(String extraInfoStr) {
        this.extraInfoStr = extraInfoStr;
    }
    public String getAuditRole() {
        return auditRole;
    }
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractAuditRecordMapper.xml
@@ -2,361 +2,413 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.ExtractAuditRecordMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
    <id column="id" property="id" jdbcType="BIGINT"/>
    <result column="beforeMoney" property="beforeMoney" jdbcType="DECIMAL"/>
    <result column="afterMoney" property="afterMoney" jdbcType="DECIMAL"/>
    <result column="countMoney" property="countMoney" jdbcType="DECIMAL"/>
    <result column="countNum" property="countNum" jdbcType="BIGINT"/>
    <result column="orderNum" property="orderNum" jdbcType="BIGINT"/>
     <result column="auditRole" property="auditRole" jdbcType="VARCHAR"/>
    <result column="cancelOrderNum" property="cancelOrderNum" jdbcType="BIGINT"/>
    <result column="auditTime" property="auditTime" jdbcType="BIGINT"/>
    <association property="adminUser" column="aid"
        select="com.yeshi.fanli.dao.mybatis.AdminUserMapper.selectByPrimaryKey">
    </association>
    <association property="extract" column="extractId"
        select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey">
    </association>
  </resultMap>
  <sql id="Base_Column_List">id,aid,extractId,beforeMoney,afterMoney,countMoney,countNum,orderNum,cancelOrderNum,auditTime,auditRole</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_extract_audit_record where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
      delete from yeshi_ec_extract_audit_record where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord"
      useGeneratedKeys="true" keyProperty="id">
      insert into yeshi_ec_extract_audit_record (id,aid,extractId,beforeMoney,afterMoney,countMoney,countNum,auditTime)
      values (#{id,jdbcType=BIGINT},#{adminUser.id,jdbcType=BIGINT},#{extract.id,jdbcType=BIGINT},
      #{beforeMoney,jdbcType=DECIMAL},#{afterMoney,jdbcType=DECIMAL},#{countMoney,jdbcType=DECIMAL},#{auditRole,jdbcType=VARCHAR})
      #{countNum,jdbcType=BIGINT},#{orderNum,jdbcType=BIGINT},#{cancelOrderNum,jdbcType=BIGINT},#{auditTime,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord"
       useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_extract_audit_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">id,</if>
      <if test="adminUser != null">aid,</if>
      <if test="extract != null">extractId,</if>
      <if test="beforeMoney != null">beforeMoney,</if>
      <if test="afterMoney != null">afterMoney,</if>
      <if test="countMoney != null">countMoney,</if>
      <if test="countNum != null">countNum,</if>
      <if test="countNum != null">orderNum,</if>
       <if test="auditTime != null">cancelOrderNum,</if>
      <if test="auditTime != null">auditTime,</if>
       <if test="auditTime != null">auditRole,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="adminUser != null">#{adminUser.id,jdbcType=BIGINT},</if>
      <if test="extract != null">#{extract.id,jdbcType=BIGINT},</if>
      <if test="beforeMoney != null">#{beforeMoney,jdbcType=DECIMAL},</if>
      <if test="afterMoney != null">#{afterMoney,jdbcType=DECIMAL},</if>
      <if test="countMoney != null">#{countMoney,jdbcType=DECIMAL},</if>
      <if test="countNum != null">#{countNum,jdbcType=BIGINT},</if>
      <if test="countNum != null">#{orderNum,jdbcType=BIGINT},</if>
      <if test="countNum != null">#{cancelOrderNum,jdbcType=BIGINT},</if>
      <if test="auditTime != null">#{auditTime,jdbcType=BIGINT},</if>
       <if test="auditTime != null">#{auditRole,jdbcType=VARCHAR},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
      update yeshi_ec_extract_audit_record set aid = #{adminUser.id,jdbcType=BIGINT},
      extractId = #{extract.id,jdbcType=BIGINT},beforeMoney = #{beforeMoney,jdbcType=DECIMAL},
      afterMoney = #{afterMoney,jdbcType=DECIMAL},countMoney = #{countMoney,jdbcType=DECIMAL},
      countNum = #{countNum,jdbcType=BIGINT},auditRole = #{auditRole,jdbcType=VARCHAR},
      orderNum = #{orderNum,jdbcType=BIGINT},cancelOrderNum = #{cancelOrderNum,jdbcType=BIGINT},
      auditTime = #{auditTime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
      update yeshi_ec_extract_audit_record
    <set>
      <if test="adminUser != null">aid=#{adminUser.id,jdbcType=BIGINT},</if>
      <if test="extract != null">extractId=#{extract.id,jdbcType=BIGINT},</if>
      <if test="beforeMoney != null">beforeMoney=#{beforeMoney,jdbcType=DECIMAL},</if>
      <if test="afterMoney != null">afterMoney=#{afterMoney,jdbcType=DECIMAL},</if>
      <if test="countMoney != null">countMoney=#{countMoney,jdbcType=DECIMAL},</if>
      <if test="countNum != null">countNum=#{countNum,jdbcType=BIGINT},</if>
       <if test="countNum != null">orderNum=#{orderNum,jdbcType=BIGINT},</if>
       <if test="countNum != null">cancelOrderNum=#{cancelOrderNum,jdbcType=BIGINT},</if>
      <if test="auditTime != null">auditTime=#{auditTime,jdbcType=BIGINT},</if>
       <if test="auditTime != null">auditRole=#{auditRole,jdbcType=VARCHAR},</if>
    </set> where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="getListbyExtractId" resultMap="BaseResultMap">
      <!-- 查询最近一次提现记录 -->
      SELECT * FROM yeshi_ec_extract_audit_record  ear
          WHERE ear.`extractId` = #{extractId,jdbcType=BIGINT}
          and auditTime is not null and auditTime > 0  ORDER BY ear.`auditTime`
  </select>
  <select id="getbyExtractId" resultMap="BaseResultMap">
      <!-- 查询提现时已记录信息 -->
      SELECT * FROM yeshi_ec_extract_audit_record  ear
          WHERE ear.`extractId` = #{extractId,jdbcType=BIGINT}
          and (auditTime is  null or auditTime = 0)  ORDER BY ear.`auditTime` desc
  </select>
  <select id="getList" resultMap="BaseResultMap">
    SELECT   *   FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
    WHERE
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="beforeMoney" property="beforeMoney" jdbcType="DECIMAL" />
        <result column="afterMoney" property="afterMoney" jdbcType="DECIMAL" />
        <result column="countMoney" property="countMoney" jdbcType="DECIMAL" />
        <result column="countNum" property="countNum" jdbcType="BIGINT" />
        <result column="orderNum" property="orderNum" jdbcType="BIGINT" />
        <result column="auditRole" property="auditRole" jdbcType="VARCHAR" />
        <result column="cancelOrderNum" property="cancelOrderNum"
            jdbcType="BIGINT" />
        <result column="auditTime" property="auditTime" jdbcType="BIGINT" />
        <result column="extraInfo" property="extraInfoStr" jdbcType="VARCHAR" />
        <association property="adminUser" column="aid"
            select="com.yeshi.fanli.dao.mybatis.AdminUserMapper.selectByPrimaryKey">
        </association>
        <association property="extract" column="extractId"
            select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey">
        </association>
    </resultMap>
    <sql id="Base_Column_List">id,aid,extractId,beforeMoney,afterMoney,countMoney,countNum,orderNum,cancelOrderNum,auditTime,auditRole,extraInfo
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_extract_audit_record where id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from
        yeshi_ec_extract_audit_record where id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord"
        useGeneratedKeys="true" keyProperty="id">
        insert into
        yeshi_ec_extract_audit_record
        (id,aid,extractId,beforeMoney,afterMoney,countMoney,countNum,auditTime,extraInfo)
        values
        (#{id,jdbcType=BIGINT},#{adminUser.id,jdbcType=BIGINT},#{extract.id,jdbcType=BIGINT},
        #{beforeMoney,jdbcType=DECIMAL},#{afterMoney,jdbcType=DECIMAL},#{countMoney,jdbcType=DECIMAL},#{auditRole,jdbcType=VARCHAR})
        #{countNum,jdbcType=BIGINT},#{orderNum,jdbcType=BIGINT},#{cancelOrderNum,jdbcType=BIGINT},#{auditTime,jdbcType=BIGINT},#{extraInfoStr,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_extract_audit_record
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="adminUser != null">aid,</if>
            <if test="extract != null">extractId,</if>
            <if test="beforeMoney != null">beforeMoney,</if>
            <if test="afterMoney != null">afterMoney,</if>
            <if test="countMoney != null">countMoney,</if>
            <if test="countNum != null">countNum,</if>
            <if test="orderNum != null">orderNum,</if>
            <if test="cancelOrderNum != null">cancelOrderNum,</if>
            <if test="auditTime != null">auditTime,</if>
            <if test="auditRole != null">auditRole,</if>
            <if test="extraInfoStr != null">extraInfo,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="adminUser != null">#{adminUser.id,jdbcType=BIGINT},</if>
            <if test="extract != null">#{extract.id,jdbcType=BIGINT},</if>
            <if test="beforeMoney != null">#{beforeMoney,jdbcType=DECIMAL},</if>
            <if test="afterMoney != null">#{afterMoney,jdbcType=DECIMAL},</if>
            <if test="countMoney != null">#{countMoney,jdbcType=DECIMAL},</if>
            <if test="countNum != null">#{countNum,jdbcType=BIGINT},</if>
            <if test="orderNum != null">#{orderNum,jdbcType=BIGINT},</if>
            <if test="cancelOrderNum != null">#{cancelOrderNum,jdbcType=BIGINT},</if>
            <if test="auditTime != null">#{auditTime,jdbcType=BIGINT},</if>
            <if test="auditRole != null">#{auditRole,jdbcType=VARCHAR},</if>
            <if test="extraInfoStr != null">#{extraInfoStr,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
        update
        yeshi_ec_extract_audit_record set aid =
        #{adminUser.id,jdbcType=BIGINT},
        extractId =
        #{extract.id,jdbcType=BIGINT},beforeMoney =
        #{beforeMoney,jdbcType=DECIMAL},
        afterMoney =
        #{afterMoney,jdbcType=DECIMAL},countMoney =
        #{countMoney,jdbcType=DECIMAL},
        countNum =
        #{countNum,jdbcType=BIGINT},auditRole =
        #{auditRole,jdbcType=VARCHAR},
        orderNum = #{orderNum,jdbcType=BIGINT},cancelOrderNum =
        #{cancelOrderNum,jdbcType=BIGINT},
        auditTime =
        #{auditTime,jdbcType=BIGINT},
        extraInfo =
        #{extraInfoStr,jdbcType=VARCHAR}
        where id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.ExtractAuditRecord">
        update yeshi_ec_extract_audit_record
        <set>
            <if test="adminUser != null">aid=#{adminUser.id,jdbcType=BIGINT},</if>
            <if test="extract != null">extractId=#{extract.id,jdbcType=BIGINT},</if>
            <if test="beforeMoney != null">beforeMoney=#{beforeMoney,jdbcType=DECIMAL},</if>
            <if test="afterMoney != null">afterMoney=#{afterMoney,jdbcType=DECIMAL},</if>
            <if test="countMoney != null">countMoney=#{countMoney,jdbcType=DECIMAL},</if>
            <if test="countNum != null">countNum=#{countNum,jdbcType=BIGINT},</if>
            <if test="orderNum != null">orderNum=#{orderNum,jdbcType=BIGINT},</if>
            <if test="cancelOrderNum != null">cancelOrderNum=#{cancelOrderNum,jdbcType=BIGINT},</if>
            <if test="auditTime != null">auditTime=#{auditTime,jdbcType=BIGINT},</if>
            <if test="auditRole != null">auditRole=#{auditRole,jdbcType=VARCHAR},</if>
            <if test="extraInfoStr != null">extraInfo=#{extraInfoStr,jdbcType=VARCHAR},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
    <select id="getListbyExtractId" resultMap="BaseResultMap">
        <!-- 查询最近一次提现记录 -->
        SELECT * FROM yeshi_ec_extract_audit_record ear
        WHERE ear.`extractId` =
        #{extractId,jdbcType=BIGINT}
        and auditTime is not null and auditTime >
        0 ORDER BY ear.`auditTime`
    </select>
    <select id="getbyExtractId" resultMap="BaseResultMap">
        <!-- 查询提现时已记录信息 -->
        SELECT * FROM yeshi_ec_extract_audit_record ear
        WHERE ear.`extractId` =
        #{extractId,jdbcType=BIGINT}
        and (auditTime is null or auditTime = 0)
        ORDER BY ear.`auditTime` desc
    </select>
    <select id="getList" resultMap="BaseResultMap">
        SELECT * FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE
      <![CDATA[
        auditTime is not null and auditTime > 0  AND
        FROM_UNIXTIME(ex.extractTime/1000)  >= #{startTime}
           AND  FROM_UNIXTIME(ex.extractTime/1000) <= #{endTime} 
       ]]>
       <if test='key != null and key != ""'>
               AND (ex.uid like '%${key}%' OR ar.aid like '%${key}%')
           </if>
        ORDER BY ex.extractTime DESC  LIMIT ${start},${count}
   </select>
        <if test='key != null and key != ""'>
            AND (ex.uid like '%${key}%' OR ar.aid like '%${key}%')
        </if>
        ORDER BY ex.extractTime DESC LIMIT ${start},${count}
    </select>
   <select id="getCount" resultType="java.lang.Integer">
     SELECT count(ar.id) FROM yeshi_ec_extract_audit_record ar
     LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
       WHERE
    <select id="getCount" resultType="java.lang.Integer">
        SELECT count(ar.id) FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE
      <![CDATA[
         auditTime is not null and auditTime > 0  AND
         FROM_UNIXTIME(ex.`extractTime`/1000)  >= #{startTime}
           AND  FROM_UNIXTIME(ex.`extractTime`/1000) <= #{endTime} 
       ]]>
       <if test='key != null and key != ""'>
               AND (ex.uid like '%${key}%' OR ar.aid like '%${key}%')
           </if>
       ]]>
        <if test='key != null and key != ""'>
            AND (ex.uid like '%${key}%' OR ar.aid like '%${key}%')
        </if>
    </select>
   <select id="getMyAuditedAllList" resultMap="BaseResultMap">
        SELECT   *  FROM yeshi_ec_extract_audit_record ar
            LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ar.aid = ${adminId}
       <if test='key != null and key != ""'>
               AND ex.uid like '%${key}%'
           </if>
           <if test='state != null'>
               AND ex.state = #{state}
           </if>
        ORDER BY ex.extractTime DESC  LIMIT ${start},${count}
   </select>
    <select id="getMyAuditedAllCount" resultType="java.lang.Integer">
        SELECT  count(ar.id)  FROM yeshi_ec_extract_audit_record ar
            LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ar.aid = ${adminId}
       <if test='key != null and key != ""'>
               AND ex.uid like '%${key}%'
           </if>
           <if test='state != null'>
               AND ex.state = #{state}
           </if>
   </select>
   <select id="getMyAuditedTimeSlotList" resultMap="BaseResultMap">
        SELECT  ar.*,(CASE WHEN ex.state = 2 THEN 1  WHEN ex.state =1 THEN 1  ELSE 0 END) AS stateOrde  FROM yeshi_ec_extract_audit_record ar
            LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE  <![CDATA[1>0]]>
          <if test="adminId != null">
            AND ar.aid = ${adminId}
          </if>
          <if test='key != null and key != ""'>
               AND ex.uid  like '%${key}%'
          </if>
          <if test="days != null">
            <![CDATA[ AND DATE_SUB(CURDATE(), INTERVAL ${days}  DAY) <= FROM_UNIXTIME(ex.extractTime/1000) ]]>
          </if>
          <if test='state != null'>
                   AND ex.state = #{state}
          </if>
          ORDER BY stateOrde,ex.`extractTime` DESC LIMIT ${start},${count}
   </select>
    <select id="getMyAuditedTimeSlotCount" resultType="java.lang.Integer">
        SELECT  count(ar.id)  FROM yeshi_ec_extract_audit_record ar
            LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE  <![CDATA[1>0]]>
          <if test="adminId != null">
            AND ar.aid = ${adminId}
          </if>
          <if test='key != null and key != ""'>
               AND ex.uid  like '%${key}%'
          </if>
          <if test="days != null">
            <![CDATA[ AND DATE_SUB(CURDATE(), INTERVAL ${days}  DAY) <= FROM_UNIXTIME(ex.extractTime/1000) ]]>
          </if>
          <if test='state != null'>
                   AND ex.state = #{state}
          </if>
   </select>
   <select id="getMyAuditedCountWeek" resultType="java.lang.Integer">
       SELECT COUNT(id) FROM yeshi_ec_extract_audit_record     WHERE aid = ${adminId}
    <select id="getMyAuditedAllList" resultMap="BaseResultMap">
        SELECT * FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ar.aid = ${adminId}
        <if test='key != null and key != ""'>
            AND ex.uid like '%${key}%'
        </if>
        <if test='state != null'>
            AND ex.state = #{state}
        </if>
        ORDER BY ex.extractTime DESC LIMIT ${start},${count}
    </select>
    <select id="getMyAuditedAllCount" resultType="java.lang.Integer">
        SELECT count(ar.id) FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ar.aid = ${adminId}
        <if test='key != null and key != ""'>
            AND ex.uid like '%${key}%'
        </if>
        <if test='state != null'>
            AND ex.state = #{state}
        </if>
    </select>
    <select id="getMyAuditedTimeSlotList" resultMap="BaseResultMap">
        SELECT ar.*,(CASE WHEN ex.state = 2 THEN 1 WHEN ex.state =1 THEN 1
        ELSE 0 END) AS stateOrde FROM yeshi_ec_extract_audit_record ar
        LEFT
        JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE  <![CDATA[1>0]]>
        <if test="adminId != null">
            AND ar.aid = ${adminId}
        </if>
        <if test='key != null and key != ""'>
            AND ex.uid like '%${key}%'
        </if>
        <if test="days != null">
            <![CDATA[ AND DATE_SUB(CURDATE(), INTERVAL ${days}  DAY) <= FROM_UNIXTIME(ex.extractTime/1000) ]]>
        </if>
        <if test='state != null'>
            AND ex.state = #{state}
        </if>
        ORDER BY stateOrde,ex.`extractTime` DESC LIMIT ${start},${count}
    </select>
    <select id="getMyAuditedTimeSlotCount" resultType="java.lang.Integer">
        SELECT count(ar.id) FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE  <![CDATA[1>0]]>
        <if test="adminId != null">
            AND ar.aid = ${adminId}
        </if>
        <if test='key != null and key != ""'>
            AND ex.uid like '%${key}%'
        </if>
        <if test="days != null">
            <![CDATA[ AND DATE_SUB(CURDATE(), INTERVAL ${days}  DAY) <= FROM_UNIXTIME(ex.extractTime/1000) ]]>
        </if>
        <if test='state != null'>
            AND ex.state = #{state}
        </if>
    </select>
    <select id="getMyAuditedCountWeek" resultType="java.lang.Integer">
        SELECT COUNT(id) FROM yeshi_ec_extract_audit_record WHERE aid =
        ${adminId}
       <![CDATA[
           AND YEARWEEK(DATE_FORMAT(FROM_UNIXTIME(auditTime/1000),'%Y-%m-%d')) = YEARWEEK(NOW());
       ]]>
   </select>
    <select id="getMyAuditedCountMonth" resultType="java.lang.Integer">
       SELECT COUNT(id) FROM yeshi_ec_extract_audit_record     WHERE aid = ${adminId}
    </select>
    <select id="getMyAuditedCountMonth" resultType="java.lang.Integer">
        SELECT COUNT(id) FROM yeshi_ec_extract_audit_record WHERE aid =
        ${adminId}
       <![CDATA[
           AND DATE_FORMAT(FROM_UNIXTIME(auditTime/1000),'%Y-%m')=DATE_FORMAT(NOW(),'%Y-%m')
       ]]>
   </select>
   <select id="getMyAuditedCountToday" resultType="java.lang.Integer">
       SELECT COUNT(id) FROM yeshi_ec_extract_audit_record     WHERE aid = ${adminId}
    </select>
    <select id="getMyAuditedCountToday" resultType="java.lang.Integer">
        SELECT COUNT(id) FROM yeshi_ec_extract_audit_record WHERE aid =
        ${adminId}
       <![CDATA[
           AND TO_DAYS(FROM_UNIXTIME(auditTime/1000)) = TO_DAYS(NOW())
       ]]>
   </select>
     <!-- 查询历史提现申请记录 -->
   <select id="getByUidList" resultMap="BaseResultMap">
    SELECT *  FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
    WHERE ex.uid = ${uid}
            <![CDATA[and ar.auditTime > 0 and ar.auditTime is not null ]]>
        ORDER BY ex.extractTime DESC  LIMIT ${start},${count}
   </select>
   <select id="getByUidCount" resultType="java.lang.Integer">
       SELECT COUNT(ar.id)  FROM yeshi_ec_extract_audit_record ar
         LEFT JOIN yeshi_ec_extract ex ON ar.extractId=ex.id
       WHERE ex.uid = ${uid} <![CDATA[and ar.auditTime > 0 and ar.auditTime is not null ]]>
    </select>
    <!-- 查询历史提现申请记录 -->
    <select id="getByUidList" resultMap="BaseResultMap">
        SELECT * FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ex.uid = ${uid}
            <![CDATA[and ar.auditTime > 0 and ar.auditTime is not null ]]>
        ORDER BY ex.extractTime DESC LIMIT ${start},${count}
    </select>
    <select id="getByUidCount" resultType="java.lang.Integer">
        SELECT COUNT(ar.id) FROM yeshi_ec_extract_audit_record ar
        LEFT JOIN
        yeshi_ec_extract ex ON ar.extractId=ex.id
        WHERE ex.uid = ${uid} <![CDATA[and ar.auditTime > 0 and ar.auditTime is not null ]]>
    </select>
    <select id="countAuditTotal" resultType="java.util.HashMap">
        SELECT COALESCE(COUNT(tr.id),0) AS 'showValue',
            <if test="type == 1">
                 FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') AS 'showDate'
            </if>
            <if test="type == 2">
                 FROM_UNIXTIME(tr.`auditTime`/1000,'%m') AS 'showDate'
            </if>
            <if test="type == 3">
                 FROM_UNIXTIME(tr.`auditTime`/1000,'%Y') AS 'showDate'
            </if>
        FROM `yeshi_ec_extract_audit_record` tr
         <if test="state != null and state != 0">
            LEFT JOIN `yeshi_ec_extract` t ON t.`id` = tr.`extractId`
         </if>
        WHERE tr.`auditTime` IS NOT NULL
            <if test="startTime != null and startTime != '' ">
                 AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
            </if>
            <if test="endTime != null and endTime != '' ">
                 AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}'
            </if>
            <if test="years != null and years != '' ">
                 AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y') = '${years}'
            </if>
            <if test="state != null and state != 3">
                 AND t.`state` = ${state}
            </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d')
            FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') AS
            'showDate'
        </if>
        <if test="type == 2">
             GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m')
            FROM_UNIXTIME(tr.`auditTime`/1000,'%m') AS 'showDate'
        </if>
        <if test="type == 3">
             GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y')
        </if>
            FROM_UNIXTIME(tr.`auditTime`/1000,'%Y') AS 'showDate'
        </if>
        FROM `yeshi_ec_extract_audit_record` tr
        <if test="state != null and state != 0">
            LEFT JOIN `yeshi_ec_extract` t ON t.`id` = tr.`extractId`
        </if>
        WHERE tr.`auditTime` IS NOT NULL
        <if test="startTime != null and startTime != '' ">
            AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
        </if>
        <if test="endTime != null and endTime != '' ">
            AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]>
            '${endTime}'
        </if>
        <if test="years != null and years != '' ">
            AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y') = '${years}'
        </if>
        <if test="state != null and state != 3">
            AND t.`state` = ${state}
        </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d')
        </if>
        <if test="type == 2">
            GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m')
        </if>
        <if test="type == 3">
            GROUP BY FROM_UNIXTIME(tr.`auditTime`/1000,'%Y')
        </if>
        ORDER BY tr.`auditTime`
    </select>
    <select id="countExtractMoney" resultType="java.util.HashMap">
        SELECT CAST(SUM(t.`money`)AS DECIMAL(19,2)) AS showValue,
            <if test="type == 1">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS 'showDate'
            </if>
            <if test="type == 2">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%m') AS 'showDate'
            </if>
            <if test="type == 3">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%Y') AS 'showDate'
            </if>
        FROM `yeshi_ec_extract` t
        WHERE t.`extractTime` IS NOT NULL
            <if test="startTime != null and startTime != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
            </if>
            <if test="endTime != null and endTime != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}'
            </if>
            <if test="years != null and years != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y') = '${years}'
            </if>
            <if test="state != null">
                 AND t.`state` = ${state}
            </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS
            'showDate'
        </if>
        <if test="type == 2">
             GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m')
            FROM_UNIXTIME(t.`extractTime`/1000,'%m') AS 'showDate'
        </if>
        <if test="type == 3">
             GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y')
        </if>
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y') AS 'showDate'
        </if>
        FROM `yeshi_ec_extract` t
        WHERE t.`extractTime` IS NOT NULL
        <if test="startTime != null and startTime != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
        </if>
        <if test="endTime != null and endTime != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]>
            '${endTime}'
        </if>
        <if test="years != null and years != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y') = '${years}'
        </if>
        <if test="state != null">
            AND t.`state` = ${state}
        </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')
        </if>
        <if test="type == 2">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m')
        </if>
        <if test="type == 3">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y')
        </if>
        ORDER BY t.`extractTime`
    </select>
    <select id="countExtractApplyNumber" resultType="java.util.HashMap">
        SELECT COUNT(t.id) AS showValue,
            <if test="type == 1">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS 'showDate'
            </if>
            <if test="type == 2">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%m') AS 'showDate'
            </if>
            <if test="type == 3">
                 FROM_UNIXTIME(t.`extractTime`/1000,'%Y') AS 'showDate'
            </if>
        FROM `yeshi_ec_extract` t
        WHERE t.`extractTime` IS NOT NULL
            <if test="startTime != null and startTime != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
            </if>
            <if test="endTime != null and endTime != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}'
            </if>
            <if test="years != null and years != '' ">
                 AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y') = '${years}'
            </if>
            <if test="state != null">
                 AND t.`state` = ${state}
            </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS
            'showDate'
        </if>
        <if test="type == 2">
             GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m')
            FROM_UNIXTIME(t.`extractTime`/1000,'%m') AS 'showDate'
        </if>
        <if test="type == 3">
             GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y')
        </if>
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y') AS 'showDate'
        </if>
        FROM `yeshi_ec_extract` t
        WHERE t.`extractTime` IS NOT NULL
        <if test="startTime != null and startTime != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}'
        </if>
        <if test="endTime != null and endTime != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]>
            '${endTime}'
        </if>
        <if test="years != null and years != '' ">
            AND FROM_UNIXTIME(t.`extractTime`/1000,'%Y') = '${years}'
        </if>
        <if test="state != null">
            AND t.`state` = ${state}
        </if>
        <if test="type == 1">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d')
        </if>
        <if test="type == 2">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m')
        </if>
        <if test="type == 3">
            GROUP BY FROM_UNIXTIME(t.`extractTime`/1000,'%Y')
        </if>
        ORDER BY t.`extractTime`
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/GoodsSubClassMapper.xml
@@ -161,9 +161,11 @@
        <!-- 条件二级类别 -->
        SELECT
        <include refid="Base_Column_List" />
        FROM yeshi_ec_sub_class WHERE sub_root_id = #{rootId}
        FROM yeshi_ec_sub_class
        LEFT JOIN `yeshi_ec_sub_class_label_map` m ON m.`sclm_sub_class_id`=sub_id LEFT JOIN `yeshi_ec_sub_class_label`  l ON l.`scl_id`=m.`sclm_label_id`
        WHERE sub_root_id = #{rootId}
        <if test="state != null">AND sub_state = #{state}</if>
        ORDER BY sub_weight,sub_updatetime
         ORDER BY l.`scl_order_by`,sub_weight
    </select>
    <select id="queryByPid" resultMap="BaseResultMap">
        <!-- 条件二级类别 -->
fanli/src/main/java/com/yeshi/fanli/mapping/order/HongBaoOrderMapper.xml
@@ -99,6 +99,64 @@
    </select>
    <!-- 统计数据 -->
    <select id="countHongBaoOrderCountMoreByUid" resultType="java.lang.Integer">
        SELECT
        COUNT(*) FROM yeshi_ec_hongbao_v2 v WHERE v.`hb_uid`=#{uid} AND
        v.`hb_money`>=#{money} AND v.`hb_state`=3
    </select>
    <select id="countWeiQuanOrderByUid" parameterType="java.lang.Long"
        resultType="java.lang.Integer">
        SELECT COUNT(*) FROM
        (
        SELECT IF(v.`hb_pid` IS NOT NULL,p.`hb_id`,v.`hb_id`) AS id FROM
        yeshi_ec_hongbao_v2 v LEFT JOIN yeshi_ec_hongbao_v2 p ON
        p.`hb_id`=v.`hb_pid` WHERE v.`hb_uid`=#{0}
        ) a LEFT JOIN yeshi_ec_hongbao_order ho ON ho.`ho_hongbao_id`=a.id LEFT
        JOIN yeshi_ec_common_order co ON co.co_id=ho.`ho_order_id`
        LEFT JOIN `yeshi_ec_taobao_weiqaun_order` wo ON
        wo.`tmo_order_item_id`=co.`co_trade_id`
        WHERE co.`co_id`>0 AND wo.`tmo_id`>0
    </select>
    <select id="sumWeiQuanOrderFanAmountByUid" parameterType="java.lang.Long"
        resultType="java.math.BigDecimal">
        SELECT SUM(wo.`tmo_fan_money`) FROM
        (
        SELECT IF(v.`hb_pid` IS NOT NULL,p.`hb_id`,v.`hb_id`) AS id FROM
        yeshi_ec_hongbao_v2 v LEFT JOIN yeshi_ec_hongbao_v2 p ON
        p.`hb_id`=v.`hb_pid` WHERE v.`hb_uid`=#{0}
        ) a LEFT JOIN yeshi_ec_hongbao_order ho ON ho.`ho_hongbao_id`=a.id LEFT
        JOIN yeshi_ec_common_order co ON co.co_id=ho.`ho_order_id`
        LEFT JOIN `yeshi_ec_taobao_weiqaun_order` wo ON
        wo.`tmo_order_item_id`=co.`co_trade_id`
        WHERE co.`co_id`>0 AND wo.`tmo_id`>0
    </select>
    <select id="countSafeOrderByUid" parameterType="java.lang.Long"
        resultType="java.lang.Integer">
        SELECT COUNT(co.`co_id`) FROM
        (
        SELECT IF(v.`hb_pid` IS NOT NULL,p.`hb_id`,v.`hb_id`) AS id FROM
        yeshi_ec_hongbao_v2 v LEFT JOIN yeshi_ec_hongbao_v2 p ON
        p.`hb_id`=v.`hb_pid` WHERE v.`hb_uid`=#{0}
        ) a LEFT JOIN yeshi_ec_hongbao_order ho ON ho.`ho_hongbao_id`=a.id LEFT
        JOIN yeshi_ec_common_order co ON co.co_id=ho.`ho_order_id`
        WHERE co.`co_id`>0 AND co.`co_settle_time` IS NOT NULL AND
        (UNIX_TIMESTAMP()- UNIX_TIMESTAMP(co.`co_settle_time`))>180*24*60*60;
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_hongbao_order where ho_id = #{id,jdbcType=BIGINT}
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
@@ -83,7 +83,7 @@
   </delete>
  
   <select id="listQuery" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />  FROM yeshi_ec_push_goods
        SELECT <include refid="Base_Column_List" />,IF(`pg_control_time` IS NOT NULL,pg_control_time,`pg_createtime`) AS orderyTime  FROM yeshi_ec_push_goods
        WHERE 1=1
           <if test='key != null and key != ""'>
                  AND (pg_alert_title like '%${key}%' or pg_alert_content like '%${key}%') 
@@ -91,7 +91,7 @@
           <if test='state != null'>
                  AND pg_is_push = #{state}
           </if>
           ORDER BY pg_is_push,pg_push_time DESC
           ORDER BY orderyTime DESC
        LIMIT ${start},${count}
   </select>
   
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushInfoMapper.xml
@@ -77,7 +77,7 @@
   </delete>
  
  <select id="listQuery" resultMap="BaseResultMap">
      SELECT * FROM  yeshi_ec_push_info
      SELECT p.*,IF(`pi_control_time` IS NOT NULL,pi_control_time,`pi_create_time`) AS orderyTime FROM  yeshi_ec_push_info p
    WHERE pi_type = #{type}
        <if test="key != null and key !='' ">
            <if test="keyType == 1">AND pi_title like '%#{key}%'</if>
@@ -87,9 +87,9 @@
        <if  test="state != null">
            AND pi_state = #{state}
        </if>
      ORDER BY pi_state,pi_push_time DESC
      ORDER BY orderyTime DESC
      LIMIT ${start},${count}
  </select>
  </select>
  
  <select id="countQuery" resultType="java.lang.Long">
      SELECT IFNULL(COUNT(pi_id),0) FROM  yeshi_ec_push_info
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -31,6 +31,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.config.SystemCouponService;
@@ -602,6 +603,7 @@
                        taoBaoGoods = TaoKeApiUtil.getSimpleGoodsInfo(taoBaoOrder.getAuctionId());
                    } catch (TaobaoGoodsDownException e) {
                        e.printStackTrace();
                        LogHelper.errorDetailInfo(e, "AUCTIONID:"+taoBaoOrder.getAuctionId(), "");
                        taoBaoGoods = TaoBaoUtil.getSimpleGoodsBrief(taoBaoOrder.getAuctionId());
                    }
                    if (taoBaoGoods != null) {
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderUserStatisticServiceImpl.java
New file
@@ -0,0 +1,39 @@
package com.yeshi.fanli.service.impl.order;
import java.math.BigDecimal;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.order.HongBaoOrderMapper;
import com.yeshi.fanli.service.inter.order.OrderUserStatisticService;
@Service
public class OrderUserStatisticServiceImpl implements OrderUserStatisticService {
    @Resource
    private HongBaoOrderMapper hongBaoOrderMapper;
    @Override
    public int countHongBaoOrderCount50MoreByUid(Long uid) {
        return hongBaoOrderMapper.countHongBaoOrderCountMoreByUid(new BigDecimal(50), uid);
    }
    @Override
    public int countWeiQuanOrderByUid(Long uid) {
        return hongBaoOrderMapper.countWeiQuanOrderByUid(uid);
    }
    @Override
    public BigDecimal sumWeiQuanOrderFanAmountByUid(Long uid) {
        BigDecimal money = hongBaoOrderMapper.sumWeiQuanOrderFanAmountByUid(uid);
        return money == null ? new BigDecimal(0) : money;
    }
    @Override
    public int countSafeOrderByUid(Long uid) {
        return hongBaoOrderMapper.countSafeOrderByUid(uid);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ExtractAuditRecordServiceImpl.java
@@ -1,20 +1,18 @@
package com.yeshi.fanli.service.impl.user;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.yeshi.utils.DateUtil;
import com.google.gson.Gson;
import com.yeshi.fanli.dao.mybatis.ExtractAuditRecordMapper;
import com.yeshi.fanli.dto.money.ExtractOrderStatisticDTO;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
import com.yeshi.fanli.service.inter.user.ExtractAuditRecordService;
import com.yeshi.fanli.util.StringUtil;
@Service
public class ExtractAuditRecordServiceImpl implements ExtractAuditRecordService {
@@ -46,8 +44,16 @@
    @Override
    public List<ExtractAuditRecord> getMyAuditedTimeSlotList(int pageIndex, int pageSize, String key, Integer state,
            Long adminId, Integer days) {
        return extractAuditRecordMapper.getMyAuditedTimeSlotList((pageIndex - 1) * pageSize, pageSize, key, state,
                adminId, days);
        List<ExtractAuditRecord> list = extractAuditRecordMapper.getMyAuditedTimeSlotList((pageIndex - 1) * pageSize,
                pageSize, key, state, adminId, days);
        Gson gson = new Gson();
        if (list != null)
            for (ExtractAuditRecord record : list) {
                if (!StringUtil.isNullOrEmpty(record.getExtraInfoStr())) {
                    record.setExtraInfo(gson.fromJson(record.getExtraInfoStr(), ExtractOrderStatisticDTO.class));
                }
            }
        return list;
    }
    @Override
@@ -72,7 +78,16 @@
    @Override
    public List<ExtractAuditRecord> getByUidList(int pageIndex, int pageSize, Long uid) {
        return extractAuditRecordMapper.getByUidList((pageIndex - 1) * pageSize, pageSize, uid);
        List<ExtractAuditRecord> list = extractAuditRecordMapper.getByUidList((pageIndex - 1) * pageSize, pageSize, uid);
        Gson gson = new Gson();
        if (list != null)
            for (ExtractAuditRecord record : list) {
                if (!StringUtil.isNullOrEmpty(record.getExtraInfoStr())) {
                    record.setExtraInfo(gson.fromJson(record.getExtraInfoStr(), ExtractOrderStatisticDTO.class));
                }
            }
        return list;
    }
    @Override
@@ -92,23 +107,20 @@
    @Override
    public List<Map<String, Object>> countAuditTotal(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception{
         return extractAuditRecordMapper.countAuditTotal(state, type, years, startTime, endTime);
            String endTime) throws Exception {
        return extractAuditRecordMapper.countAuditTotal(state, type, years, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception{
        return extractAuditRecordMapper.countExtractMoney(state, type, years, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countExtractApplyNumber(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception{
    public List<Map<String, Object>> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception {
        return extractAuditRecordMapper.countExtractMoney(state, type, years, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countExtractApplyNumber(Integer state, Integer type, String years,
            String startTime, String endTime) throws Exception {
        return extractAuditRecordMapper.countExtractApplyNumber(state, type, years, startTime, endTime);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ExtractServiceImpl.java
@@ -28,6 +28,7 @@
import com.yeshi.fanli.dao.mybatis.UserInfoMapper;
import com.yeshi.fanli.dao.mybatis.money.UserMoneyDetailMapper;
import com.yeshi.fanli.dto.HongBao;
import com.yeshi.fanli.dto.money.ExtractOrderStatisticDTO;
import com.yeshi.fanli.entity.bus.user.AlipayTransferResultInfo;
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
@@ -49,6 +50,7 @@
import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
import com.yeshi.fanli.service.inter.money.UserMoneyDebtService;
import com.yeshi.fanli.service.inter.msg.UserMoneyMsgNotificationService;
import com.yeshi.fanli.service.inter.order.OrderUserStatisticService;
import com.yeshi.fanli.service.inter.push.PushService;
import com.yeshi.fanli.service.inter.user.ExtractRecordService;
import com.yeshi.fanli.service.inter.user.ExtractService;
@@ -131,6 +133,9 @@
    @Resource
    private UserMoneyService userMoneyService;
    @Resource
    private OrderUserStatisticService orderUserStatisticService;
    @Transactional
    public Integer addExtract(Extract extract) {
@@ -271,9 +276,15 @@
        ExtractAuditRecord auditRecord = new ExtractAuditRecord();
        auditRecord.setBeforeMoney(user.getMyHongBao());
        auditRecord.setExtract(extract);
        extractAuditRecordMapper.insertSelective(auditRecord);
        // 统计数据
        int orderCount50More = orderUserStatisticService.countHongBaoOrderCount50MoreByUid(user.getId());
        BigDecimal weiQuanOrderFanAmount = orderUserStatisticService.sumWeiQuanOrderFanAmountByUid(user.getId());
        int weiQuanOrderCount = orderUserStatisticService.countWeiQuanOrderByUid(user.getId());
        int safeOrderCount = orderUserStatisticService.countSafeOrderByUid(user.getId());
        auditRecord.setExtraInfoStr(new Gson().toJson(new ExtractOrderStatisticDTO(orderCount50More, weiQuanOrderCount,
                weiQuanOrderFanAmount, safeOrderCount)));
        extractAuditRecordMapper.insertSelective(auditRecord);
        // 新版资金详情
        UserMoneyDetail userMoneyDetail = null;
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderUserStatisticService.java
New file
@@ -0,0 +1,44 @@
package com.yeshi.fanli.service.inter.order;
import java.math.BigDecimal;
/**
 * 用户订单统计服务
 *
 * @author Administrator
 *
 */
public interface OrderUserStatisticService {
    /**
     * 返利超过超过50元的订单数量
     *
     * @param uid
     * @return
     */
    public int countHongBaoOrderCount50MoreByUid(Long uid);
    /**
     * 维权订单数量(包含邀请赚)
     *
     * @param uid
     * @return
     */
    public int countWeiQuanOrderByUid(Long uid);
    /**
     * 维权订单返还的金额
     *
     * @param uid
     * @return
     */
    public BigDecimal sumWeiQuanOrderFanAmountByUid(Long uid);
    /**
     * 安全订单数量
     *
     * @param uid
     * @return
     */
    public int countSafeOrderByUid(Long uid);
}
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java
@@ -1262,7 +1262,7 @@
            String os = System.getProperty("os.name");
            String fontBoldPath = "/usr/share/fonts/PingFang_Medium.ttf";
            if (os.toLowerCase().startsWith("win")) {
                fontBoldPath = "D:/PingFang_Medium.ttf";
                fontBoldPath = "C:/PingFang_Medium.ttf";
            }
            Font boldFont = null;