Browse Source

Merge remote-tracking branch 'origin/master'

kk 1 month ago
parent
commit
d49a20470b
21 changed files with 2403 additions and 0 deletions
  1. 115 0
      game-business/src/main/java/com/game/business/controller/AppDealScaleController.java
  2. 214 0
      game-business/src/main/java/com/game/business/controller/AppUsersAuthController.java
  3. 76 0
      game-business/src/main/java/com/game/business/domain/AppDealScale.java
  4. 172 0
      game-business/src/main/java/com/game/business/domain/AppUsersAuth.java
  5. 69 0
      game-business/src/main/java/com/game/business/mapper/AppDealScaleMapper.java
  6. 34 0
      game-business/src/main/java/com/game/business/mapper/AppUserMapper.java
  7. 66 0
      game-business/src/main/java/com/game/business/mapper/AppUsersAuthMapper.java
  8. 63 0
      game-business/src/main/java/com/game/business/service/IAppDealScaleService.java
  9. 3 0
      game-business/src/main/java/com/game/business/service/IAppUserService.java
  10. 67 0
      game-business/src/main/java/com/game/business/service/IAppUsersAuthService.java
  11. 227 0
      game-business/src/main/java/com/game/business/service/impl/AppDealScaleServiceImpl.java
  12. 7 0
      game-business/src/main/java/com/game/business/service/impl/AppUserServiceImpl.java
  13. 105 0
      game-business/src/main/java/com/game/business/service/impl/AppUsersAuthServiceImpl.java
  14. 72 0
      game-business/src/main/java/com/game/business/vo/ApiUserInfoVo.java
  15. 14 0
      game-business/src/main/java/com/game/business/vo/AppAnchorStarVo.java
  16. 151 0
      game-business/src/main/java/com/game/business/vo/UserBasicInfoVo.java
  17. 139 0
      game-business/src/main/java/com/game/business/vo/UserStatusVo.java
  18. 83 0
      game-business/src/main/resources/mapper/business/AppDealScaleMapper.xml
  19. 149 0
      game-business/src/main/resources/mapper/business/AppUsersAuthMapper.xml
  20. 59 0
      game-ui/src/api/business/auth.js
  21. 518 0
      game-ui/src/views/business/auth/index.vue

+ 115 - 0
game-business/src/main/java/com/game/business/controller/AppDealScaleController.java

@@ -0,0 +1,115 @@
+package com.game.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.game.common.core.domain.R;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.game.common.annotation.Log;
+import com.game.common.core.controller.BaseController;
+import com.game.common.core.domain.AjaxResult;
+import com.game.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.game.business.domain.AppDealScale;
+import com.game.business.service.IAppDealScaleService;
+import com.game.common.utils.poi.ExcelUtil;
+import com.game.common.core.page.TableDataInfo;
+
+/**
+ * 主播分成比例Controller
+ * 
+ * @author game
+ * @date 2024-08-11
+ */
+@RestController
+@RequestMapping("/business/scale")
+@Api(value = "AppDealScaleController", description = "主播分成比例接口", tags = {"主播分成比例"})
+public class AppDealScaleController extends BaseController
+{
+    @Autowired
+    private IAppDealScaleService appDealScaleService;
+
+    /**
+     * 查询主播分成比例列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询主播分成比例列表", notes = "获取主播分成比例列表")
+    public TableDataInfo<AppDealScale> list(AppDealScale appDealScale)
+    {
+        startPage();
+        List<AppDealScale> list = appDealScaleService.selectAppDealScaleList(appDealScale);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出主播分成比例列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:export')")
+    @Log(title = "主播分成比例", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出主播分成比例列表", notes = "导出主播分成比例列表")
+    public void export(HttpServletResponse response, AppDealScale appDealScale)
+    {
+        List<AppDealScale> list = appDealScaleService.selectAppDealScaleList(appDealScale);
+        ExcelUtil<AppDealScale> util = new ExcelUtil<AppDealScale>(AppDealScale.class);
+        util.exportExcel(response, list, "主播分成比例数据");
+    }
+
+    /**
+     * 获取主播分成比例详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取主播分成比例详细信息", notes = "获取主播分成比例详细信息")
+    public R<AppDealScale> getInfo(@PathVariable("id") Long id)
+    {
+        return R.ok(appDealScaleService.selectAppDealScaleById(id));
+    }
+
+    /**
+     * 新增主播分成比例
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:add')")
+    @Log(title = "主播分成比例", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "新增主播分成比例", notes = "新增主播分成比例")
+    @PostMapping
+    public R add(@RequestBody AppDealScale appDealScale)
+    {
+        return R.ok(appDealScaleService.insertAppDealScale(appDealScale));
+    }
+
+    /**
+     * 修改主播分成比例
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:edit')")
+    @Log(title = "主播分成比例", businessType = BusinessType.UPDATE)
+    @ApiOperation(value = "修改主播分成比例", notes = "修改主播分成比例")
+    @PutMapping
+    public R edit(@RequestBody AppDealScale appDealScale)
+    {
+        return R.ok(appDealScaleService.updateAppDealScale(appDealScale));
+    }
+
+    /**
+     * 删除主播分成比例
+     */
+    @PreAuthorize("@ss.hasPermi('business:scale:remove')")
+    @Log(title = "主播分成比例", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "删除主播分成比例", notes = "删除主播分成比例")
+	@DeleteMapping("/{ids}")
+    public R remove(@PathVariable Long[] ids)
+    {
+        return R.ok(appDealScaleService.deleteAppDealScaleByIds(ids));
+    }
+}

+ 214 - 0
game-business/src/main/java/com/game/business/controller/AppUsersAuthController.java

@@ -0,0 +1,214 @@
+package com.game.business.controller;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.game.business.domain.AppDealScale;
+import com.game.business.domain.AppUser;
+import com.game.business.service.IAppDealScaleService;
+import com.game.business.service.IAppUserService;
+import com.game.business.service.impl.AppDealScaleServiceImpl;
+import com.game.business.util.im.TencentCloudImConstant;
+import com.game.business.util.im.TencentCloudImUtil;
+import com.game.business.vo.ApiUserInfoVo;
+import com.game.business.vo.AppAnchorStarVo;
+import com.game.common.constant.finance.FinTranType3;
+import com.game.common.core.domain.R;
+import com.game.common.core.redis.RedisCache;
+import org.apache.poi.openxml4j.opc.PackagePart;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.game.common.annotation.Log;
+import com.game.common.core.controller.BaseController;
+import com.game.common.core.domain.AjaxResult;
+import com.game.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.game.business.domain.AppUsersAuth;
+import com.game.business.service.IAppUsersAuthService;
+import com.game.common.utils.poi.ExcelUtil;
+import com.game.common.core.page.TableDataInfo;
+
+/**
+ * 主播认证Controller
+ * 
+ * @author game
+ * @date 2024-08-11
+ */
+@RestController
+@RequestMapping("/business/auth")
+@Api(value = "AppUsersAuthController", description = "主播认证接口", tags = {"主播认证"})
+public class AppUsersAuthController extends BaseController
+{
+    @Autowired
+    private IAppUsersAuthService appUsersAuthService;
+
+    @Autowired
+    private IAppUserService appUserService;
+
+    private IAppDealScaleService dealScaleService;
+    @Autowired
+    private AppDealScaleServiceImpl appDealScaleServiceImpl;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    /**
+     * 查询主播认证列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询主播认证列表", notes = "获取主播认证列表")
+    public TableDataInfo<AppUsersAuth> list(AppUsersAuth appUsersAuth)
+    {
+        startPage();
+        List<AppUsersAuth> list = appUsersAuthService.selectAppUsersAuthList(appUsersAuth);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询主播星级列表
+     */
+    @GetMapping("/starList")
+    @ApiOperation(value = "查询主播星级列表", notes = "查询主播星级列表")
+    public R<List<AppAnchorStarVo>> starList(AppUsersAuth appUsersAuth)
+    {
+        return R.ok(appUsersAuthService.selectAnchorStar());
+    }
+
+    /**
+     * 导出主播认证列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:export')")
+    @Log(title = "主播认证", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出主播认证列表", notes = "导出主播认证列表")
+    public void export(HttpServletResponse response, AppUsersAuth appUsersAuth)
+    {
+        List<AppUsersAuth> list = appUsersAuthService.selectAppUsersAuthList(appUsersAuth);
+        ExcelUtil<AppUsersAuth> util = new ExcelUtil<AppUsersAuth>(AppUsersAuth.class);
+        util.exportExcel(response, list, "主播认证数据");
+    }
+
+    /**
+     * 获取主播认证详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:query')")
+    @GetMapping(value = "/{uid}")
+    @ApiOperation(value = "获取主播认证详细信息", notes = "获取主播认证详细信息")
+    public R<AppUsersAuth> getInfo(@PathVariable("uid") Long uid)
+    {
+        return R.ok(appUsersAuthService.selectAppUsersAuthByUid(uid));
+    }
+
+    /**
+     * 认证审核
+     */
+    @Log(title = "认证审核", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "认证审核", notes = "认证审核")
+    @PostMapping("/audit")
+    public R audit(@RequestBody AppUsersAuth appUsersAuth)
+    {
+        AppUsersAuth usersAuth = appUsersAuthService.selectAppUsersAuthByUid(appUsersAuth.getUid());
+        if(null == usersAuth || usersAuth.getStatus().longValue() != 1 || (appUsersAuth.getStatus().longValue() != 0 && appUsersAuth.getStatus().longValue() != 2)){
+            return R.fail("审核失败,当前状态不可审核");
+        }
+        AppUsersAuth updateAppUsersAuth = new AppUsersAuth();
+        updateAppUsersAuth.setUid(appUsersAuth.getUid());
+        //审核通过
+        AppUser appUser = appUserService.selectAppUserByUserid(usersAuth.getUid());
+        if(null == appUser){
+            return R.fail("审核失败,用户不存在");
+        }
+        AppUser updateAppUser = new AppUser();
+        updateAppUser.setUserid(appUser.getUserid());
+        if(appUsersAuth.getStatus() == 0){
+
+            updateAppUser.setRole(1L);
+            updateAppUser.setIsAnchorAuth(1L);
+            updateAppUser.setStarId(appUsersAuth.getStarId());
+            updateAppUser.setIsShowHomePage(1L);
+
+            updateAppUsersAuth.setStarId(appUsersAuth.getStarId());
+            updateAppUsersAuth.setStatus(appUsersAuth.getStatus());
+
+            // if (FunctionList.WhetherCreateFanGroup()) {
+            //     // 主播转盘 主播转盘
+            //     appDealScale.setFinTranType(FinTranType3.CONSUM_GAME_ANCHOR_ZHUANPAN);
+            //     appDealScale.setDealScale(0);
+            //     appDealScaleCrud.Create(appDealScale, true);
+            // }
+
+            //创建群聊
+            long groupId = (500000000 + appUser.getUserid());
+            if(!TencentCloudImUtil.haveGroup(String.valueOf(groupId))){
+                TencentCloudImUtil.createGroup(TencentCloudImConstant.GROUP_CHAT_TYPE_PUBLIC, String.valueOf(appUser.getUserid()), String.valueOf(groupId), appUser.getUsername());
+            }
+
+            //初始化直播分成
+            appDealScaleServiceImpl.init(appUser.getUserid());
+        }else if(appUsersAuth.getStatus() == 2){
+            //审核不通过
+            updateAppUsersAuth.setStatus(appUsersAuth.getStatus());
+
+            updateAppUser.setRole(0L);
+            updateAppUser.setIsAnchorAuth(0L);
+        }
+        updateAppUsersAuth.setReason(appUsersAuth.getReason());
+        appUserService.updateAppUser(updateAppUser);
+        redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
+        updateAppUsersAuth.setUptime(new Date());
+        appUsersAuthService.updateAppUsersAuth(updateAppUsersAuth);
+
+
+        return R.ok("审核成功");
+    }
+
+    /**
+     * 新增主播认证
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:add')")
+    @Log(title = "主播认证", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "新增主播认证", notes = "新增主播认证")
+    @PostMapping
+    public R add(@RequestBody AppUsersAuth appUsersAuth)
+    {
+        return R.ok(appUsersAuthService.insertAppUsersAuth(appUsersAuth));
+    }
+
+    /**
+     * 修改主播认证
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:edit')")
+    @Log(title = "主播认证", businessType = BusinessType.UPDATE)
+    @ApiOperation(value = "修改主播认证", notes = "修改主播认证")
+    @PutMapping
+    public R edit(@RequestBody AppUsersAuth appUsersAuth)
+    {
+        return R.ok(appUsersAuthService.updateAppUsersAuth(appUsersAuth));
+    }
+
+    /**
+     * 删除主播认证
+     */
+    @PreAuthorize("@ss.hasPermi('business:auth:remove')")
+    @Log(title = "主播认证", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "删除主播认证", notes = "删除主播认证")
+	@DeleteMapping("/{uids}")
+    public R remove(@PathVariable Long[] uids)
+    {
+        return R.ok(appUsersAuthService.deleteAppUsersAuthByUids(uids));
+    }
+}

