fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsClassController.java
@@ -182,9 +182,9 @@ String version = acceptData.getVersion(); int tversion = Integer.parseInt(version); String platform = acceptData.getPlatform(); if ("android".equalsIgnoreCase(platform) && tversion > 34) { if ("android".equalsIgnoreCase(platform) && tversion > 38) { changePicture = true; } else if (tversion > 44){ } else if (tversion > 47){ changePicture = true; } fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/FloatADMapper.xml
@@ -112,6 +112,11 @@ </if> </select> <select id="getMaxOrderByPosition" resultType="java.lang.Integer"> SELECT IFNULL(MAX(fa_order),0) FROM yeshi_ec_float_ad WHERE fa_position = #{position} </select> <select id="getByAdjoinOrder" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM yeshi_ec_float_ad fd WHERE fd.`fa_position` = #{position} fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderMapper.xml
@@ -640,7 +640,7 @@ ORDER BY co.co_third_create_time DESC LIMIT ${start},${count} ) A LEFT JOIN yeshi_ec_user u ON u.id = A.hb_uid LEFT JOIN yeshi_ec_hongbao_v2 pv2 ON pv2.`hb_pid` = A.hb_id LEFT JOIN yeshi_ec_hongbao_v2 ppv2 ON ppv2.`hb_pid` = A.hb_id ppv2.`hb_pid` = pv2.hb_id </select> <select id="countQuery" resultType="java.lang.Long"> SELECT count(ho.ho_id) FROM yeshi_ec_hongbao_order ho LEFT JOIN fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderServiceImpl.java
@@ -32,7 +32,7 @@ @Resource private HongBaoOrderService hongBaoOrderService; @Transactional(propagation = Propagation.NESTED, rollbackFor = Exception.class) //@Transactional(propagation = Propagation.NESTED, rollbackFor = Exception.class) public boolean addOrder(Order order) throws Exception { order.setVersion(2); WriteLock writeLock = orderLock.writeLock(); fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java
@@ -19,11 +19,13 @@ import com.yeshi.fanli.exception.user.UserInfoExtraException; import com.yeshi.fanli.exception.user.UserLotteryRecordException; import com.yeshi.fanli.exception.user.UserSystemCouponException; import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.config.SystemCouponService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserLotteryRecordService; import com.yeshi.fanli.service.inter.user.UserSystemCouponService; import com.yeshi.fanli.util.StringUtil; import net.sf.json.JSONObject; @@ -313,13 +315,14 @@ throw new UserLotteryRecordException(2, "抽奖次数不足"); } String prize = ""; String prize = null; // 今日天天抽奖-已抽中拥有券数量 int todayHas = userSystemCouponService.countTodatyUserCouponBySource(uid, UserSystemCoupon.SOURCE_DAILY_REBATE); if (todayHas == 0) { // 抽奖 prize = getLotteryPrizeDaily(count); LogHelper.test(uid + "中奖结果:" + prize); try { int num = 0; if ("rebateCoupon".equals(prize)) { @@ -327,8 +330,11 @@ } else if ("doubleCoupon".equals(prize)) { num = 2; } // 插入奖励券 if (num > 0) { userSystemCouponService.randomRewardCoupon(num, uid, UserSystemCoupon.SOURCE_DAILY_REBATE); } } catch (UserSystemCouponException e) { throw new UserLotteryRecordException(1, "抽奖失败"); @@ -345,9 +351,11 @@ updateRecord.setUpdateTime(new Date()); userLotteryRecordMapper.updateByPrimaryKeySelective(updateRecord); if (prize == null || prize.trim().length() == 0) { LogHelper.test(uid + "返回H5中奖结果:" + prize); if (StringUtil.isNullOrEmpty(prize)) { prize = "NoPrize"; } LogHelper.test(uid + "返回H5中奖结果处理空值:" + prize); Map<String,Object> map = new HashMap<String, Object>(); map.put("count", count); @@ -379,7 +387,7 @@ } } else { long result = (1 + Math.round(Math.random() * (9))); if (result <= 2) { if (result <= 3) { prize = rebateCoupon; } else if (result <= 5) { prize = doubleCoupon; utils/src/main/java/org/yeshi/utils/StringUtil.java
@@ -67,7 +67,7 @@ * @return */ public static boolean isNullOrEmpty(String text) { if (text == null || text.length() == 0 || text.equalsIgnoreCase("null")) { if (text == null || text.trim().length() == 0 || text.equalsIgnoreCase("null")) { return true; } return false;