Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

kk 4 mēneši atpakaļ
vecāks
revīzija
ac52359ad0

+ 1 - 0
game-admin/src/main/resources/i18n/messages.properties

@@ -1276,6 +1276,7 @@
 11573=\u6DFB\u52A0\u4F59\u989D
 11574=\u5546\u54C1
 11575=\u4EE3\u7406\u5206\u7EA2
+11576=\u9080\u8BF7\u5956\u52B1
 
 not.null=* \u5FC5\u987B\u586B\u5199
 user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF

+ 1 - 0
game-admin/src/main/resources/i18n/messages_ar.properties

@@ -1274,6 +1274,7 @@
 11573=\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0631\u0635\u064A\u062F
 11574=\u0633\u0644\u0639\u0629
 11575=\u0623\u0631\u0628\u0627\u062D \u0627\u0644\u0648\u0643\u0627\u0644\u0629
+11576=\u9080\u8BF7\u5956\u52B1
 # 11568 =
 # 11569 =
 # 11570 =

+ 1 - 0
game-admin/src/main/resources/i18n/messages_en.properties

@@ -1274,6 +1274,7 @@
 11573=Add Balance
 11574=commodity
 11575=Agency dividend
+11576=\u9080\u8BF7\u5956\u52B1
 #11568=
 #11569=
 #11570=

+ 1 - 0
game-admin/src/main/resources/i18n/messages_tr.properties

@@ -1275,6 +1275,7 @@
 11573=Bakiye ekle
 11574=emtia
 11575=Ajans temett\u00FC
+11576=\u9080\u8BF7\u5956\u52B1
 #11568=
 #11569=
 #11570=

+ 2 - 2
game-business/src/main/java/com/game/business/controller/AppUserAgentController.java

@@ -428,10 +428,10 @@ public class AppUserAgentController extends BaseController
         appUser.setPassword(Md5Utils.md5(Md5Utils.md5(password) + appUser.getSalt()));
         appUser.setUsername(RandomUtil.randomString(8));
         appUser.setMobile(userName);
-        appUser.setNickname("");
+        appUser.setNickname(appUser.getUsername());
         appUser.setSmsRegion(smsRegion);
         appUser.setPid(curUser.getUserid());
-        appUser.setInviteCode(curUser.getInviteCode());
+//        appUser.setInviteCode(curUser.getInviteCode());
         appUser.setInviteBindTime(new Date());
         appUser.setAgentFlag(1);
         appUser.setAvatar(null);

+ 11 - 0
game-business/src/main/java/com/game/business/domain/AppGame.java

@@ -68,6 +68,17 @@ private static final long serialVersionUID=1L;
     @TableField(value = "logo_url")
     private String logoUrl;
 
+
+    @ApiModelProperty(value = "直播间图片")
+    @Excel(name = "直播间图片")
+    @TableField(value = "live_img_url")
+    private String liveImgUrl;
+
+    @ApiModelProperty(value = "我的页面图片")
+    @Excel(name = "我的页面图片")
+    @TableField(value = "my_img_url")
+    private String myImgUrl;
+
     /** 游戏路径 */
     @ApiModelProperty(value = "游戏路径")
     @Excel(name = "游戏路径")

+ 8 - 0
game-business/src/main/java/com/game/business/domain/AppUsersCharge.java

@@ -77,6 +77,14 @@ private static final long serialVersionUID=1L;
     @TableField(value = "coin_give")
     private BigDecimal coinGive;
 
+    @ApiModelProperty(value = "平台服务费")
+    @TableField(value = "platform_service")
+    private double platformService;
+
+    @ApiModelProperty(value = "平台服务费率")
+    @TableField(value = "platform_service_rate")
+    private double platformServiceRate;
+
     /** 1是会员(星探)充值 */
     @ApiModelProperty(value = "1是会员(星探)充值")
     @Excel(name = "1是会员" , readConverterExp = "星=探")

+ 10 - 1
game-business/src/main/java/com/game/business/task/AppUserCountTask.java

@@ -88,6 +88,8 @@ public class AppUserCountTask {
                     appUserCount.setRechargeAmount(appUsersChargeList.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getMoney().doubleValue()).sum());
                     //提现金额
                     appUserCount.setWithdrawalAmount(appUsersCashrecords.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getMoney().doubleValue()).sum());
+                    //充值服务费/手续费
+                    appUserCount.setRechargeCommission(appUsersChargeList.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getPlatformService()).sum());
                     //提现服务费/手续费
                     appUserCount.setWithdrawalCommission(appUsersCashrecords.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getService().doubleValue()).sum());
                     //直播消费金额
@@ -97,7 +99,7 @@ public class AppUserCountTask {
                         return e.getUid().equals(appUser.getUserid()) &&
                                 null != type1Keys.get(String.valueOf(e.getTranType1().intValue())) &&
                                 null != type3Keys.get(String.valueOf(e.getTranType3().intValue()));
-                    }).mapToDouble(e -> e.getCoinChange()).sum());
+                    }).mapToDouble(e -> dealMoney(e.getCoinChange())).sum());
                     //直播佣金
                     appUserCount.setLiveCommission(liveDividedRecordList.stream().filter(e -> e.getUserId().equals(appUser.getUserid())).mapToDouble(e -> e.getMoney().doubleValue()).sum());
                     //游戏佣金