+ 76 - 0
game-business/src/main/java/com/game/business/domain/AppDealScale.java

@@ -0,0 +1,76 @@
+package com.game.business.domain;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.game.common.constant.finance.FinTranType3;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.game.common.annotation.Excel;
+import com.game.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 主播分成比例对象 app_deal_scale
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+@ApiModel(value = "app_deal_scale", description = "主播分成比例")
+@TableName(value= "app_deal_scale")
+@Data
+public class AppDealScale
+        {
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @ApiModelProperty(value = "$column.columnComment")
+    @TableId(value = "id" , type = IdType.AUTO)
+    private Long id;
+
+    /** 交易比例 */
+    @ApiModelProperty(value = "交易比例")
+    @Excel(name = "交易比例")
+    @TableField(value = "deal_scale")
+    private BigDecimal dealScale;
+
+    /** 0默认 1修改 */
+    @ApiModelProperty(value = "0默认 1修改")
+    @Excel(name = "0默认 1修改")
+    @TableField(value = "is_true")
+    private Long isTrue;
+
+    /** 方案id */
+    @ApiModelProperty(value = "方案id")
+    @Excel(name = "方案id")
+    @TableField(value = "plan_id")
+    private Long planId;
+
+    /**  2级交易类型 FinTranType2 */
+    @ApiModelProperty(value = " 2级交易类型 FinTranType2")
+    @Excel(name = " 2级交易类型 FinTranType2")
+    @TableField(value = "tran_type2")
+    private Long tranType2;
+
+    /**  3级交易类型 FinTranType3 */
+    @ApiModelProperty(value = " 3级交易类型 FinTranType3")
+    @Excel(name = " 3级交易类型 FinTranType3")
+    @TableField(value = "tran_type3")
+    private Long tranType3;
+
+    /** 用户id */
+    @ApiModelProperty(value = "用户id")
+    @Excel(name = "用户id")
+    @TableField(value = "uid")
+    private Long uid;
+
+    public void setFinTranType(FinTranType3 finTranType3) {
+        tranType3 = Long.parseLong(String.valueOf(finTranType3.getCode()));
+        tranType2 = Long.parseLong(String.valueOf(finTranType3.getTranType2().getType()));;
+    }
+
+}

+ 172 - 0
game-business/src/main/java/com/game/business/domain/AppUsersAuth.java

