admin
2020-06-24 874ba0be89d6899b98f7a3e97ef1123921988e12
分红相关bug修改
12个文件已修改
56 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/money/TeamEincomeRecordMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/dividents/TeamDividentsRecordMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/money/TeamEincomeRecordMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/dividents/TeamDividentsRecordMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/manger/order/TeamDividentsManager.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/suning/SuningApiUtil.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-dev/mongo.properties 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-dev/rocketmq.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-pro/mongo.properties 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/rocket/consumer.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -1244,7 +1244,7 @@
                        e.printStackTrace();
                    }
                    long[] targetUids = new long[] { 3L, 4L };
                    long[] targetUids = new long[] { 3L, 4L ,5L};
                    Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey());
                    String[] sts = config.getValue().split(",");
                    String account = sts[0];
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/money/TeamEincomeRecordMapper.java
@@ -16,7 +16,7 @@
    
    
    TeamEincomeRecord selectByUidAndPreRecieveTimeAndTypeAndSourceType(@Param("uid") Long uid,
            @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type, @Param("sourceType") int sourceType);
            @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type, @Param("sourceType") Integer sourceType);
    
    
    
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/dividents/TeamDividentsRecordMapper.java
@@ -17,6 +17,6 @@
     * TeamDividentsRecord 返回类型
     * @throws
     */
    TeamDividentsRecord selectByUidAndDayForUpdate(@Param("uid") Long uid, @Param("day")String day);
    TeamDividentsRecord selectByUidAndDayAndTypeForUpdate(@Param("uid") Long uid, @Param("day")String day,@Param("type")Integer type);
}
fanli/src/main/java/com/yeshi/fanli/mapping/money/TeamEincomeRecordMapper.xml
@@ -108,7 +108,10 @@
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_income where ti_uid = #{uid} and ti_type=#{type}
        and ti_pre_recieve_time=#{preRecieveTime}  and ti_source_type=#{sourceType}
        and ti_pre_recieve_time=#{preRecieveTime}
        <if test="sourceType!=null">
             and ti_source_type=#{sourceType}
        </if>
    </select>
fanli/src/main/java/com/yeshi/fanli/mapping/order/dividents/TeamDividentsRecordMapper.xml
@@ -22,12 +22,15 @@
        from yeshi_ec_team_dividents_record where td_id =
        #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByUidAndDayForUpdate" resultMap="BaseResultMap">
    <select id="selectByUidAndDayAndTypeForUpdate" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_team_dividents_record where td_uid = #{uid} and
        td_day=#{day} for update
        td_day=#{day} AND td_type=#{type}
         for update
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_team_dividents_record where td_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert"
fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java
@@ -28,12 +28,11 @@
            throw new ParamsException(1, "参数不完整");
        // 判断是否存在
        TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayForUpdate(record.getUid(),
                record.getDay());
        TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayAndTypeForUpdate(record.getUid(),
                record.getDay(),record.getType());
        if (old != null)
            throw new TeamDividentsRecordException(TeamDividentsRecordException.CODE_EXIST, "记录已存在");
        // 加入记录
        if (record.getCreateTime() == null)
            record.setCreateTime(new Date());
        teamDividentsRecordMapper.insertSelective(record);
fanli/src/main/java/com/yeshi/fanli/service/manger/order/TeamDividentsManager.java
@@ -125,7 +125,7 @@
            String key = its.next();
            Long uid = Long.parseLong(key.split("#")[0]);
            Integer type = Integer.parseInt(key.split("#")[1]);
            BigDecimal dividents = moneyMap.get(uid).setScale(2, BigDecimal.ROUND_DOWN);
            BigDecimal dividents = moneyMap.get(key).setScale(2, BigDecimal.ROUND_DOWN);
            // 将资金分配到参与分红的用户
            TeamDividentsSourceUser teamDividentsSourceUser = new TeamDividentsSourceUser();
            teamDividentsSourceUser.setDay(day);
@@ -198,7 +198,6 @@
    @Transactional(rollbackFor = Exception.class)
    public void addToTeamEincome(Long uid, Date preSendTime) throws TeamDividentsRecordException,
            TeamDividentsDebtException, UserMoneyDetailException, ParamsException, TeamEincomeRecordException {
        addToTeamEincome(uid, preSendTime, TeamDividentsSourceOrderUserMap.TYPE_MORE_THAN_2);
        addToTeamEincome(uid, preSendTime, TeamDividentsSourceOrderUserMap.TYPE_TEAM_DIVIDENTS);
    }
fanli/src/main/java/com/yeshi/fanli/util/suning/SuningApiUtil.java
@@ -182,6 +182,12 @@
        String result = baseRequest("suning.netalliance.commoditydetail.query", key, model);
        System.out.println(result);
        JSONObject resultJSON = JSONObject.fromObject(result);
        if( resultJSON.optJSONObject("sn_responseContent")==null)
            return null;
        if(resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body")==null)
            return null;
        JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONArray(key);
        if (array != null && array.size() > 0) {
            return new Gson().fromJson(array.optJSONObject(0).toString(), SuningGoodsInfo.class);
fanli/src/main/resource/env-dev/mongo.properties
@@ -1,13 +1,13 @@
mongo.dbname=flq
mongo.port=27016
mongo.port=27017
#开发环境
#mongo.host=192.168.1.253
#mongo.username=admin
#mongo.password=123456
mongo.host=192.168.1.253
mongo.username=admin
mongo.password=123456
#
mongo.host=193.112.35.168
mongo.username=yeshi
mongo.password=Yeshi2016@
#mongo.host=193.112.35.168
#mongo.username=yeshi
#mongo.password=Yeshi2016@
mongo.connectionsPerHost=8
mongo.threadsAllowedToBlockForConnectionMultiplier=4
fanli/src/main/resource/env-dev/rocketmq.xml
@@ -2,8 +2,10 @@
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    <!--
    <import resource="classpath:/rocket/consumer.xml" />
    <import resource="classpath:/rocket/system-coupon-consumer.xml"/>
     -->
    <import resource="classpath:/rocket/producer.xml" />
    <import resource="classpath:/rocket/transactionProducer.xml" />
</beans>
fanli/src/main/resource/env-pro/mongo.properties
@@ -7,11 +7,11 @@
mongo.password=Yeshi2016@
mongo.connectionsPerHost=8
mongo.threadsAllowedToBlockForConnectionMultiplier=4
mongo.connectTimeout=1000
mongo.maxWaitTime=1500
mongo.connectTimeout=10000
mongo.maxWaitTime=15000
mongo.autoConnectRetry=true
mongo.socketKeepAlive=true
mongo.socketTimeout=1500
mongo.socketTimeout=15000
mongo.slaveOk=true
mongo.writeNumber=1
mongo.riteTimeout=0
fanli/src/main/resource/rocket/consumer.xml
@@ -190,7 +190,7 @@
                    <key>
                        <bean class="com.aliyun.openservices.ons.api.bean.Subscription">
                            <property name="topic" value="TOPIC_ORDER" />
                            <property name="expression" value="orderStatistic||taoBaoOrderWeiQuan" />
                            <property name="expression" value="orderStatistic||orderConfirm||taoBaoOrderWeiQuan" />
                        </bean>
                    </key>
                </entry>