| | |
| | | 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];
|
| | |
| | | |
| | | |
| | | 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); |
| | | |
| | | |
| | | |
| | |
| | | * 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); |
| | | |
| | | } |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | 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" |
| | |
| | | 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);
|
| | |
| | | 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);
|
| | |
| | | @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);
|
| | | }
|
| | |
| | | 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);
|
| | |
| | | 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
|
| | |
| | | <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> |
| | |
| | | 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
|
| | |
| | | <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>
|