@@ -0,0 +1,172 @@
+package com.game.business.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.game.common.annotation.Excel;
+import com.game.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 主播认证对象 app_users_auth
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+@ApiModel(value = "app_users_auth", description = "主播认证")
+@TableName(value= "app_users_auth")
+@Data
+public class AppUsersAuth
+        {
+private static final long serialVersionUID=1L;
+
+    /** UID */
+    @ApiModelProperty(value = "UID")
+    @TableId(value = "uid" , type = IdType.AUTO)
+    private Long uid;
+
+    /** 提交时间 */
+    @ApiModelProperty(value = "提交时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "提交时间" , width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField(value = "addtime")
+    private Date addtime;
+
+    /** 反面 */
+    @ApiModelProperty(value = "反面")
+    @Excel(name = "反面")
+    @TableField(value = "back_view")
+    private String backView;
+
+    /** 身份证号 */
+    @ApiModelProperty(value = "身份证号")
+    @Excel(name = "身份证号")
+    @TableField(value = "cer_no")
+    private String cerNo;
+
+    /** 附加信息,用于确认分销商 */
+    @ApiModelProperty(value = "附加信息,用于确认分销商")
+    @Excel(name = "附加信息,用于确认分销商")
+    @TableField(value = "extra_info")
+    private String extraInfo;
+
+    /** 正面 */
+    @ApiModelProperty(value = "正面")
+    @Excel(name = "正面")
+    @TableField(value = "front_view")
+    private String frontView;
+
+    /** 手持 */
+    @ApiModelProperty(value = "手持")
+    @Excel(name = "手持")
+    @TableField(value = "handset_view")
+    private String handsetView;
+
+    /** 电话 */
+    @ApiModelProperty(value = "电话")
+    @Excel(name = "电话")
+    @TableField(value = "mobile")
+    private String mobile;
+
+    /** 其他资料图1 */
+    @ApiModelProperty(value = "其他资料图1")
+    @Excel(name = "其他资料图1")
+    @TableField(value = "other1_view")
+    private String other1View;
+
+    /** 其他资料图2 */
+    @ApiModelProperty(value = "其他资料图2")
+    @Excel(name = "其他资料图2")
+    @TableField(value = "other2_view")
+    private String other2View;
+
+    /** 其他资料图3 */
+    @ApiModelProperty(value = "其他资料图3")
+    @Excel(name = "其他资料图3")
+    @TableField(value = "other3_view")
+    private String other3View;
+
+    /** 所属总家族ID */
+    @ApiModelProperty(value = "所属总家族ID")
+    @Excel(name = "所属总家族ID")
+    @TableField(value = "pid_level1")
+    private Long pidLevel1;
+
+    /** 所属区域家族id */
+    @ApiModelProperty(value = "所属区域家族id")
+    @Excel(name = "所属区域家族id")
+    @TableField(value = "pid_level2")
+    private Long pidLevel2;
+
+    /** 所属家族id */
+    @ApiModelProperty(value = "所属家族id")
+    @Excel(name = "所属家族id")
+    @TableField(value = "pid_level3")
+    private Long pidLevel3;
+
+    /** 所属经纪人id */
+    @ApiModelProperty(value = "所属经纪人id")
+    @Excel(name = "所属经纪人id")
+    @TableField(value = "pid_level4")
+    private Long pidLevel4;
+
+    /** qq账号 */
+    @ApiModelProperty(value = "qq账号")
+    @Excel(name = "qq账号")
+    @TableField(value = "qq")
+    private String qq;
+
+    /** 姓名 */
+    @ApiModelProperty(value = "姓名")
+    @Excel(name = "姓名")
+    @TableField(value = "real_name")
+    private String realName;
+
+    /** 审核说明 */
+    @ApiModelProperty(value = "审核说明")
+    @Excel(name = "审核说明")
+    @TableField(value = "reason")
+    private String reason;
+
+    /**  主播星级id(该字段没有实际意义仅审核时用,请勿依赖) */
+    @ApiModelProperty(value = " 主播星级id(该字段没有实际意义仅审核时用,请勿依赖)")
+    @Excel(name = " 主播星级id" , readConverterExp = "该=字段没有实际意义仅审核时用,请勿依赖")
+    @TableField(value = "star_id")
+    private Long starId;
+
+    /** 状态 1:待审核 2:审核拒绝 0:审核通过  -1:资料提交中 */
+    @ApiModelProperty(value = "状态 1:待审核 2:审核拒绝 0:审核通过  -1:资料提交中")
+    @Excel(name = "状态 1:待审核 2:审核拒绝 0:审核通过  -1:资料提交中")
+    @TableField(value = "status")
+    private Long status;
+
+    /** 1:已完成第一步 2:已完成第二步, 3已完成第三部 */
+    @ApiModelProperty(value = "1:已完成第一步 2:已完成第二步, 3已完成第三部")
+    @Excel(name = "1:已完成第一步 2:已完成第二步, 3已完成第三部")
+    @TableField(value = "step")
+    private Long step;
+
+    /** 更新时间 */
+    @ApiModelProperty(value = "更新时间")
+    @TableField(value = "uptime")
+    private Date uptime;
+
+    /** 短视频地址 */
+    @ApiModelProperty(value = "短视频地址")
+    @Excel(name = "短视频地址")
+    @TableField(value = "video_url")
+    private String videoUrl;
+
+    /** 微信账号 */
+    @ApiModelProperty(value = "微信账号")
+    @TableField(value = "wechat")
+    private String wechat;
+
+}

+ 69 - 0
game-business/src/main/java/com/game/business/mapper/AppDealScaleMapper.java

@@ -0,0 +1,69 @@
+package com.game.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.game.business.domain.AppDealScale;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+/**
+ * 主播分成比例Mapper接口
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+public interface AppDealScaleMapper extends BaseMapper<AppDealScale> {
+    /**
+     * 查询主播分成比例
+     *
+     * @param id 主播分成比例主键
+     * @return 主播分成比例
+     */
+    public AppDealScale selectAppDealScaleById(Long id);
+
+    /**
+     * 查询主播分成比例列表
+     *
+     * @param appDealScale 主播分成比例
+     * @return 主播分成比例集合
+     */
+    public List<AppDealScale> selectAppDealScaleList(AppDealScale appDealScale);
+
+    /**
+     * 新增主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    public int insertAppDealScale(AppDealScale appDealScale);
+
+    /**
+     * 修改主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    public int updateAppDealScale(AppDealScale appDealScale);
+
+    /**
+     * 删除主播分成比例
+     *
+     * @param id 主播分成比例主键
+     * @return 结果
+     */
+    public int deleteAppDealScaleById(Long id);
+
+    /**
+     * 批量删除主播分成比例
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAppDealScaleByIds(Long[] ids);
+
+    @Update("update sys_sequence set next_val = next_val + 1 where sequence_name = 'app_deal_scale'")
+    public int updateId();
+
+    @Select("select next_val from sys_sequence where sequence_name = 'app_deal_scale'")
+    public Long getNextId();
+}

+ 34 - 0
game-business/src/main/java/com/game/business/mapper/AppUserMapper.java

@@ -6,8 +6,12 @@ import java.util.Map;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.game.business.domain.AppUser;
+import com.game.business.vo.ApiUserInfoVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.springframework.data.cache.CacheByNativeSql;
+import org.springframework.data.cache.CacheMethod;
+import org.springframework.data.cache.CacheType;
 
 /**
  * app用户Mapper接口
@@ -74,5 +78,35 @@ public interface AppUserMapper extends BaseMapper<AppUser> {
      * */
     public int updateUserMoney(AppUser appUser);
 
+    @Select("select"
+            + " (select grade_icon from app_grade ug where ug.grade = au.user_grade AND ug.type = 1 ) user_grade_img,"
+            + " (select grade_icon from app_grade wg where wg.grade = au.wealth_grade AND wg.type = 2 ) wealth_grade_img,"
+            + " (select grade_icon from app_grade ag where ag.grade = au.anchor_grade AND ag.type = 3 ) anchor_grade_img,"
+            + " (select grade_icon from app_grade ng where ng.grade = au.noble_grade AND ng.type = 4 ) noble_grade_img,"
+            + " (select grade_icon from app_grade cg where cg.grade = au.charm_grade AND cg.type = 5 ) charm_grade_img,"
+            + " (select name from app_grade ng where ng.grade = au.noble_grade AND ng.type = 4 ) noble_name,"
+            + " (select avatar_frame from app_grade ng where ng.grade = au.noble_grade AND ng.type = 4 ) noble_avatar_frame,"
+            + " (select medal_logo from app_medal am where am.lv = au.noble_grade AND am.type = 4 ) noble_medal,"
+
+            /******* 上面是关联其它表 ************/
+            + "LENGTH(mobile) as mobile_length,"// 不查手机号,防止手机号泄露
+            + "TIMESTAMPDIFF(YEAR, birthday, CURDATE()) age,"
+            + "if(manager_id = 0 AND pid = 0 AND agent_id = 0, 1, 2) is_pid,"
+            + "if(total_charge > 0, 1, 0) is_first_recharge,"
+
+            + "mobile,"// 以后要删掉的
+            /******* 上面是计算出来了 ************/
+
+            + "userid as user_id,username,avatar,sex,birthday,live_thumb,role,height,weight,sanwei,vocation,charm_point,"
+            + "constellation,address,signature,province,city,lng,lat,group_id,coin,coin_cash,votes,goodnum,user_type,pid,manager_id,"
+            + "manager_co_id,agent_id,user_grade,anchor_grade,wealth_grade,noble_grade,charm_grade,video_coin,voice_coin,"
+            + "create_time,poster,read_short_video_number,is_svip,iszombiep,iszombie,head_no,ooo_two_classify_id,"
+            + "whether_enable_positioning_show,hide_distance,is_youth_model,is_push,is_tone,charge_show,devote_show,gift_global_broadcast,"
+            + "join_room_show,broad_cast,is_not_disturb,status,is_anchor_auth,online_status,user_set_online_status,consumption,"
+            + "live_status,ooo_live_status,voice_status, last_off_line_time, room_id, gs_room_type, gs_room_id,"
+            + "diamond_coin,diamond_coin_total,diamond_coin_cash,agent_flag,fund_password"
+            + " from app_user as au where au.userid=#{userId}")
+    ApiUserInfoVo getUserInfo(@Param("userId") long userId);
+
     Map<String, BigDecimal> getUserCount(Long userId);
 }

+ 66 - 0
game-business/src/main/java/com/game/business/mapper/AppUsersAuthMapper.java

@@ -0,0 +1,66 @@
+package com.game.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.game.business.domain.AppUsersAuth;
+import com.game.business.vo.AppAnchorStarVo;
+import org.apache.ibatis.annotations.Select;
+
+/**
+ * 主播认证Mapper接口
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+public interface AppUsersAuthMapper extends BaseMapper<AppUsersAuth> {
+    /**
+     * 查询主播认证
+     *
+     * @param uid 主播认证主键
+     * @return 主播认证
+     */
+    public AppUsersAuth selectAppUsersAuthByUid(Long uid);
+
+    /**
+     * 查询主播认证列表
+     *
+     * @param appUsersAuth 主播认证
+     * @return 主播认证集合
+     */
+    public List<AppUsersAuth> selectAppUsersAuthList(AppUsersAuth appUsersAuth);
+
+    /**
+     * 新增主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    public int insertAppUsersAuth(AppUsersAuth appUsersAuth);
+
+    /**
+     * 修改主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    public int updateAppUsersAuth(AppUsersAuth appUsersAuth);
+
+    /**
+     * 删除主播认证
+     *
+     * @param uid 主播认证主键
+     * @return 结果
+     */
+    public int deleteAppUsersAuthByUid(Long uid);
+
+    /**
+     * 批量删除主播认证
+     *
+     * @param uids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAppUsersAuthByUids(Long[] uids);
+
+    @Select("select id as id, star_name as name from app_anchor_star order by star_grade asc")
+    public List<AppAnchorStarVo> selectAnchorStar();
+}

+ 63 - 0
game-business/src/main/java/com/game/business/service/IAppDealScaleService.java

@@ -0,0 +1,63 @@
+package com.game.business.service;
+
+import java.util.List;
+import com.game.business.domain.AppDealScale;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 主播分成比例Service接口
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+public interface IAppDealScaleService extends IService<AppDealScale> {
+    /**
+     * 查询主播分成比例
+     *
+     * @param id 主播分成比例主键
+     * @return 主播分成比例
+     */
+    public AppDealScale selectAppDealScaleById(Long id);
+
+    /**
+     * 查询主播分成比例列表
+     *
+     * @param appDealScale 主播分成比例
+     * @return 主播分成比例集合
+     */
+    public List<AppDealScale> selectAppDealScaleList(AppDealScale appDealScale);
+
+    /**
+     * 新增主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    public int insertAppDealScale(AppDealScale appDealScale);
+
+    /**
+     * 修改主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    public int updateAppDealScale(AppDealScale appDealScale);
+
+    /**
+     * 批量删除主播分成比例
+     *
+     * @param ids 需要删除的主播分成比例主键集合
+     * @return 结果
+     */
+    public int deleteAppDealScaleByIds(Long[] ids);
+
+    /**
+     * 删除主播分成比例信息
+     *
+     * @param id 主播分成比例主键
+     * @return 结果
+     */
+    public int deleteAppDealScaleById(Long id);
+
+    public void init(Long userId);
+}