@@ -238,4 +240,11 @@ public class AppUserCountTask {
 
     }
 
+    /**
+     * 金额为负数则转为正数
+     * */
+    private double dealMoney(double money){
+        return money<0?money*-1:money;
+    }
+
 }

+ 11 - 1
game-business/src/main/resources/mapper/business/AppGameMapper.xml

@@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="gameDate"    column="game_date"    />
         <result property="gameTime"    column="game_time"    />
         <result property="logoUrl"    column="logo_url"    />
+        <result property="liveImgUrl"    column="live_img_url"    />
+        <result property="myImgUrl"    column="my_img_url"    />
         <result property="gamePath"    column="game_path"    />
         <result property="status"    column="status"    />
         <result property="createTime"    column="create_time"    />
@@ -23,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAppGameVo">
-        select id, name, code, classify_id, game_date, game_time, logo_url, game_path, status, create_time, orderno, game_expand1, game_expand2, game_expand3, game_expand4 from app_game
+        select id, name, code, classify_id, game_date, game_time, logo_url,live_img_url,my_img_url, game_path, status, create_time, orderno, game_expand1, game_expand2, game_expand3, game_expand4 from app_game
     </sql>
 
     <select id="selectAppGameList" parameterType="com.game.business.domain.AppGame" resultMap="AppGameResult">
@@ -34,6 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gameDate != null  and gameDate != ''"> and game_date like concat('%', #{gameDate}, '%')</if>
             <if test="classifyId != null "> and classify_id = #{classifyId}</if>
             <if test="logoUrl != null  and logoUrl != ''"> and logo_url = #{logoUrl}</if>
+            <if test="liveImgUrl != null  and liveImgUrl != ''"> and live_img_url = #{liveImgUrl}</if>
+            <if test="myImgUrl != null  and myImgUrl != ''"> and my_img_url = #{myImgUrl}</if>
             <if test="gamePath != null  and gamePath != ''"> and game_path = #{gamePath}</if>
             <if test="status != null "> and status = #{status}</if>
             <if test="orderno != null "> and orderno = #{orderno}</if>
@@ -57,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="code != null">code,</if>
             <if test="classifyId != null">classify_id,</if>
             <if test="logoUrl != null">logo_url,</if>
+            <if test="liveImgUrl != null">live_img_url,</if>
+            <if test="myImgUrl != null">my_img_url,</if>
             <if test="gamePath != null">game_path,</if>
             <if test="status != null">status,</if>
             <if test="createTime != null">create_time,</if>
@@ -72,6 +78,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="code != null">#{code},</if>
             <if test="classifyId != null">#{classifyId},</if>
             <if test="logoUrl != null">#{logoUrl},</if>
+            <if test="liveImgUrl != null">#{live_img_url},</if>
+            <if test="myImgUrl != null">#{my_img_url},</if>
             <if test="gamePath != null">#{gamePath},</if>
             <if test="status != null">#{status},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -92,6 +100,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="gameDate != null">game_date = #{gameDate},</if>
             <if test="gameTime != null">game_time = #{gameTime},</if>
             <if test="logoUrl != null">logo_url = #{logoUrl},</if>
+            <if test="liveImgUrl != null">live_img_url = #{liveImgUrl},</if>
+            <if test="myImgUrl != null">my_img_url = #{myImgUrl},</if>
             <if test="gamePath != null">game_path = #{gamePath},</if>
             <if test="status != null">status = #{status},</if>
             <if test="createTime != null">create_time = #{createTime},</if>

+ 3 - 3
game-business/src/main/resources/mapper/business/AppUserAgentMapper.xml

@@ -99,19 +99,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="teamList" resultType="com.game.business.vo.AppAgentTeamVo">
         select
             a.user_id as userId,
-            c.nickname as nickName,
+            c.username as nickName,
             a.pid as pid,
             (select IFNULL(sum(betting_amount),0) from app_game_betting as b where b.user_id = a.user_id) as bettingAmount,
             (select IFNULL(sum(d.live_commission + d.game_commission),0) from app_user_count as d where d.user_id = a.user_id) as commission,
             (select IFNULL(sum(e.game_win_amount - e.game_lose_amount),0) from app_user_count as e where e.user_id = a.user_id) as gameAmount,
             a.live_rate as liveRate,
             a.dividend_guarantee_rate as dividendGuaranteeRate