+ 3 - 0
game-business/src/main/java/com/game/business/service/IAppUserService.java

@@ -7,6 +7,7 @@ import java.util.Map;
 import com.game.business.domain.AppUser;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.game.business.domain.FinTranRecord;
+import com.game.business.vo.ApiUserInfoVo;
 
 /**
  * app用户Service接口
@@ -87,5 +88,7 @@ public interface IAppUserService extends IService<AppUser> {
      * */
     int updateUserAmount(FinTranRecord finTranRecord)  throws Exception;
 
+    ApiUserInfoVo getUserInfo(Long userId);
+
     Map<String, BigDecimal> getUserCount(Long userId);
 }

+ 67 - 0
game-business/src/main/java/com/game/business/service/IAppUsersAuthService.java

@@ -0,0 +1,67 @@
+package com.game.business.service;
+
+import java.util.List;
+import com.game.business.domain.AppUsersAuth;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.game.business.vo.AppAnchorStarVo;
+
+/**
+ * 主播认证Service接口
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+public interface IAppUsersAuthService extends IService<AppUsersAuth> {
+    /**
+     * 查询主播认证
+     *
+     * @param uid 主播认证主键
+     * @return 主播认证
+     */
+    public AppUsersAuth selectAppUsersAuthByUid(Long uid);
+
+    /**
+     * 查询主播认证列表
+     *
+     * @param appUsersAuth 主播认证
+     * @return 主播认证集合
+     */
+    public List<AppUsersAuth> selectAppUsersAuthList(AppUsersAuth appUsersAuth);
+
+    /**
+     * 新增主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    public int insertAppUsersAuth(AppUsersAuth appUsersAuth);
+
+    /**
+     * 修改主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    public int updateAppUsersAuth(AppUsersAuth appUsersAuth);
+
+    /**
+     * 批量删除主播认证
+     *
+     * @param uids 需要删除的主播认证主键集合
+     * @return 结果
+     */
+    public int deleteAppUsersAuthByUids(Long[] uids);
+
+    /**
+     * 删除主播认证信息
+     *
+     * @param uid 主播认证主键
+     * @return 结果
+     */
+    public int deleteAppUsersAuthByUid(Long uid);
+
+    /**
+     * 查询主播星级
+     * */
+    List<AppAnchorStarVo> selectAnchorStar();
+}

+ 227 - 0
game-business/src/main/java/com/game/business/service/impl/AppDealScaleServiceImpl.java

@@ -0,0 +1,227 @@
+package com.game.business.service.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.game.business.service.IAppUserService;
+import com.game.business.util.im.TencentCloudImUtil;
+import com.game.business.vo.ApiUserInfoVo;
+import com.game.common.constant.finance.FinTranType3;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import com.game.business.mapper.AppDealScaleMapper;
+import com.game.business.domain.AppDealScale;
+import com.game.business.service.IAppDealScaleService;
+import com.game.common.annotation.DataSource;
+import com.game.common.enums.DataSourceType;
+
+/**
+ * 主播分成比例Service业务层处理
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+@Service
+public class AppDealScaleServiceImpl extends ServiceImpl<AppDealScaleMapper, AppDealScale> implements IAppDealScaleService {
+    @Autowired
+    private AppDealScaleMapper appDealScaleMapper;
+
+    @Autowired
+    private IAppUserService appUserService;
+
+    /**
+     * 查询主播分成比例
+     *
+     * @param id 主播分成比例主键
+     * @return 主播分成比例
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public AppDealScale selectAppDealScaleById(Long id) {
+        return appDealScaleMapper.selectAppDealScaleById(id);
+    }
+
+    /**
+     * 查询主播分成比例列表
+     *
+     * @param appDealScale 主播分成比例
+     * @return 主播分成比例
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public List<AppDealScale> selectAppDealScaleList(AppDealScale appDealScale) {
+        return appDealScaleMapper.selectAppDealScaleList(appDealScale);
+    }
+
+    /**
+     * 新增主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int insertAppDealScale(AppDealScale appDealScale) {
+        appDealScaleMapper.updateId();
+        Long id = appDealScaleMapper.getNextId();
+        appDealScale.setId(id);
+        return appDealScaleMapper.insertAppDealScale(appDealScale);
+    }
+
+    /**
+     * 修改主播分成比例
+     *
+     * @param appDealScale 主播分成比例
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int updateAppDealScale(AppDealScale appDealScale) {
+        return appDealScaleMapper.updateAppDealScale(appDealScale);
+    }
+
+    /**
+     * 批量删除主播分成比例
+     *
+     * @param ids 需要删除的主播分成比例主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteAppDealScaleByIds(Long[] ids) {
+        return appDealScaleMapper.deleteAppDealScaleByIds(ids);
+    }
+
+    /**
+     * 删除主播分成比例信息
+     *
+     * @param id 主播分成比例主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteAppDealScaleById(Long id) {
+        return appDealScaleMapper.deleteAppDealScaleById(id);
+    }
+
+    @Async("asyncExecutor")
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public void init(Long userId){
+        //初始化分成比例
+        // 获取默认百分比
+        AppDealScale appDealScale = new AppDealScale();
+        appDealScale.setDealScale(BigDecimal.valueOf(0.6));
+        appDealScale.setUid(userId);
+        appDealScale.setPlanId(0L);
+        appDealScale.setIsTrue(0L);
+
+        // 打赏 其它类型打赏的分成比例
+        appDealScale.setTranType2(1L);
+        appDealScale.setTranType3(1L);
+        this.insertAppDealScale(appDealScale);
+
+        // 打赏 直播房间打赏
+        appDealScale.setFinTranType(FinTranType3.CONSUM_LIVE_ROOM_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 发送弹幕
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PT_TEXT_BARRAGE);
+        this.insertAppDealScale(appDealScale);
+
+        // 房间收益 计时房间
+        appDealScale.setFinTranType(FinTranType3.CONSUM_ROOM_TIME);
+        this.insertAppDealScale(appDealScale);
+
+        // 房间收益 付费房间
+        appDealScale.setFinTranType(FinTranType3.CONSUM_ROOM_PAY);
+        this.insertAppDealScale(appDealScale);
+
+        // 购买贵宾席
+        appDealScale.setFinTranType(FinTranType3.CONSUM_BUY_VIPSEATS);
+        this.insertAppDealScale(appDealScale);
+
+        // 打赏 通话打赏
+        appDealScale.setFinTranType(FinTranType3.CONSUM_O2O_CALL_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 付费通话 视频通话
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PAY_O2O_VIDEO);
+        this.insertAppDealScale(appDealScale);
+
+        // 付费通话 语音通话
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PAY_O2O_VOICE);
+        this.insertAppDealScale(appDealScale);
+
+        // 查看联系方式 查看手机号
+        appDealScale.setFinTranType(FinTranType3.CONSUM_WATCH_MOBILE);
+        this.insertAppDealScale(appDealScale);
+
+        // 查看联系方式 查看微信号
+        appDealScale.setFinTranType(FinTranType3.CONSUM_WATCH_WECHAT);
+        this.insertAppDealScale(appDealScale);
+
+        // 购买svip
+        // appDealScale.setFinTranType(FinTranType3.CONSUM_BUY_SVIP);
+        // appDealScaleCrud.Create(appDealScale, true);
+
+        // 付费直播回放 直播回放 -- 暂时没有,先注释掉
+        // appDealScale.setFinTranType(FinTranType3.CONSUM_PAY_COIN_LIVE_REPLAY);
+        // appDealScaleCrud.Create(appDealScale, true);
+
+        // 打赏 短视频打赏
+        appDealScale.setFinTranType(FinTranType3.CONSUM_NEWS_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 私密视图 私密视频
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PRIVATE_VIDEO);
+        this.insertAppDealScale(appDealScale);
+
+        // 私密视图 私密图片
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PRIVATE_IMG);
+        this.insertAppDealScale(appDealScale);
+
+        // 打赏 聊天打赏
+        appDealScale.setFinTranType(FinTranType3.CONSUM_CHAT_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 打赏 个人主页打赏
+        appDealScale.setFinTranType(FinTranType3.CONSUM_PERSONAL_HOME_PAGE_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 打赏 幸运礼物
+        appDealScale.setFinTranType(FinTranType3.CONSUM_LUCKY_GIFT_REWARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 付费私信
+        appDealScale.setFinTranType(FinTranType3.CONSUM_CHAT_CHARGES);
+        this.insertAppDealScale(appDealScale);
+
+        // 守护
+        appDealScale.setFinTranType(FinTranType3.CONSUM_GUARD);
+        this.insertAppDealScale(appDealScale);
+
+        // 加入粉丝团
+        appDealScale.setFinTranType(FinTranType3.CONSUM_FANS_TEAM);
+        this.insertAppDealScale(appDealScale);
+
+        // // 购买贵族
+        // appDealScale.setFinTranType(FinTranType3.CONSUM_BUY_NOBLE);
+        // appDealScaleCrud.Create(appDealScale, true);
+        // 寻觅订单完结
+        appDealScale.setFinTranType(FinTranType3.SEEK_ORDER_FINISH);
+        this.insertAppDealScale(appDealScale);
+
+        ApiUserInfoVo apiUserInfoVo = appUserService.getUserInfo(userId);
+        //发送im通知
+        JSONObject paramJson = new JSONObject();
+        paramJson.put("type", "AnchorMsgSender");
+        paramJson.put("subType", "onAnchorAuthUser");
+        paramJson.put("content", JSONObject.toJSONString(apiUserInfoVo));
+        TencentCloudImUtil.sendMsg(1,null,String.valueOf(userId),JSONObject.toJSONString(paramJson),0);
+    }
+}

+ 7 - 0
game-business/src/main/java/com/game/business/service/impl/AppUserServiceImpl.java

@@ -13,6 +13,7 @@ import java.util.concurrent.TimeUnit;
 
 import com.game.business.domain.FinTranRecord;
 import com.game.business.service.IFinTranRecordService;
+import com.game.business.vo.ApiUserInfoVo;
 import com.game.common.annotation.DataSource;
 import com.game.common.core.redis.RedisCache;
 import com.game.common.enums.DataSourceType;
@@ -230,4 +231,10 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> impl
     public Map<String, BigDecimal> getUserCount(Long userId) {
         return appUserMapper.getUserCount(userId);
     }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public ApiUserInfoVo getUserInfo(Long userId) {
+        return appUserMapper.getUserInfo(userId);
+    }
 }

+ 105 - 0
game-business/src/main/java/com/game/business/service/impl/AppUsersAuthServiceImpl.java

@@ -0,0 +1,105 @@
+package com.game.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.Collections;
+import java.util.List;
+
+import com.game.business.vo.AppAnchorStarVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.game.business.mapper.AppUsersAuthMapper;
+import com.game.business.domain.AppUsersAuth;
+import com.game.business.service.IAppUsersAuthService;
+import com.game.common.annotation.DataSource;
+import com.game.common.enums.DataSourceType;
+
+/**
+ * 主播认证Service业务层处理
+ *
+ * @author game
+ * @date 2024-08-11
+ */
+@Service
+public class AppUsersAuthServiceImpl extends ServiceImpl<AppUsersAuthMapper, AppUsersAuth> implements IAppUsersAuthService {
+    @Autowired
+    private AppUsersAuthMapper appUsersAuthMapper;
+
+    /**
+     * 查询主播认证
+     *
+     * @param uid 主播认证主键
+     * @return 主播认证
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public AppUsersAuth selectAppUsersAuthByUid(Long uid) {
+        return appUsersAuthMapper.selectAppUsersAuthByUid(uid);
+    }
+
+    /**
+     * 查询主播认证列表
+     *
+     * @param appUsersAuth 主播认证
+     * @return 主播认证
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public List<AppUsersAuth> selectAppUsersAuthList(AppUsersAuth appUsersAuth) {
+        return appUsersAuthMapper.selectAppUsersAuthList(appUsersAuth);
+    }
+
+    /**
+     * 新增主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int insertAppUsersAuth(AppUsersAuth appUsersAuth) {
+            return appUsersAuthMapper.insertAppUsersAuth(appUsersAuth);
+    }
+
+    /**
+     * 修改主播认证
+     *
+     * @param appUsersAuth 主播认证
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int updateAppUsersAuth(AppUsersAuth appUsersAuth) {
+        return appUsersAuthMapper.updateAppUsersAuth(appUsersAuth);
+    }
+
+    /**
+     * 批量删除主播认证
+     *
+     * @param uids 需要删除的主播认证主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteAppUsersAuthByUids(Long[] uids) {
+        return appUsersAuthMapper.deleteAppUsersAuthByUids(uids);
+    }
+
+    /**
+     * 删除主播认证信息
+     *
+     * @param uid 主播认证主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteAppUsersAuthByUid(Long uid) {
+        return appUsersAuthMapper.deleteAppUsersAuthByUid(uid);
+    }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public List<AppAnchorStarVo> selectAnchorStar() {
+        return appUsersAuthMapper.selectAnchorStar();
+    }
+}

+ 72 - 0
game-business/src/main/java/com/game/business/vo/ApiUserInfoVo.java

@@ -0,0 +1,72 @@
+package com.game.business.vo;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * 用户的基本信息,包括一些额外的东西,如果说贵族对应的图片, eg:这里面都是非数据库字段的扩展字段
+ */
+@JsonIgnoreProperties
+public class ApiUserInfoVo extends UserBasicInfoVo{
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "手机号,以后要删掉的")
+    public String mobile;
+
+    /******以下字段是计算出来的(简单计算)*************************************************************/
+    @ApiModelProperty(value = "手机号长度")
+    public int mobileLength;
+
+    @ApiModelProperty(value = "年龄")
+    public int age;
+
+    @ApiModelProperty(value = "是否绑定上级 1:未绑定 2:已绑定")
+    public int isPid;
+
+    @ApiModelProperty(value = "是否显示首充 1:不显示 0:显示")
+    public int isFirstRecharge;
+
+    /******以下字段是关联查询出来的*************************************************************/
+    @ApiModelProperty(value = "贵族等级图片")
+    public String nobleGradeImg;
+
+    @ApiModelProperty(value = "贵族名称")
+    public String nobleName;
+
+    @ApiModelProperty(value = "贵族头像框")
+    public String nobleAvatarFrame;
+
+    @ApiModelProperty(value = "用户等级图片")
+    public String userGradeImg;
+
+    @ApiModelProperty(value = "主播等级图片")
+    public String anchorGradeImg;
+
+    @ApiModelProperty(value = "财富等级图片")
+    public String wealthGradeImg;
+
+    @ApiModelProperty(value = "魅力等级图片")
+    public String charmGradeImg;
+
+    @ApiModelProperty(value = "贵族勋章", name = "nobleMedal")
+    public String nobleMedal;
+
+    @ApiModelProperty(value = "房间号")
+    public long roomId;
+
+    @ApiModelProperty(value = "跟随房间类型 1:视频 2:语音")
+    public int gsRoomType;
+
+    @ApiModelProperty(value = "房间号(跟随用)")
+    public long gsRoomId;
+
+    @ApiModelProperty(value = "是否设置了支付密码")
+    public boolean fundFlag = false;
+
+    @JsonIgnore
+    public String fundPassword;
+
+}

+ 14 - 0
game-business/src/main/java/com/game/business/vo/AppAnchorStarVo.java

@@ -0,0 +1,14 @@
+package com.game.business.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class AppAnchorStarVo implements Serializable {
+
+    private Long id;
+
+    private String name;
+
+}

+ 151 - 0
game-business/src/main/java/com/game/business/vo/UserBasicInfoVo.java