-        from app_user_agent as a left join mugozbg_live.app_user as c on a.user_id = c.userid where a.pid = #{teamDto.pid}
+        from app_user_agent as a left join mugozbg_live.app_user as c on a.user_id = c.userid where (a.pid = #{teamDto.pid} or a.user_id = #{teamDto.pid})
         <if test="teamDto.userId != null ">
              and a.user_id = #{teamDto.userId}
         </if>
         <if test="teamDto.nickName != null and teamDto.nickName != ''">
-             and c.nickname = #{teamDto.nickName}
+             and c.username = #{teamDto.nickName}
         </if>
     </select>
 </mapper>

+ 1 - 1
game-business/src/main/resources/mapper/business/AppUserMapper.xml

@@ -333,7 +333,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where userid = #{userid}
     </select>
         
-    <insert id="insertAppUser" parameterType="com.game.business.domain.AppUser">
+    <insert id="insertAppUser" parameterType="com.game.business.domain.AppUser" keyProperty="userid" useGeneratedKeys="true">
         insert into app_user
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="userid != null">userid,</if>

+ 11 - 1
game-business/src/main/resources/mapper/business/AppUsersChargeMapper.xml

@@ -13,6 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="coin"    column="coin"    />
         <result property="coinType"    column="coin_type"    />
         <result property="coinGive"    column="coin_give"    />
+        <result property="platformService"    column="platform_service"    />
+        <result property="platformServiceRate"    column="platform_service_rate"    />
         <result property="isAgent"    column="is_agent"    />
         <result property="isDelete"    column="is_delete"    />
         <result property="isWater"    column="is_water"    />
@@ -35,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAppUsersChargeVo">
-        select id, addtime, after_coin, agent_id, ambient, coin, coin_type, coin_give, is_agent, is_delete, is_water, money, opt_type, opt_user, orderno, pid, pid_level1, pid_level2, pid_level3, pid_level4, remarks, rule_id, status, touid, trade_no, type, uid from app_users_charge
+        select id, addtime, after_coin, agent_id, ambient, coin, coin_type, coin_give,platform_service_rate,platform_service, is_agent, is_delete, is_water, money, opt_type, opt_user, orderno, pid, pid_level1, pid_level2, pid_level3, pid_level4, remarks, rule_id, status, touid, trade_no, type, uid from app_users_charge
     </sql>
 
     <select id="selectAppUsersChargeList" parameterType="com.game.business.domain.AppUsersCharge" resultMap="AppUsersChargeResult">
@@ -48,6 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="coin != null "> and coin = #{coin}</if>
             <if test="coinType != null "> and coin_type = #{coinType}</if>
             <if test="coinGive != null "> and coin_give = #{coinGive}</if>
+            <if test="platform_service_rate != null "> and platform_service = #{platformService}</if>
+            <if test="platform_service != null "> and platform_service_rate = #{platformServiceRate}</if>
             <if test="isAgent != null "> and is_agent = #{isAgent}</if>
             <if test="isDelete != null "> and is_delete = #{isDelete}</if>
             <if test="isWater != null "> and is_water = #{isWater}</if>
@@ -86,6 +90,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="coin != null">coin,</if>
             <if test="coinType != null">coin_type,</if>
             <if test="coinGive != null">coin_give,</if>
+            <if test="platformService != null">platform_ervice,</if>
+            <if test="platformServiceRate != null">platform_ervice_rate,</if>
             <if test="isAgent != null">is_agent,</if>
             <if test="isDelete != null">is_delete,</if>
             <if test="isWater != null">is_water,</if>
@@ -115,6 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="coin != null">#{coin},</if>
             <if test="coinType != null">#{coinType},</if>
             <if test="coinGive != null">#{coinGive},</if>
+            <if test="platformService != null">#{platformService},</if>
+            <if test="platformServiceRate != null">#{platformServiceRate},</if>
             <if test="isAgent != null">#{isAgent},</if>
             <if test="isDelete != null">#{isDelete},</if>
             <if test="isWater != null">#{isWater},</if>
@@ -147,6 +155,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="coin != null">coin = #{coin},</if>
             <if test="coinType != null">coin_type = #{coinType},</if>
             <if test="coinGive != null">coin_give = #{coinGive},</if>
+            <if test="platformService != null">platform_service = #{platformService},</if>
+            <if test="platformServiceRate != null">platform_service_rate = #{platformServiceRate},</if>
             <if test="isAgent != null">is_agent = #{isAgent},</if>
             <if test="isDelete != null">is_delete = #{isDelete},</if>
             <if test="isWater != null">is_water = #{isWater},</if>

+ 11 - 0
game-common/src/main/java/com/game/common/constant/finance/FinTranType3.java

@@ -37,6 +37,11 @@ public enum FinTranType3 {
      */
     CHARGE_WIN_GAME(FinTranType2.GAME_REWARD, 1103, "11215",0),
 
+    /**
+     * 充值 - 扣除手续费
+     */
+    CHARGE_OUT_RATE(FinTranType2.CHARGE, 1104, MessageUtils.message("11277") + ProjConfig.getD_ticketName(),0),
+
     /**
      * 分红 - 代理分红
      */
@@ -70,6 +75,12 @@ public enum FinTranType3 {
      * 活动 - 充值奖励
      */
     CHARGE_IN_REWARD(FinTranType2.REWARD_Income, 1207, "11283",0),
+
+    /**
+     * 活动 - 邀请奖励
+     */
+    CHARGE_IN_INVITE(FinTranType2.REWARD_Income, 1208, "11576",0),
+
     /**
      * 兑换 - 佣金兑换金币
      */