@@ -0,0 +1,151 @@
+package com.game.business.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 用户基本信息,主要用来展示 eg: 这里是用户在数据库中的部分字段信息
+ */
+@ApiModel(value = "com.kalacheng.buscommon.model.UserBasicInfo", description = "用户基本信息")
+public class UserBasicInfoVo extends UserStatusVo {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "用户ID", name = "userId")
+    public long userId;
+
+    @ApiModelProperty(value = "昵称", name = "username")
+    public String username;
+
+    @ApiModelProperty(value = "头像", name = "avatar")
+    public String avatar;
+
+    @ApiModelProperty(value = "性别 1:男 2:女", name = "sex")
+    public int sex;
+
+    @ApiModelProperty(value = "生日", name = "birthday")
+    public String birthday;
+
+    @ApiModelProperty(value = "直播封面", name = "liveThumb")
+    public String liveThumb;
+
+    @ApiModelProperty(value = "角色 0:普通用户 1:主播", name = "role")
+    public int role;
+
+    @ApiModelProperty(value = "身高", name = "height")
+    public int height;
+
+    @ApiModelProperty(value = "体重", name = "weight")
+    public double weight;
+
+    @ApiModelProperty(value = "三围", name = "sanwei")
+    public String sanwei;
+
+    @ApiModelProperty(value = "职业", name = "vocation")
+    public String vocation;
+
+    @ApiModelProperty(value = "星座", name = "constellation")
+    public String constellation;
+
+    @ApiModelProperty(value = "地址", name = "address")
+    public String address;
+
+    @ApiModelProperty(value = "个性签名", name = "signature")
+    public String signature;
+
+    @ApiModelProperty(value = "省份", name = "province")
+    public String province;
+
+    @ApiModelProperty(value = "城市", name = "city")
+    public String city;
+
+    @ApiModelProperty(value = "经度", name = "lng")
+    public double lng;
+
+    @ApiModelProperty(value = "纬度", name = "lat")
+    public double lat;
+
+    @ApiModelProperty(value = "群id", name = "groupId")
+    public long groupId;
+
+    @ApiModelProperty(value = "金币 ", name = "coin")
+    public double coin;
+
+    @ApiModelProperty(value = "可兑换(提现)金币 ", name = "coinCash")
+    public double coinCash;
+
+    @ApiModelProperty(value = "映票余额/可提现金额", name = "votes")
+    public double votes;
+
+    @ApiModelProperty(value = "靓号", name = "goodnum")
+    public String goodnum;
+
+    @ApiModelProperty(value = "用户类型 1:admin 2:会员  3:游客")
+    public int userType;
+
+    @ApiModelProperty(value = "pid", name = "pid")
+    public long pid;
+
+    @ApiModelProperty(value = "上级经纪人ID,对应AdminUser表")
+    public long managerId;
+
+    @ApiModelProperty(value = "上级经纪人公会ID,对应AdminUser表。Co=company公司")
+    public long managerCoId;
+
+    @ApiModelProperty(value = "直属上级代理(后台管理员)")
+    public long agentId;
+
+    @ApiModelProperty(value = "用户等级", name = "userGrade")
+    public int userGrade;
+
+    @ApiModelProperty(value = "主播等级")
+    public int anchorGrade;
+
+    @ApiModelProperty(value = "财富等级", name = "wealthGrade")
+    public int wealthGrade;
+
+    @ApiModelProperty(value = "贵族等级", name = "nobleGrade")
+    public int nobleGrade;
+
+    @ApiModelProperty(value = "魅力等级")
+    public int charmGrade;
+
+    @ApiModelProperty(value = "视频通话费用", name = "videoCoin")
+    public double videoCoin;
+
+    @ApiModelProperty(value = "语音通话费用", name = "voiceCoin")
+    public double voiceCoin;
+
+    @ApiModelProperty(value = "注册时间", name = "createTime")
+    public String createTime;
+
+    @ApiModelProperty(value = "海报", name = "poster")
+    public String poster;
+
+    @ApiModelProperty(value = "短视频剩余可观看私密视频次数", name = "readShortVideoNumber")
+    public int readShortVideoNumber;
+
+    @ApiModelProperty(value = "消费总额(财富积分)")
+    public double consumption;
+
+    @ApiModelProperty(value = "魅力积分")
+    public int charmPoint;
+
+    @ApiModelProperty(value = "ooo导航分类关联app_live_channel表")
+    public long headNo;
+
+    @ApiModelProperty(value = "ooo二级分类id")
+    public long oooTwoClassifyId;
+
+    @ApiModelProperty(value = "余额 /充值金额")
+    public double diamondCoin;
+
+    @ApiModelProperty(value = "余额累积充值金额")
+    public double diamondCoinTotal;
+
+    @ApiModelProperty(value = "可提现余额")
+    public double diamondCoinCash;
+
+    @ApiModelProperty(value = "是否为代理 0 否  1 是")
+    public int agentFlag;
+
+}

+ 139 - 0
game-business/src/main/java/com/game/business/vo/UserStatusVo.java

@@ -0,0 +1,139 @@
+package com.game.business.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.data.cache.CacheFieldNotDBField;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户状态相关,包括一些其他位置的记录,
+ */
+public class UserStatusVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "是否开通SVIP服务 1:是 0:否", name = "isSvip")
+    public int isSvip;
+
+    @ApiModelProperty(value = "是否真人 0:不是 1:是", name = "iszombiep")
+    public int iszombiep;
+
+    @ApiModelProperty(value = "是否开启僵尸粉 1:未开启(默认) 0:已开启")
+    public int iszombie;
+
+    @ApiModelProperty(value = "隐藏位置 0:未开启 1:开启", name = "whetherEnablePositioningShow")
+    public int whetherEnablePositioningShow;
+
+    @ApiModelProperty(value = "隐藏距离 0:不隐藏 1:隐藏")
+    public int hideDistance;
+
+    @ApiModelProperty(value = "是否开启青少年模式 1:开启 2:未开启", name = "isYouthModel")
+    public int isYouthModel;
+
+    @ApiModelProperty(value = "是否开启消息推送 0:开启 1:关闭", name = "isPush")
+    public int isPush;
+
+    @ApiModelProperty(value = "是否关闭提示音 0:开启 1:关闭", name = "isTone")
+    public int isTone;
+
+    @ApiModelProperty(value = "充值隐身 0:不隐身 1:隐身", name = "chargeShow")
+    public int chargeShow;
+
+    @ApiModelProperty(value = "贡献榜排行隐身 0:不隐身 1:隐身", name = "devoteShow")
+    public int devoteShow;
+
+    @ApiModelProperty(value = "加入房间隐身 0:不隐身 1:隐身", name = "joinRoomShow")
+    public int joinRoomShow;
+
+    @ApiModelProperty(value = "全站广播功能 0:关闭功能 1:开启功能", name = "broadCast")
+    public int broadCast;
+
+    @ApiModelProperty(value = "礼物全局广播 0:关闭 1:开启")
+    public int giftGlobalBroadcast;
+
+    @ApiModelProperty(value = "是否开启勿扰 0:未开启 1:开启", name = "isNotDisturb")
+    public int isNotDisturb;
+
+    @ApiModelProperty(value = "用户状态 1:禁用 0:解禁", name = "status")
+    public int status;
+
+    @ApiModelProperty(value = "主播是否认证 0:未认证 1:已认证  后台添加主播时,如果是认证状态, 需要添加认证记录", name = "isAnchorAuth")
+    public int isAnchorAuth;
+
+    @ApiModelProperty(value = "用户真实在线状态 0:离线 1:在线", name = "onlineStatus")
+    public int onlineStatus;
+
+    @ApiModelProperty(value = "用户设置的在线状态 0:在线 1:忙碌 2:离开 3:通话中", name = "userSetOnlineStatus")
+    public int userSetOnlineStatus;
+
+    @ApiModelProperty(value = "直播状态 0:未进行直播 1:直播主播 2:直播观众", name = "liveStatus")
+    public int liveStatus;
+
+    @ApiModelProperty(value = "一对一直播状态 0:未进行直播 1:通话中 2:邀请他人通话 3:正在被邀请")
+    public int oooLiveStatus;
+
+    @ApiModelProperty(value = "多人语音直播状态 0:不在语音房间中 2:上麦标识 3:被邀上麦中 4:被踢下麦 5:下麦标识 6:申请上麦中 8:被踢出房间", name = "voiceStatus")
+    public int voiceStatus;
+
+    @ApiModelProperty(value = "离线时间", name = "lastOffLineTime")
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    public Date lastOffLineTime;
+
+    // ---↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ 上面是,在数据库的状态字段---下面是非数据库状态字段 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓---
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "直播类型 0:没有直播,无类型 1:视频直播  2:语音直播", name = "liveType")
+    public int liveType = 0;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "直播房间号", name = "roomId")
+    public long roomId;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "直播房间标识", name = "showId")
+    public String showId;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "房间类型 0:普通房间 1:密码房间 2:门票房间 3:计时房间 4:贵族房间", name = "roomType")
+    public int roomType;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "与他人链接的会话ID(互动会话ID)", name = "linkOtherSid")
+    public long linkOtherSid;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "与他人链接的状态(互动状态)0:未链接 1:申请连麦 2:被邀请连麦 3:连麦进行中 11:邀请他人互动 12:被邀请互动 13:互动进行中 21:邀请他人PK 22:被邀请PK 23:PK中", name = "linkOtherStatus")
+    public int linkOtherStatus;
+
+    /**
+     * 这个不清楚干啥的,可以考虑删除
+     */
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "是否允许连麦 0:关 1:开", name = "canLinkMic")
+    public int canLinkMic;
+
+    /**
+     * 这个一般不在这个操作
+     */
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "0:直播 1:是演示视频的直播", name = "roomIsVideo")
+    public int roomIsVideo;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "被禁麦(麦克风) 0: 可以发言(默认) 1:被禁止发言", name = "noTalking")
+    public int noTalking;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "PK过程的ID", name = "roomPkSid")
+    public long roomPkSid;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "对方直播房间号", name = "roomId")
+    public long otherRoomId;
+
+    @CacheFieldNotDBField
+    @ApiModelProperty(value = "对方Uid 包括:连麦/互动/PK", name = "otherUid")
+    public long otherUid;
+
+}

+ 83 - 0
game-business/src/main/resources/mapper/business/AppDealScaleMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.game.business.mapper.AppDealScaleMapper">
+    
+    <resultMap type="com.game.business.domain.AppDealScale" id="AppDealScaleResult">
+        <result property="id"    column="id"    />
+        <result property="dealScale"    column="deal_scale"    />
+        <result property="isTrue"    column="is_true"    />
+        <result property="planId"    column="plan_id"    />
+        <result property="tranType2"    column="tran_type2"    />
+        <result property="tranType3"    column="tran_type3"    />
+        <result property="uid"    column="uid"    />
+    </resultMap>
+
+    <sql id="selectAppDealScaleVo">
+        select id, deal_scale, is_true, plan_id, tran_type2, tran_type3, uid from app_deal_scale
+    </sql>
+
+    <select id="selectAppDealScaleList" parameterType="com.game.business.domain.AppDealScale" resultMap="AppDealScaleResult">
+        <include refid="selectAppDealScaleVo"/>
+        <where>  
+            <if test="dealScale != null "> and deal_scale = #{dealScale}</if>
+            <if test="isTrue != null "> and is_true = #{isTrue}</if>
+            <if test="planId != null "> and plan_id = #{planId}</if>
+            <if test="tranType2 != null "> and tran_type2 = #{tranType2}</if>
+            <if test="tranType3 != null "> and tran_type3 = #{tranType3}</if>
+            <if test="uid != null "> and uid = #{uid}</if>
+        </where>
+    </select>
+    
+    <select id="selectAppDealScaleById" parameterType="Long" resultMap="AppDealScaleResult">
+        <include refid="selectAppDealScaleVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertAppDealScale" parameterType="com.game.business.domain.AppDealScale">
+        insert into app_deal_scale
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="dealScale != null">deal_scale,</if>
+            <if test="isTrue != null">is_true,</if>
+            <if test="planId != null">plan_id,</if>
+            <if test="tranType2 != null">tran_type2,</if>
+            <if test="tranType3 != null">tran_type3,</if>
+            <if test="uid != null">uid,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="dealScale != null">#{dealScale},</if>
+            <if test="isTrue != null">#{isTrue},</if>
+            <if test="planId != null">#{planId},</if>
+            <if test="tranType2 != null">#{tranType2},</if>
+            <if test="tranType3 != null">#{tranType3},</if>
+            <if test="uid != null">#{uid},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAppDealScale" parameterType="com.game.business.domain.AppDealScale">
+        update app_deal_scale
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="dealScale != null">deal_scale = #{dealScale},</if>
+            <if test="isTrue != null">is_true = #{isTrue},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="tranType2 != null">tran_type2 = #{tranType2},</if>
+            <if test="tranType3 != null">tran_type3 = #{tranType3},</if>
+            <if test="uid != null">uid = #{uid},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAppDealScaleById" parameterType="Long">
+        delete from app_deal_scale where id = #{id}
+    </delete>
+
+    <delete id="deleteAppDealScaleByIds" parameterType="String">
+        delete from app_deal_scale where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 149 - 0
game-business/src/main/resources/mapper/business/AppUsersAuthMapper.xml

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.game.business.mapper.AppUsersAuthMapper">
+    
+    <resultMap type="com.game.business.domain.AppUsersAuth" id="AppUsersAuthResult">
+        <result property="uid"    column="uid"    />
+        <result property="addtime"    column="addtime"    />
+        <result property="backView"    column="back_view"    />
+        <result property="cerNo"    column="cer_no"    />
+        <result property="extraInfo"    column="extra_info"    />
+        <result property="frontView"    column="front_view"    />
+        <result property="handsetView"    column="handset_view"    />
+        <result property="mobile"    column="mobile"    />
+        <result property="other1View"    column="other1_view"    />
+        <result property="other2View"    column="other2_view"    />
+        <result property="other3View"    column="other3_view"    />
+        <result property="pidLevel1"    column="pid_level1"    />
+        <result property="pidLevel2"    column="pid_level2"    />
+        <result property="pidLevel3"    column="pid_level3"    />
+        <result property="pidLevel4"    column="pid_level4"    />
+        <result property="qq"    column="qq"    />
+        <result property="realName"    column="real_name"    />
+        <result property="reason"    column="reason"    />
+        <result property="starId"    column="star_id"    />
+        <result property="status"    column="status"    />
+        <result property="step"    column="step"    />
+        <result property="uptime"    column="uptime"    />
+        <result property="videoUrl"    column="video_url"    />
+        <result property="wechat"    column="wechat"    />
+    </resultMap>
+
+    <sql id="selectAppUsersAuthVo">
+        select uid, addtime, back_view, cer_no, extra_info, front_view, handset_view, mobile, other1_view, other2_view, other3_view, pid_level1, pid_level2, pid_level3, pid_level4, qq, real_name, reason, star_id, status, step, uptime, video_url, wechat from app_users_auth
+    </sql>
+
+    <select id="selectAppUsersAuthList" parameterType="com.game.business.domain.AppUsersAuth" resultMap="AppUsersAuthResult">
+        <include refid="selectAppUsersAuthVo"/>
+        <where>  
+            <if test="uid != null "> and uid = #{uid}</if>
+            <if test="cerNo != null  and cerNo != ''"> and cer_no = #{cerNo}</if>
+            <if test="status != null "> and status = #{status}</if>
+        </where>
+        order by uptime desc , addtime desc
+    </select>
+    
+    <select id="selectAppUsersAuthByUid" parameterType="Long" resultMap="AppUsersAuthResult">
+        <include refid="selectAppUsersAuthVo"/>
+        where uid = #{uid}
+    </select>
+        
+    <insert id="insertAppUsersAuth" parameterType="com.game.business.domain.AppUsersAuth">
+        insert into app_users_auth
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="uid != null">uid,</if>
+            <if test="addtime != null">addtime,</if>
+            <if test="backView != null">back_view,</if>
+            <if test="cerNo != null">cer_no,</if>
+            <if test="extraInfo != null">extra_info,</if>
+            <if test="frontView != null">front_view,</if>
+            <if test="handsetView != null">handset_view,</if>
+            <if test="mobile != null">mobile,</if>
+            <if test="other1View != null">other1_view,</if>
+            <if test="other2View != null">other2_view,</if>
+            <if test="other3View != null">other3_view,</if>
+            <if test="pidLevel1 != null">pid_level1,</if>
+            <if test="pidLevel2 != null">pid_level2,</if>
+            <if test="pidLevel3 != null">pid_level3,</if>
+            <if test="pidLevel4 != null">pid_level4,</if>
+            <if test="qq != null">qq,</if>
+            <if test="realName != null">real_name,</if>
+            <if test="reason != null">reason,</if>
+            <if test="starId != null">star_id,</if>
+            <if test="status != null">status,</if>
+            <if test="step != null">step,</if>
+            <if test="uptime != null">uptime,</if>
+            <if test="videoUrl != null">video_url,</if>
+            <if test="wechat != null">wechat,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="uid != null">#{uid},</if>
+            <if test="addtime != null">#{addtime},</if>
+            <if test="backView != null">#{backView},</if>
+            <if test="cerNo != null">#{cerNo},</if>
+            <if test="extraInfo != null">#{extraInfo},</if>
+            <if test="frontView != null">#{frontView},</if>
+            <if test="handsetView != null">#{handsetView},</if>
+            <if test="mobile != null">#{mobile},</if>
+            <if test="other1View != null">#{other1View},</if>
+            <if test="other2View != null">#{other2View},</if>
+            <if test="other3View != null">#{other3View},</if>
+            <if test="pidLevel1 != null">#{pidLevel1},</if>
+            <if test="pidLevel2 != null">#{pidLevel2},</if>
+            <if test="pidLevel3 != null">#{pidLevel3},</if>
+            <if test="pidLevel4 != null">#{pidLevel4},</if>
+            <if test="qq != null">#{qq},</if>
+            <if test="realName != null">#{realName},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="starId != null">#{starId},</if>
+            <if test="status != null">#{status},</if>
+            <if test="step != null">#{step},</if>
+            <if test="uptime != null">#{uptime},</if>
+            <if test="videoUrl != null">#{videoUrl},</if>
+            <if test="wechat != null">#{wechat},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAppUsersAuth" parameterType="com.game.business.domain.AppUsersAuth">
+        update app_users_auth
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="addtime != null">addtime = #{addtime},</if>
+            <if test="backView != null">back_view = #{backView},</if>
+            <if test="cerNo != null">cer_no = #{cerNo},</if>
+            <if test="extraInfo != null">extra_info = #{extraInfo},</if>
+            <if test="frontView != null">front_view = #{frontView},</if>
+            <if test="handsetView != null">handset_view = #{handsetView},</if>
+            <if test="mobile != null">mobile = #{mobile},</if>
+            <if test="other1View != null">other1_view = #{other1View},</if>
+            <if test="other2View != null">other2_view = #{other2View},</if>
+            <if test="other3View != null">other3_view = #{other3View},</if>
+            <if test="pidLevel1 != null">pid_level1 = #{pidLevel1},</if>
+            <if test="pidLevel2 != null">pid_level2 = #{pidLevel2},</if>
+            <if test="pidLevel3 != null">pid_level3 = #{pidLevel3},</if>
+            <if test="pidLevel4 != null">pid_level4 = #{pidLevel4},</if>
+            <if test="qq != null">qq = #{qq},</if>
+            <if test="realName != null">real_name = #{realName},</if>
+            <if test="reason != null">reason = #{reason},</if>
+            <if test="starId != null">star_id = #{starId},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="step != null">step = #{step},</if>
+            <if test="uptime != null">uptime = #{uptime},</if>
+            <if test="videoUrl != null">video_url = #{videoUrl},</if>
+            <if test="wechat != null">wechat = #{wechat},</if>
+        </trim>
+        where uid = #{uid}
+    </update>
+
+    <delete id="deleteAppUsersAuthByUid" parameterType="Long">
+        delete from app_users_auth where uid = #{uid}
+    </delete>
+
+    <delete id="deleteAppUsersAuthByUids" parameterType="String">
+        delete from app_users_auth where uid in 
+        <foreach item="uid" collection="array" open="(" separator="," close=")">
+            #{uid}
+        </foreach>
+    </delete>
+</mapper>

+ 59 - 0
game-ui/src/api/business/auth.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 查询主播认证列表
+export function listAuth(query) {
+  return request({
+    url: '/business/auth/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询主播星级列表
+export function starList() {
+  return request({
+    url: '/business/auth/starList',
+    method: 'get',
+  })
+}
+
+// 查询主播认证详细
+export function getAuth(uid) {
+  return request({
+    url: '/business/auth/' + uid,
+    method: 'get'
+  })
+}
+
+// 新增主播认证
+export function addAuth(data) {
+  return request({
+    url: '/business/auth',
+    method: 'post',
+    data: data
+  })
+}
+// 新增主播认证
+export function audit(data) {
+  return request({
+    url: '/business/auth/audit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改主播认证
+export function updateAuth(data) {
+  return request({
+    url: '/business/auth',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除主播认证
+export function delAuth(uid) {
+  return request({
+    url: '/business/auth/' + uid,
+    method: 'delete'
+  })
+}

+ 518 - 0
game-ui/src/views/business/auth/index.vue

@@ -0,0 +1,518 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="UID" prop="uid">
+        <el-input
+          v-model="queryParams.uid"
+          placeholder="请输入UID"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="身份证号" prop="cerNo">
+        <el-input
+          v-model="queryParams.cerNo"
+          placeholder="请输入身份证号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
+          <el-option
+            v-for="dict in dict.type.app_user_auth"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['business:auth:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['business:auth:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['business:auth:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['business:auth:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="authList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="UID" align="center" prop="uid" />
+      <el-table-column label="身份证号" align="center" prop="cerNo" />
+      <el-table-column label="电话" align="center" prop="mobile" />
+      <el-table-column label="提交时间" align="center" prop="addtime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.addtime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="反面" align="center" prop="backView" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.backView" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="正面" align="center" prop="frontView" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.frontView" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="手持" align="center" prop="handsetView" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.handsetView" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="其他资料图1" align="center" prop="other1View" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.other1View" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="其他资料图2" align="center" prop="other2View" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.other2View" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="其他资料图3" align="center" prop="other3View" width="100">
+        <template slot-scope="scope">
+          <image-preview :src="scope.row.other3View" :width="50" :height="50"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="qq账号" align="center" prop="qq" />
+      <el-table-column label="姓名" align="center" prop="realName" />
+      <el-table-column label="审核说明" align="center" prop="reason" />
+      <el-table-column label=" 主播星级" align="center" prop="starId">
+        <template slot-scope="scope">
+          {{getTypeName(scope.row.starId)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.app_user_auth" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="短视频地址" align="center" prop="videoUrl">
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" v-if="scope.row.videoUrl != undefined && scope.row.videoUrl != ''" @click="openVideo(scope.row.videoUrl)">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button v-if="scope.row.status == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAudit(scope.row)"
+          >审核</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:auth:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['business:auth:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改主播认证对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="提交时间" prop="addtime">
+          <el-date-picker clearable
+                          v-model="form.addtime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="请选择提交时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="反面" prop="backView">
+          <image-upload v-model="form.backView"/>
+        </el-form-item>
+        <el-form-item label="身份证号" prop="cerNo">
+          <el-input v-model="form.cerNo" placeholder="请输入身份证号" />
+        </el-form-item>
+        <el-form-item label="附加信息,用于确认分销商" prop="extraInfo">
+          <el-input v-model="form.extraInfo" placeholder="请输入附加信息,用于确认分销商" />
+        </el-form-item>
+        <el-form-item label="正面" prop="frontView">
+          <image-upload v-model="form.frontView"/>
+        </el-form-item>
+        <el-form-item label="手持" prop="handsetView">
+          <image-upload v-model="form.handsetView"/>
+        </el-form-item>
+        <el-form-item label="电话" prop="mobile">
+          <el-input v-model="form.mobile" placeholder="请输入电话" />
+        </el-form-item>
+        <el-form-item label="其他资料图1" prop="other1View">
+          <image-upload v-model="form.other1View"/>
+        </el-form-item>
+        <el-form-item label="其他资料图2" prop="other2View">
+          <image-upload v-model="form.other2View"/>
+        </el-form-item>
+        <el-form-item label="其他资料图3" prop="other3View">
+          <image-upload v-model="form.other3View"/>
+        </el-form-item>
+        <el-form-item label="所属总家族ID" prop="pidLevel1">
+          <el-input v-model="form.pidLevel1" placeholder="请输入所属总家族ID" />
+        </el-form-item>
+        <el-form-item label="所属区域家族id" prop="pidLevel2">
+          <el-input v-model="form.pidLevel2" placeholder="请输入所属区域家族id" />
+        </el-form-item>
+        <el-form-item label="所属家族id" prop="pidLevel3">
+          <el-input v-model="form.pidLevel3" placeholder="请输入所属家族id" />
+        </el-form-item>
+        <el-form-item label="所属经纪人id" prop="pidLevel4">
+          <el-input v-model="form.pidLevel4" placeholder="请输入所属经纪人id" />
+        </el-form-item>
+        <el-form-item label="qq账号" prop="qq">
+          <el-input v-model="form.qq" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="姓名" prop="realName">
+          <el-input v-model="form.realName" placeholder="请输入姓名" />
+        </el-form-item>
+        <el-form-item label="审核说明" prop="reason">
+          <el-input v-model="form.reason" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label=" 主播星级id" prop="starId">
+          <el-input v-model="form.starId" placeholder="请输入 主播星级id" />
+        </el-form-item>
+        <el-form-item label="状态 1:待审核 2:审核拒绝 0:审核通过  -1:资料提交中" prop="status">
+          <el-select v-model="form.status" placeholder="请选择状态 1:待审核 2:审核拒绝 0:审核通过  -1:资料提交中">
+            <el-option
+              v-for="dict in dict.type.app_user_auth"
+              :key="dict.value"
+              :label="dict.label"
+              :value="parseInt(dict.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 添加或修改主播认证对话框 -->
+    <el-dialog :title="title" :visible.sync="auditOpen" width="500px" append-to-body>
+      <el-form ref="auditForm" :model="auditForm" :rules="auditRules" label-width="80px">
+        <el-form-item label="UID" prop="uid">
+          <el-input v-model="auditForm.uid" type="textarea" placeholder="请输入内容" disabled/>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-select v-model="auditForm.status" placeholder="请选择状态">
+            <el-option
+              v-for="dict in dict.type.app_user_auth"
+              :key="dict.value"
+              :label="dict.label"
+              :value="parseInt(dict.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label=" 主播星级" prop="starId">
+          <el-select v-model="auditForm.starId" placeholder="请选择">
+            <el-option
+              v-for="dict in typeList"
+              :key="dict.value"
+              :label="dict.label"
+              :value="parseInt(dict.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核说明" prop="reason">
+          <el-input v-model="auditForm.reason" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitAuditForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAuth, getAuth, delAuth, addAuth, updateAuth,starList,audit } from "@/api/business/auth";
+
+export default {
+  name: "Auth",
+  dicts: ['app_user_auth_step', 'app_user_auth'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 主播认证表格数据
+      authList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      auditOpen: false,
+      typeMap:{},
+      typeList:[],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        uid: null,
+        cerNo: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      auditForm:{},
+      // 表单校验
+      rules: {
+      },
+      auditRules: {
+        status: [
+          { required: true, message: "请选择审核状态", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    var that = this;
+    starList().then(response => {
+      if (response.data) {
+        for (var i in response.data) {
+          var item = response.data[i];
+          that.typeMap[item.id.toString()] = item.name;
+          that.typeList.push({
+            value: item.id,
+            label: item.name
+          })
+        }
+      }
+      that.getList();
+    });
+  },
+  methods: {
+    getTypeName(id) {
+      return this.typeMap[id.toString()];
+    },
+    /** 查询主播认证列表 */
+    getList() {
+      this.loading = true;
+      listAuth(this.queryParams).then(response => {
+        this.authList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.auditOpen = false;
+      this.reset();
+      this.auditReset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        uid: null,
+        addtime: null,
+        backView: null,
+        cerNo: null,
+        extraInfo: null,
+        frontView: null,
+        handsetView: null,
+        mobile: null,
+        other1View: null,
+        other2View: null,
+        other3View: null,
+        pidLevel1: null,
+        pidLevel2: null,
+        pidLevel3: null,
+        pidLevel4: null,
+        qq: null,
+        realName: null,
+        reason: null,
+        starId: null,
+        status: null,
+        step: null,
+        uptime: null,
+        videoUrl: null,
+        wechat: null
+      };
+      this.resetForm("form");
+    },
+    // 表单重置
+    auditReset() {
+      this.form = {
+        uid: null,
+        reason: null,
+        starId: null,
+        status: null,
+      };
+      this.resetForm("auditForm");
+    },
+    openVideo(url){
+      window.open(url)
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.uid)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加主播认证";
+    },
+    /** 审核按钮操作 */
+    handleAudit(row) {
+      this.auditReset();
+      this.auditOpen = true;
+      this.title = "审核";
+      this.auditForm.uid = row.uid;
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const uid = row.uid || this.ids
+      getAuth(uid).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改主播认证";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.uid != null) {
+            updateAuth(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addAuth(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 提交按钮 */
+    submitAuditForm() {
+      this.$refs["auditForm"].validate(valid => {
+        if (valid) {
+          if(this.auditForm.status == 2 && !this.auditForm.reason){
+            this.$modal.msgError("请填写理由");
+            return
+          }
+          if(this.auditForm.status == 0 && !this.auditForm.starId){
+            this.$modal.msgError("请选择主播星级");
+            return
+          }
+          audit(this.auditForm).then(response => {
+            this.$modal.msgSuccess("审核成功");
+            this.auditOpen = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const uids = row.uid || this.ids;
+      this.$modal.confirm('是否确认删除主播认证编号为"' + uids + '"的数据项?').then(function() {
+        return delAuth(uids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('business/auth/export', {
+        ...this.queryParams
+      }, `auth_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>