dos před 2 měsíci
rodič
revize
653d2d83f4

+ 6 - 0
game-business/pom.xml

@@ -53,6 +53,12 @@
             <scope>compile</scope>
         </dependency>
 
+        <!-- 业务模块-->
+        <dependency>
+            <groupId>com.game</groupId>
+            <artifactId>game-system</artifactId>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 63 - 10
game-business/src/main/java/com/game/business/controller/AppUserController.java

@@ -1,23 +1,23 @@
 package com.game.business.controller;
 
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 import javax.servlet.http.HttpServletResponse;
 
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.RandomUtil;
-import com.game.business.domain.AppChargeChannel;
-import com.game.business.domain.AppUsersCharge;
-import com.game.business.domain.FinTranRecord;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import com.alibaba.fastjson2.JSONObject;
+import com.game.business.domain.*;
 import com.game.business.dto.RestPwdDto;
 import com.game.business.dto.UserChargeDto;
 import com.game.business.dto.UserWithdrawDto;
-import com.game.business.service.IAppChargeChannelService;
-import com.game.business.service.IAppUsersChargeService;
-import com.game.business.service.IFinTranRecordService;
+import com.game.business.service.*;
 import com.game.business.task.AppUserCountTask;
 import com.game.business.util.Md5Utils;
+import com.game.business.util.im.HttpClientUtils;
+import com.game.business.util.im.TencentCloudImUtil;
 import com.game.common.constant.AppSceneType;
 import com.game.common.constant.finance.FinTranAddedInfo;
 import com.game.common.constant.finance.FinTranType1;
@@ -27,6 +27,7 @@ import com.game.common.core.domain.HttpRet;
 import com.game.common.core.domain.R;
 import com.game.common.core.redis.RedisCache;
 import com.game.common.utils.SecurityUtils;
+import com.game.system.service.ISysConfigService;
 import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -49,8 +50,6 @@ import com.game.common.annotation.DataSource;
 import com.game.common.enums.DataSourceType;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import com.game.business.domain.AppUser;
-import com.game.business.service.IAppUserService;
 import com.game.common.utils.poi.ExcelUtil;
 import com.game.common.core.page.TableDataInfo;
 
@@ -81,9 +80,15 @@ public class AppUserController extends BaseController
     @Autowired
     private IFinTranRecordService finTranRecordService;
 
+    @Autowired
+    private ILiveLiveService liveLiveService;
+
     @Autowired
     private AppUserCountTask appUserCountTask;
 
+    @Autowired
+    private ISysConfigService sysConfigService;
+
     /**
      * 查询app用户列表
      */
@@ -94,6 +99,13 @@ public class AppUserController extends BaseController
     {
         startPage();
         List<AppUser> list = appUserService.selectAppUserList(appUser);
+        if(null != list && list.size() > 0){
+            list.forEach(e->{
+                if(e.getRole().intValue() == 1){
+                    e.setLiveLive(liveLiveService.selectLiveLiveByUserId(e.getUserid()));
+                }
+            });
+        }
         return getDataTable(list);
     }
 
@@ -248,6 +260,13 @@ public class AppUserController extends BaseController
             appUsersCharge.setPlatformServiceRate(userChargeDto.getRate());
             appUsersCharge.setAfterCoin(userChargeDto.getType()==0?BigDecimal.valueOf(afterUser.getCoin()):BigDecimal.valueOf(afterUser.getDiamondCoin()));
             appUsersChargeService.insertAppUsersCharge(appUsersCharge);
+
+            JSONObject paramJson = new JSONObject();
+            paramJson.put("type", "UserSystemNotify");
+            paramJson.put("subType", "UserRefreshBalance");
+            paramJson.put("content", JSONObject.parseObject("{'msg':'刷新余额'}"));
+            TencentCloudImUtil.imPushBatchSendMsg(Arrays.asList(String.valueOf(appUsersCharge.getUid())), paramJson.toString());
+
         } catch (Exception e) {
             log.info("{}充值失败:{}",userChargeDto.getUserId(),e.getMessage());
             return  R.fail("充值失败");
@@ -287,6 +306,29 @@ public class AppUserController extends BaseController
         return R.ok("补足流水成功");
     }
 
+    /**
+     * 开关播
+     */
+    @PreAuthorize("@ss.hasPermi('business:user:charge')")
+    @Log(title = "app用户", businessType = BusinessType.UPDATE)
+    @PostMapping("/openLive")
+    @ApiOperation(value = "开关播", notes = "开关播")
+    public R<String> openLive(HttpServletResponse response, @RequestBody LiveLive liveLive)
+    {
+        String url = sysConfigService.selectConfigByKey("sys_live_apiurl").concat("live/openCloseLive");
+        Map<String, String> map = new HashMap<>();
+        map.put("roomId", String.valueOf(liveLive.getId()));
+        map.put("liveType", "1");
+        map.put("isLive", String.valueOf(liveLive.getIslive()));
+        map.put("description", liveLive.getTitle());
+
+        String res = HttpClientUtils.ajaxPost(url,map);
+        if(StringUtils.isBlank(res) && JSONObject.parseObject(res).getString("code") != "1"){
+            return R.fail(liveLive.getIslive().intValue()==1?"关播":"虚拟开播"+"失败");
+        }
+        return R.ok(liveLive.getIslive().intValue()==1?"关播":"虚拟开播"+"成功");
+    }
+
     /**
      * 导出app用户列表
      */
@@ -347,4 +389,15 @@ public class AppUserController extends BaseController
     {
         return toAjax(appUserService.deleteAppUserByUserids(userids));
     }
+
+    public static void main(String[] args) {
+        Map<String, String> map = new HashMap<>();
+        map.put("roomId", "10000359");
+        map.put("liveType", "1");
+        map.put("isLive", "0");
+        map.put("description", "1");
+
+        String res = HttpClientUtils.ajaxPost("http://127.0.0.1:1801/api/live/httpOpenCloseLive",map);
+        System.out.println(res);
+    }
 }

+ 115 - 0
game-business/src/main/java/com/game/business/controller/LiveLiveController.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.LiveLive;
+import com.game.business.service.ILiveLiveService;
+import com.game.common.utils.poi.ExcelUtil;
+import com.game.common.core.page.TableDataInfo;
+
+/**
+ * 直播管理Controller
+ * 
+ * @author game
+ * @date 2024-08-30
+ */
+@RestController
+@RequestMapping("/business/live")
+@Api(value = "LiveLiveController", description = "直播管理接口", tags = {"直播管理"})
+public class LiveLiveController extends BaseController
+{
+    @Autowired
+    private ILiveLiveService liveLiveService;
+
+    /**
+     * 查询直播管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询直播管理列表", notes = "获取直播管理列表")
+    public TableDataInfo<LiveLive> list(LiveLive liveLive)
+    {
+        startPage();
+        List<LiveLive> list = liveLiveService.selectLiveLiveList(liveLive);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:export')")
+    @Log(title = "直播管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出直播管理列表", notes = "导出直播管理列表")
+    public void export(HttpServletResponse response, LiveLive liveLive)
+    {
+        List<LiveLive> list = liveLiveService.selectLiveLiveList(liveLive);
+        ExcelUtil<LiveLive> util = new ExcelUtil<LiveLive>(LiveLive.class);
+        util.exportExcel(response, list, "直播管理数据");
+    }
+
+    /**
+     * 获取直播管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取直播管理详细信息", notes = "获取直播管理详细信息")
+    public R<LiveLive> getInfo(@PathVariable("id") Long id)
+    {
+        return R.ok(liveLiveService.selectLiveLiveById(id));
+    }
+
+    /**
+     * 新增直播管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:add')")
+    @Log(title = "直播管理", businessType = BusinessType.INSERT)
+    @ApiOperation(value = "新增直播管理", notes = "新增直播管理")
+    @PostMapping
+    public R add(@RequestBody LiveLive liveLive)
+    {
+        return R.ok(liveLiveService.insertLiveLive(liveLive));
+    }
+
+    /**
+     * 修改直播管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:edit')")
+    @Log(title = "直播管理", businessType = BusinessType.UPDATE)
+    @ApiOperation(value = "修改直播管理", notes = "修改直播管理")
+    @PutMapping
+    public R edit(@RequestBody LiveLive liveLive)
+    {
+        return R.ok(liveLiveService.updateLiveLive(liveLive));
+    }
+
+    /**
+     * 删除直播管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:live:remove')")
+    @Log(title = "直播管理", businessType = BusinessType.DELETE)
+    @ApiOperation(value = "删除直播管理", notes = "删除直播管理")
+	@DeleteMapping("/{ids}")
+    public R remove(@PathVariable Long[] ids)
+    {
+        return R.ok(liveLiveService.deleteLiveLiveByIds(ids));
+    }
+}

+ 3 - 0
game-business/src/main/java/com/game/business/domain/AppUser.java

@@ -982,4 +982,7 @@ private static final long serialVersionUID=1L;
     @TableField(value = "withdraw")
     private Double withdraw;
 
+    @TableField(exist = false)
+    private LiveLive liveLive;
+
 }

+ 350 - 0
game-business/src/main/java/com/game/business/domain/LiveLive.java

@@ -0,0 +1,350 @@
+package com.game.business.domain;
+
+import java.math.BigDecimal;
+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;
+
+/**
+ * 直播管理对象 live_live
+ *
+ * @author game
+ * @date 2024-08-30
+ */
+@ApiModel(value = "live_live", description = "直播管理")
+@TableName(value= "live_live")
+@Data
+public class LiveLive
+        {
+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 = "address")
+    private String address;
+
+    /** 直播房间广告模板id 0:不启用 1:启用 */
+    @ApiModelProperty(value = "直播房间广告模板id 0:不启用 1:启用")
+    @Excel(name = "直播房间广告模板id 0:不启用 1:启用")
+    @TableField(value = "ads_template_id")
+    private Long adsTemplateId;
+
+    /**  用户头像 */
+    @ApiModelProperty(value = " 用户头像")
+    @Excel(name = " 用户头像")
+    @TableField(value = "avatar")
+    private String avatar;
+
+    /** 平台庄家余额 */
+    @ApiModelProperty(value = "平台庄家余额")
+    @Excel(name = "平台庄家余额")
+    @TableField(value = "banker_coin")
+    private Long bankerCoin;
+
+    /** 频道ID */
+    @ApiModelProperty(value = "频道ID")
+    @Excel(name = "频道ID")
+    @TableField(value = "channel_id")
+    private Long channelId;
+
+    /** 城市  */
+    @ApiModelProperty(value = "城市 ")
+    @Excel(name = "城市 ")
+    @TableField(value = "city")
+    private String city;
+
+    /** 是否演示账号: 0否  1是 */
+    @ApiModelProperty(value = "是否演示账号: 0否  1是")
+    @Excel(name = "是否演示账号: 0否  1是")
+    @TableField(value = "demo_account")
+    private Long demoAccount;
+
+    /** 游戏类型 */
+    @ApiModelProperty(value = "游戏类型")
+    @Excel(name = "游戏类型")
+    @TableField(value = "game_action")
+    private Long gameAction;
+
+    /**  靓号 */
+    @ApiModelProperty(value = " 靓号")
+    @Excel(name = " 靓号")
+    @TableField(value = "goodnum")
+    private String goodnum;
+
+    /** 位置 */
+    @ApiModelProperty(value = "位置")
+    @Excel(name = "位置")
+    @TableField(value = "hot_sort_id")
+    private Long hotSortId;
+
+    /** 热门礼物总额 */
+    @ApiModelProperty(value = "热门礼物总额")
+    @Excel(name = "热门礼物总额")
+    @TableField(value = "hotvotes")
+    private Long hotvotes;
+
+    /** 后台页面使用,不用管 */
+    @ApiModelProperty(value = "后台页面使用,不用管")
+    @Excel(name = "后台页面使用,不用管")
+    @TableField(value = "import_template_id")
+    private Long importTemplateId;
+
+    /** 使用直播房间广告模板 0:不启用 1:启用 */
+    @ApiModelProperty(value = "使用直播房间广告模板 0:不启用 1:启用")
+    @Excel(name = "使用直播房间广告模板 0:不启用 1:启用")
+    @TableField(value = "is_enable_template")
+    private Long isEnableTemplate;
+
+    /** 是否推荐 0:不推荐 1:推荐中 */
+    @ApiModelProperty(value = "是否推荐 0:不推荐 1:推荐中")
+    @Excel(name = "是否推荐 0:不推荐 1:推荐中")
+    @TableField(value = "is_recommend")
+    private Long isRecommend;
+
+    /** 直播状态 1:直播中 0:关播 */
+    @ApiModelProperty(value = "直播状态 1:直播中 0:关播")
+    @Excel(name = "直播状态 1:直播中 0:关播")
+    @TableField(value = "islive")
+    private Long islive;
+
+    /** 连麦开关,0是关,1是开 */
+    @ApiModelProperty(value = "连麦开关,0是关,1是开")
+    @Excel(name = "连麦开关,0是关,1是开")
+    @TableField(value = "ismic")
+    private Long ismic;
+
+    /** 是否假视频 */
+    @ApiModelProperty(value = "是否假视频")
+    @Excel(name = "是否假视频")
+    @TableField(value = "isvideo")
+    private Long isvideo;
+
+    /** 纬度 */
+    @ApiModelProperty(value = "纬度")
+    @Excel(name = "纬度")
+    @TableField(value = "lat")
+    private BigDecimal lat;
+
+    /** 是否有直播购 0:没有直播购 1:有直播购 */
+    @ApiModelProperty(value = "是否有直播购 0:没有直播购 1:有直播购")
+    @Excel(name = "是否有直播购 0:没有直播购 1:有直播购")
+    @TableField(value = "live_function")
+    private Long liveFunction;
+
+    /** 房间锁 1:上锁了 0:未上锁 */
+    @ApiModelProperty(value = "房间锁 1:上锁了 0:未上锁")
+    @Excel(name = "房间锁 1:上锁了 0:未上锁")
+    @TableField(value = "live_lock_status")
+    private Long liveLockStatus;
+
+    /** 经度 */
+    @ApiModelProperty(value = "经度")
+    @Excel(name = "经度")
+    @TableField(value = "lng")
+    private BigDecimal lng;
+
+    /**  用户昵称 */
+    @ApiModelProperty(value = " 用户昵称")
+    @Excel(name = " 用户昵称")
+    @TableField(value = "nickname")
+    private String nickname;
+
+    /**  公告 */
+    @ApiModelProperty(value = " 公告")
+    @Excel(name = " 公告")
+    @TableField(value = "notice")
+    private String notice;
+
+    /** 省份  */
+    @ApiModelProperty(value = "省份 ")
+    @Excel(name = "省份 ")
+    @TableField(value = "province")
+    private String province;
+
+    /** 播流地址 */
+    @ApiModelProperty(value = "播流地址")
+    @Excel(name = "播流地址")
+    @TableField(value = "pull")
+    private String pull;
+
+    /** 一级广告id */
+    @ApiModelProperty(value = "一级广告id")
+    @Excel(name = "一级广告id")
+    @TableField(value = "room_ads_id0")
+    private Long roomAdsId0;
+
+    /** 二级广告id1 */
+    @ApiModelProperty(value = "二级广告id1")
+    @Excel(name = "二级广告id1")
+    @TableField(value = "room_ads_id1")
+    private Long roomAdsId1;
+
+    /** 二级广告id2 */
+    @ApiModelProperty(value = "二级广告id2")
+    @Excel(name = "二级广告id2")
+    @TableField(value = "room_ads_id2")
+    private Long roomAdsId2;
+
+    /** 二级广告id3 */
+    @ApiModelProperty(value = "二级广告id3")
+    @Excel(name = "二级广告id3")
+    @TableField(value = "room_ads_id3")
+    private Long roomAdsId3;
+
+    /** 二级广告id4 */
+    @ApiModelProperty(value = "二级广告id4")
+    @Excel(name = "二级广告id4")
+    @TableField(value = "room_ads_id4")
+    private Long roomAdsId4;
+
+    /** 二级广告id5 */
+    @ApiModelProperty(value = "二级广告id5")
+    @Excel(name = "二级广告id5")
+    @TableField(value = "room_ads_id5")
+    private Long roomAdsId5;
+
+    /** 二级广告id6 */
+    @ApiModelProperty(value = "二级广告id6")
+    @Excel(name = "二级广告id6")
+    @TableField(value = "room_ads_id6")
+    private Long roomAdsId6;
+
+    /** 二级广告id7 */
+    @ApiModelProperty(value = "二级广告id7")
+    @Excel(name = "二级广告id7")
+    @TableField(value = "room_ads_id7")
+    private Long roomAdsId7;
+
+    /** 二级广告id8 */
+    @ApiModelProperty(value = "二级广告id8")
+    @Excel(name = "二级广告id8")
+    @TableField(value = "room_ads_id8")
+    private Long roomAdsId8;
+
+    /** 房间状态 1:开启 0:关闭 */
+    @ApiModelProperty(value = "房间状态 1:开启 0:关闭")
+    @Excel(name = "房间状态 1:开启 0:关闭")
+    @TableField(value = "room_status")
+    private Long roomStatus;
+
+    /** 房间类型 0:是一般直播 1:是私密直播 2:是收费直播 3:是计时直播 4:贵族房间 */
+    @ApiModelProperty(value = "房间类型 0:是一般直播 1:是私密直播 2:是收费直播 3:是计时直播 4:贵族房间")
+    @Excel(name = "房间类型 0:是一般直播 1:是私密直播 2:是收费直播 3:是计时直播 4:贵族房间")
+    @TableField(value = "room_type")
+    private Long roomType;
+
+    /** 房间类型值 */
+    @ApiModelProperty(value = "房间类型值")
+    @Excel(name = "房间类型值")
+    @TableField(value = "room_type_val")
+    private String roomTypeVal;
+
+    /**  直播横幅 */
+    @ApiModelProperty(value = " 直播横幅")
+    @Excel(name = " 直播横幅")
+    @TableField(value = "shop_live_banner")
+    private String shopLiveBanner;
+
+    /**  直播购房间标签 */
+    @ApiModelProperty(value = " 直播购房间标签")
+    @Excel(name = " 直播购房间标签")
+    @TableField(value = "shop_room_label")
+    private String shopRoomLabel;
+
+    /** 直播标识  */
+    @ApiModelProperty(value = "直播标识 ")
+    @Excel(name = "直播标识 ")
+    @TableField(value = "showid")
+    private String showid;
+
+    /** 权重排序字段 */
+    @ApiModelProperty(value = "权重排序字段")
+    @Excel(name = "权重排序字段")
+    @TableField(value = "sort")
+    private Long sort;
+
+    /** 开播时间  */
+    @ApiModelProperty(value = "开播时间 ")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "开播时间 " , width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField(value = "starttime")
+    private Date starttime;
+
+    /** 流名 */
+    @ApiModelProperty(value = "流名")
+    @Excel(name = "流名")
+    @TableField(value = "stream")
+    private String stream;
+
+    /** 标签名 */
+    @ApiModelProperty(value = "标签名")
+    @Excel(name = "标签名")
+    @TableField(value = "tab_name")
+    private String tabName;
+
+    /** 标签样式 */
+    @ApiModelProperty(value = "标签样式")
+    @Excel(name = "标签样式")
+    @TableField(value = "tab_style")
+    private String tabStyle;
+
+    /** 封面图 */
+    @ApiModelProperty(value = "封面图")
+    @Excel(name = "封面图")
+    @TableField(value = "thumb")
+    private String thumb;
+
+    /** 封面图审核人 */
+    @ApiModelProperty(value = "封面图审核人")
+    @Excel(name = "封面图审核人")
+    @TableField(value = "thumb_audit_by")
+    private String thumbAuditBy;
+
+    /** 封面图未通过原因 */
+    @ApiModelProperty(value = "封面图未通过原因")
+    @Excel(name = "封面图未通过原因")
+    @TableField(value = "thumb_audit_reason")
+    private String thumbAuditReason;
+
+    /** 封面审核时间  */
+    @ApiModelProperty(value = "封面审核时间 ")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "封面审核时间 " , width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField(value = "thumb_audit_time")
+    private Date thumbAuditTime;
+
+    /** 封面审核状态 */
+    @ApiModelProperty(value = "封面审核状态")
+    @Excel(name = "封面审核状态")
+    @TableField(value = "thumb_state")
+    private Long thumbState;
+
+    /** 标题  */
+    @ApiModelProperty(value = "标题 ")
+    @Excel(name = "标题 ")
+    @TableField(value = "title")
+    private String title;
+
+    /**  用户id */
+    @ApiModelProperty(value = " 用户id")
+    @Excel(name = " 用户id")
+    @TableField(value = "user_id")
+    private Long userId;
+
+}

+ 61 - 0
game-business/src/main/java/com/game/business/mapper/LiveLiveMapper.java

@@ -0,0 +1,61 @@
+package com.game.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.game.business.domain.LiveLive;
+
+/**
+ * 直播管理Mapper接口
+ *
+ * @author game
+ * @date 2024-08-30
+ */
+public interface LiveLiveMapper extends BaseMapper<LiveLive> {
+    /**
+     * 查询直播管理
+     *
+     * @param id 直播管理主键
+     * @return 直播管理
+     */
+    public LiveLive selectLiveLiveById(Long id);
+
+    /**
+     * 查询直播管理列表
+     *
+     * @param liveLive 直播管理
+     * @return 直播管理集合
+     */
+    public List<LiveLive> selectLiveLiveList(LiveLive liveLive);
+
+    /**
+     * 新增直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    public int insertLiveLive(LiveLive liveLive);
+
+    /**
+     * 修改直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    public int updateLiveLive(LiveLive liveLive);
+
+    /**
+     * 删除直播管理
+     *
+     * @param id 直播管理主键
+     * @return 结果
+     */
+    public int deleteLiveLiveById(Long id);
+
+    /**
+     * 批量删除直播管理
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteLiveLiveByIds(Long[] ids);
+}

+ 69 - 0
game-business/src/main/java/com/game/business/service/ILiveLiveService.java

@@ -0,0 +1,69 @@
+package com.game.business.service;
+
+import java.util.List;
+import com.game.business.domain.LiveLive;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 直播管理Service接口
+ *
+ * @author game
+ * @date 2024-08-30
+ */
+public interface ILiveLiveService extends IService<LiveLive> {
+    /**
+     * 查询直播管理
+     *
+     * @param id 直播管理主键
+     * @return 直播管理
+     */
+    public LiveLive selectLiveLiveById(Long id);
+
+    /**
+     * 查询直播管理
+     *
+     * @param userId
+     * @return 直播管理
+     */
+    public LiveLive selectLiveLiveByUserId(Long userId);
+
+    /**
+     * 查询直播管理列表
+     *
+     * @param liveLive 直播管理
+     * @return 直播管理集合
+     */
+    public List<LiveLive> selectLiveLiveList(LiveLive liveLive);
+
+    /**
+     * 新增直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    public int insertLiveLive(LiveLive liveLive);
+
+    /**
+     * 修改直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    public int updateLiveLive(LiveLive liveLive);
+
+    /**
+     * 批量删除直播管理
+     *
+     * @param ids 需要删除的直播管理主键集合
+     * @return 结果
+     */
+    public int deleteLiveLiveByIds(Long[] ids);
+
+    /**
+     * 删除直播管理信息
+     *
+     * @param id 直播管理主键
+     * @return 结果
+     */
+    public int deleteLiveLiveById(Long id);
+}

+ 104 - 0
game-business/src/main/java/com/game/business/service/impl/LiveLiveServiceImpl.java

@@ -0,0 +1,104 @@
+package com.game.business.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.game.business.mapper.LiveLiveMapper;
+import com.game.business.domain.LiveLive;
+import com.game.business.service.ILiveLiveService;
+import com.game.common.annotation.DataSource;
+import com.game.common.enums.DataSourceType;
+
+/**
+ * 直播管理Service业务层处理
+ *
+ * @author game
+ * @date 2024-08-30
+ */
+@Service
+public class LiveLiveServiceImpl extends ServiceImpl<LiveLiveMapper, LiveLive> implements ILiveLiveService {
+    @Autowired
+    private LiveLiveMapper liveLiveMapper;
+
+    /**
+     * 查询直播管理
+     *
+     * @param id 直播管理主键
+     * @return 直播管理
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public LiveLive selectLiveLiveById(Long id) {
+        return liveLiveMapper.selectLiveLiveById(id);
+    }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public LiveLive selectLiveLiveByUserId(Long userId) {
+        LambdaQueryWrapper<LiveLive> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(LiveLive::getUserId, userId);
+        return liveLiveMapper.selectOne(queryWrapper);
+    }
+
+    /**
+     * 查询直播管理列表
+     *
+     * @param liveLive 直播管理
+     * @return 直播管理
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public List<LiveLive> selectLiveLiveList(LiveLive liveLive) {
+        return liveLiveMapper.selectLiveLiveList(liveLive);
+    }
+
+    /**
+     * 新增直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int insertLiveLive(LiveLive liveLive) {
+            return liveLiveMapper.insertLiveLive(liveLive);
+    }
+
+    /**
+     * 修改直播管理
+     *
+     * @param liveLive 直播管理
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int updateLiveLive(LiveLive liveLive) {
+        return liveLiveMapper.updateLiveLive(liveLive);
+    }
+
+    /**
+     * 批量删除直播管理
+     *
+     * @param ids 需要删除的直播管理主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteLiveLiveByIds(Long[] ids) {
+        return liveLiveMapper.deleteLiveLiveByIds(ids);
+    }
+
+    /**
+     * 删除直播管理信息
+     *
+     * @param id 直播管理主键
+     * @return 结果
+     */
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public int deleteLiveLiveById(Long id) {
+        return liveLiveMapper.deleteLiveLiveById(id);
+    }
+}

+ 313 - 0
game-business/src/main/resources/mapper/business/LiveLiveMapper.xml

@@ -0,0 +1,313 @@
+<?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.LiveLiveMapper">
+    
+    <resultMap type="com.game.business.domain.LiveLive" id="LiveLiveResult">
+        <result property="id"    column="id"    />
+        <result property="address"    column="address"    />
+        <result property="adsTemplateId"    column="ads_template_id"    />
+        <result property="avatar"    column="avatar"    />
+        <result property="bankerCoin"    column="banker_coin"    />
+        <result property="channelId"    column="channel_id"    />
+        <result property="city"    column="city"    />
+        <result property="demoAccount"    column="demo_account"    />
+        <result property="gameAction"    column="game_action"    />
+        <result property="goodnum"    column="goodnum"    />
+        <result property="hotSortId"    column="hot_sort_id"    />
+        <result property="hotvotes"    column="hotvotes"    />
+        <result property="importTemplateId"    column="import_template_id"    />
+        <result property="isEnableTemplate"    column="is_enable_template"    />
+        <result property="isRecommend"    column="is_recommend"    />
+        <result property="islive"    column="islive"    />
+        <result property="ismic"    column="ismic"    />
+        <result property="isvideo"    column="isvideo"    />
+        <result property="lat"    column="lat"    />
+        <result property="liveFunction"    column="live_function"    />
+        <result property="liveLockStatus"    column="live_lock_status"    />
+        <result property="lng"    column="lng"    />
+        <result property="nickname"    column="nickname"    />
+        <result property="notice"    column="notice"    />
+        <result property="province"    column="province"    />
+        <result property="pull"    column="pull"    />
+        <result property="roomAdsId0"    column="room_ads_id0"    />
+        <result property="roomAdsId1"    column="room_ads_id1"    />
+        <result property="roomAdsId2"    column="room_ads_id2"    />
+        <result property="roomAdsId3"    column="room_ads_id3"    />
+        <result property="roomAdsId4"    column="room_ads_id4"    />
+        <result property="roomAdsId5"    column="room_ads_id5"    />
+        <result property="roomAdsId6"    column="room_ads_id6"    />
+        <result property="roomAdsId7"    column="room_ads_id7"    />
+        <result property="roomAdsId8"    column="room_ads_id8"    />
+        <result property="roomStatus"    column="room_status"    />
+        <result property="roomType"    column="room_type"    />
+        <result property="roomTypeVal"    column="room_type_val"    />
+        <result property="shopLiveBanner"    column="shop_live_banner"    />
+        <result property="shopRoomLabel"    column="shop_room_label"    />
+        <result property="showid"    column="showid"    />
+        <result property="sort"    column="sort"    />
+        <result property="starttime"    column="starttime"    />
+        <result property="stream"    column="stream"    />
+        <result property="tabName"    column="tab_name"    />
+        <result property="tabStyle"    column="tab_style"    />
+        <result property="thumb"    column="thumb"    />
+        <result property="thumbAuditBy"    column="thumb_audit_by"    />
+        <result property="thumbAuditReason"    column="thumb_audit_reason"    />
+        <result property="thumbAuditTime"    column="thumb_audit_time"    />
+        <result property="thumbState"    column="thumb_state"    />
+        <result property="title"    column="title"    />
+        <result property="userId"    column="user_id"    />
+    </resultMap>
+
+    <sql id="selectLiveLiveVo">
+        select id, address, ads_template_id, avatar, banker_coin, channel_id, city, demo_account, game_action, goodnum, hot_sort_id, hotvotes, import_template_id, is_enable_template, is_recommend, islive, ismic, isvideo, lat, live_function, live_lock_status, lng, nickname, notice, province, pull, room_ads_id0, room_ads_id1, room_ads_id2, room_ads_id3, room_ads_id4, room_ads_id5, room_ads_id6, room_ads_id7, room_ads_id8, room_status, room_type, room_type_val, shop_live_banner, shop_room_label, showid, sort, starttime, stream, tab_name, tab_style, thumb, thumb_audit_by, thumb_audit_reason, thumb_audit_time, thumb_state, title, user_id from live_live
+    </sql>
+
+    <select id="selectLiveLiveList" parameterType="com.game.business.domain.LiveLive" resultMap="LiveLiveResult">
+        <include refid="selectLiveLiveVo"/>
+        <where>  
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="adsTemplateId != null "> and ads_template_id = #{adsTemplateId}</if>
+            <if test="avatar != null  and avatar != ''"> and avatar = #{avatar}</if>
+            <if test="bankerCoin != null "> and banker_coin = #{bankerCoin}</if>
+            <if test="channelId != null "> and channel_id = #{channelId}</if>
+            <if test="city != null  and city != ''"> and city = #{city}</if>
+            <if test="demoAccount != null "> and demo_account = #{demoAccount}</if>
+            <if test="gameAction != null "> and game_action = #{gameAction}</if>
+            <if test="goodnum != null  and goodnum != ''"> and goodnum = #{goodnum}</if>
+            <if test="hotSortId != null "> and hot_sort_id = #{hotSortId}</if>
+            <if test="hotvotes != null "> and hotvotes = #{hotvotes}</if>
+            <if test="importTemplateId != null "> and import_template_id = #{importTemplateId}</if>
+            <if test="isEnableTemplate != null "> and is_enable_template = #{isEnableTemplate}</if>
+            <if test="isRecommend != null "> and is_recommend = #{isRecommend}</if>
+            <if test="islive != null "> and islive = #{islive}</if>
+            <if test="ismic != null "> and ismic = #{ismic}</if>
+            <if test="isvideo != null "> and isvideo = #{isvideo}</if>
+            <if test="lat != null "> and lat = #{lat}</if>
+            <if test="liveFunction != null "> and live_function = #{liveFunction}</if>
+            <if test="liveLockStatus != null "> and live_lock_status = #{liveLockStatus}</if>
+            <if test="lng != null "> and lng = #{lng}</if>
+            <if test="nickname != null  and nickname != ''"> and nickname like concat('%', #{nickname}, '%')</if>
+            <if test="notice != null  and notice != ''"> and notice = #{notice}</if>
+            <if test="province != null  and province != ''"> and province = #{province}</if>
+            <if test="pull != null  and pull != ''"> and pull = #{pull}</if>
+            <if test="roomAdsId0 != null "> and room_ads_id0 = #{roomAdsId0}</if>
+            <if test="roomAdsId1 != null "> and room_ads_id1 = #{roomAdsId1}</if>
+            <if test="roomAdsId2 != null "> and room_ads_id2 = #{roomAdsId2}</if>
+            <if test="roomAdsId3 != null "> and room_ads_id3 = #{roomAdsId3}</if>
+            <if test="roomAdsId4 != null "> and room_ads_id4 = #{roomAdsId4}</if>
+            <if test="roomAdsId5 != null "> and room_ads_id5 = #{roomAdsId5}</if>
+            <if test="roomAdsId6 != null "> and room_ads_id6 = #{roomAdsId6}</if>
+            <if test="roomAdsId7 != null "> and room_ads_id7 = #{roomAdsId7}</if>
+            <if test="roomAdsId8 != null "> and room_ads_id8 = #{roomAdsId8}</if>
+            <if test="roomStatus != null "> and room_status = #{roomStatus}</if>
+            <if test="roomType != null "> and room_type = #{roomType}</if>
+            <if test="roomTypeVal != null  and roomTypeVal != ''"> and room_type_val = #{roomTypeVal}</if>
+            <if test="shopLiveBanner != null  and shopLiveBanner != ''"> and shop_live_banner = #{shopLiveBanner}</if>
+            <if test="shopRoomLabel != null  and shopRoomLabel != ''"> and shop_room_label = #{shopRoomLabel}</if>
+            <if test="showid != null  and showid != ''"> and showid = #{showid}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="starttime != null "> and starttime = #{starttime}</if>
+            <if test="stream != null  and stream != ''"> and stream = #{stream}</if>
+            <if test="tabName != null  and tabName != ''"> and tab_name like concat('%', #{tabName}, '%')</if>
+            <if test="tabStyle != null  and tabStyle != ''"> and tab_style = #{tabStyle}</if>
+            <if test="thumb != null  and thumb != ''"> and thumb = #{thumb}</if>
+            <if test="thumbAuditBy != null  and thumbAuditBy != ''"> and thumb_audit_by = #{thumbAuditBy}</if>
+            <if test="thumbAuditReason != null  and thumbAuditReason != ''"> and thumb_audit_reason = #{thumbAuditReason}</if>
+            <if test="thumbAuditTime != null "> and thumb_audit_time = #{thumbAuditTime}</if>
+            <if test="thumbState != null "> and thumb_state = #{thumbState}</if>
+            <if test="title != null  and title != ''"> and title = #{title}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+        </where>
+    </select>
+    
+    <select id="selectLiveLiveById" parameterType="Long" resultMap="LiveLiveResult">
+        <include refid="selectLiveLiveVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertLiveLive" parameterType="com.game.business.domain.LiveLive">
+        insert into live_live
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="address != null">address,</if>
+            <if test="adsTemplateId != null">ads_template_id,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="bankerCoin != null">banker_coin,</if>
+            <if test="channelId != null">channel_id,</if>
+            <if test="city != null">city,</if>
+            <if test="demoAccount != null">demo_account,</if>
+            <if test="gameAction != null">game_action,</if>
+            <if test="goodnum != null">goodnum,</if>
+            <if test="hotSortId != null">hot_sort_id,</if>
+            <if test="hotvotes != null">hotvotes,</if>
+            <if test="importTemplateId != null">import_template_id,</if>
+            <if test="isEnableTemplate != null">is_enable_template,</if>
+            <if test="isRecommend != null">is_recommend,</if>
+            <if test="islive != null">islive,</if>
+            <if test="ismic != null">ismic,</if>
+            <if test="isvideo != null">isvideo,</if>
+            <if test="lat != null">lat,</if>
+            <if test="liveFunction != null">live_function,</if>
+            <if test="liveLockStatus != null">live_lock_status,</if>
+            <if test="lng != null">lng,</if>
+            <if test="nickname != null">nickname,</if>
+            <if test="notice != null">notice,</if>
+            <if test="province != null">province,</if>
+            <if test="pull != null">pull,</if>
+            <if test="roomAdsId0 != null">room_ads_id0,</if>
+            <if test="roomAdsId1 != null">room_ads_id1,</if>
+            <if test="roomAdsId2 != null">room_ads_id2,</if>
+            <if test="roomAdsId3 != null">room_ads_id3,</if>
+            <if test="roomAdsId4 != null">room_ads_id4,</if>
+            <if test="roomAdsId5 != null">room_ads_id5,</if>
+            <if test="roomAdsId6 != null">room_ads_id6,</if>
+            <if test="roomAdsId7 != null">room_ads_id7,</if>
+            <if test="roomAdsId8 != null">room_ads_id8,</if>
+            <if test="roomStatus != null">room_status,</if>
+            <if test="roomType != null">room_type,</if>
+            <if test="roomTypeVal != null">room_type_val,</if>
+            <if test="shopLiveBanner != null">shop_live_banner,</if>
+            <if test="shopRoomLabel != null">shop_room_label,</if>
+            <if test="showid != null">showid,</if>
+            <if test="sort != null">sort,</if>
+            <if test="starttime != null">starttime,</if>
+            <if test="stream != null">stream,</if>
+            <if test="tabName != null">tab_name,</if>
+            <if test="tabStyle != null">tab_style,</if>
+            <if test="thumb != null">thumb,</if>
+            <if test="thumbAuditBy != null">thumb_audit_by,</if>
+            <if test="thumbAuditReason != null">thumb_audit_reason,</if>
+            <if test="thumbAuditTime != null">thumb_audit_time,</if>
+            <if test="thumbState != null">thumb_state,</if>
+            <if test="title != null">title,</if>
+            <if test="userId != null">user_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="address != null">#{address},</if>
+            <if test="adsTemplateId != null">#{adsTemplateId},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="bankerCoin != null">#{bankerCoin},</if>
+            <if test="channelId != null">#{channelId},</if>
+            <if test="city != null">#{city},</if>
+            <if test="demoAccount != null">#{demoAccount},</if>
+            <if test="gameAction != null">#{gameAction},</if>
+            <if test="goodnum != null">#{goodnum},</if>
+            <if test="hotSortId != null">#{hotSortId},</if>
+            <if test="hotvotes != null">#{hotvotes},</if>
+            <if test="importTemplateId != null">#{importTemplateId},</if>
+            <if test="isEnableTemplate != null">#{isEnableTemplate},</if>
+            <if test="isRecommend != null">#{isRecommend},</if>
+            <if test="islive != null">#{islive},</if>
+            <if test="ismic != null">#{ismic},</if>
+            <if test="isvideo != null">#{isvideo},</if>
+            <if test="lat != null">#{lat},</if>
+            <if test="liveFunction != null">#{liveFunction},</if>
+            <if test="liveLockStatus != null">#{liveLockStatus},</if>
+            <if test="lng != null">#{lng},</if>
+            <if test="nickname != null">#{nickname},</if>
+            <if test="notice != null">#{notice},</if>
+            <if test="province != null">#{province},</if>
+            <if test="pull != null">#{pull},</if>
+            <if test="roomAdsId0 != null">#{roomAdsId0},</if>
+            <if test="roomAdsId1 != null">#{roomAdsId1},</if>
+            <if test="roomAdsId2 != null">#{roomAdsId2},</if>
+            <if test="roomAdsId3 != null">#{roomAdsId3},</if>
+            <if test="roomAdsId4 != null">#{roomAdsId4},</if>
+            <if test="roomAdsId5 != null">#{roomAdsId5},</if>
+            <if test="roomAdsId6 != null">#{roomAdsId6},</if>
+            <if test="roomAdsId7 != null">#{roomAdsId7},</if>
+            <if test="roomAdsId8 != null">#{roomAdsId8},</if>
+            <if test="roomStatus != null">#{roomStatus},</if>
+            <if test="roomType != null">#{roomType},</if>
+            <if test="roomTypeVal != null">#{roomTypeVal},</if>
+            <if test="shopLiveBanner != null">#{shopLiveBanner},</if>
+            <if test="shopRoomLabel != null">#{shopRoomLabel},</if>
+            <if test="showid != null">#{showid},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="starttime != null">#{starttime},</if>
+            <if test="stream != null">#{stream},</if>
+            <if test="tabName != null">#{tabName},</if>
+            <if test="tabStyle != null">#{tabStyle},</if>
+            <if test="thumb != null">#{thumb},</if>
+            <if test="thumbAuditBy != null">#{thumbAuditBy},</if>
+            <if test="thumbAuditReason != null">#{thumbAuditReason},</if>
+            <if test="thumbAuditTime != null">#{thumbAuditTime},</if>
+            <if test="thumbState != null">#{thumbState},</if>
+            <if test="title != null">#{title},</if>
+            <if test="userId != null">#{userId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveLive" parameterType="com.game.business.domain.LiveLive">
+        update live_live
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="address != null">address = #{address},</if>
+            <if test="adsTemplateId != null">ads_template_id = #{adsTemplateId},</if>
+            <if test="avatar != null">avatar = #{avatar},</if>
+            <if test="bankerCoin != null">banker_coin = #{bankerCoin},</if>
+            <if test="channelId != null">channel_id = #{channelId},</if>
+            <if test="city != null">city = #{city},</if>
+            <if test="demoAccount != null">demo_account = #{demoAccount},</if>
+            <if test="gameAction != null">game_action = #{gameAction},</if>
+            <if test="goodnum != null">goodnum = #{goodnum},</if>
+            <if test="hotSortId != null">hot_sort_id = #{hotSortId},</if>
+            <if test="hotvotes != null">hotvotes = #{hotvotes},</if>
+            <if test="importTemplateId != null">import_template_id = #{importTemplateId},</if>
+            <if test="isEnableTemplate != null">is_enable_template = #{isEnableTemplate},</if>
+            <if test="isRecommend != null">is_recommend = #{isRecommend},</if>
+            <if test="islive != null">islive = #{islive},</if>
+            <if test="ismic != null">ismic = #{ismic},</if>
+            <if test="isvideo != null">isvideo = #{isvideo},</if>
+            <if test="lat != null">lat = #{lat},</if>
+            <if test="liveFunction != null">live_function = #{liveFunction},</if>
+            <if test="liveLockStatus != null">live_lock_status = #{liveLockStatus},</if>
+            <if test="lng != null">lng = #{lng},</if>
+            <if test="nickname != null">nickname = #{nickname},</if>
+            <if test="notice != null">notice = #{notice},</if>
+            <if test="province != null">province = #{province},</if>
+            <if test="pull != null">pull = #{pull},</if>
+            <if test="roomAdsId0 != null">room_ads_id0 = #{roomAdsId0},</if>
+            <if test="roomAdsId1 != null">room_ads_id1 = #{roomAdsId1},</if>
+            <if test="roomAdsId2 != null">room_ads_id2 = #{roomAdsId2},</if>
+            <if test="roomAdsId3 != null">room_ads_id3 = #{roomAdsId3},</if>
+            <if test="roomAdsId4 != null">room_ads_id4 = #{roomAdsId4},</if>
+            <if test="roomAdsId5 != null">room_ads_id5 = #{roomAdsId5},</if>
+            <if test="roomAdsId6 != null">room_ads_id6 = #{roomAdsId6},</if>
+            <if test="roomAdsId7 != null">room_ads_id7 = #{roomAdsId7},</if>
+            <if test="roomAdsId8 != null">room_ads_id8 = #{roomAdsId8},</if>
+            <if test="roomStatus != null">room_status = #{roomStatus},</if>
+            <if test="roomType != null">room_type = #{roomType},</if>
+            <if test="roomTypeVal != null">room_type_val = #{roomTypeVal},</if>
+            <if test="shopLiveBanner != null">shop_live_banner = #{shopLiveBanner},</if>
+            <if test="shopRoomLabel != null">shop_room_label = #{shopRoomLabel},</if>
+            <if test="showid != null">showid = #{showid},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="starttime != null">starttime = #{starttime},</if>
+            <if test="stream != null">stream = #{stream},</if>
+            <if test="tabName != null">tab_name = #{tabName},</if>
+            <if test="tabStyle != null">tab_style = #{tabStyle},</if>
+            <if test="thumb != null">thumb = #{thumb},</if>
+            <if test="thumbAuditBy != null">thumb_audit_by = #{thumbAuditBy},</if>
+            <if test="thumbAuditReason != null">thumb_audit_reason = #{thumbAuditReason},</if>
+            <if test="thumbAuditTime != null">thumb_audit_time = #{thumbAuditTime},</if>
+            <if test="thumbState != null">thumb_state = #{thumbState},</if>
+            <if test="title != null">title = #{title},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLiveLiveById" parameterType="Long">
+        delete from live_live where id = #{id}
+    </delete>
+
+    <delete id="deleteLiveLiveByIds" parameterType="String">
+        delete from live_live where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 9 - 0
game-ui/src/api/business/user.js

@@ -85,3 +85,12 @@ export function withdraw(data) {
     data: data
   })
 }
+
+// 开关播
+export function openLive(data) {
+  return request({
+    url: '/business/user/openLive',
+    method: 'post',
+    data: data
+  })
+}

+ 18 - 2
game-ui/src/views/business/channel/index.vue

@@ -188,6 +188,11 @@
           {{scope.row.withdrawRate * 100 + "%"}}
         </template>
       </el-table-column>
+      <el-table-column label="是否开启" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.app_channel_status" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
 <!--      <el-table-column label="logo" align="center" prop="logoUrl" />
       <el-table-column label="付款公司名" align="center" prop="company" />
       <el-table-column label="支付id" align="center" prop="appId" />
@@ -230,8 +235,8 @@
     />
 
     <!-- 添加或修改充值渠道对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="30%" lable-position="left">
         <el-form-item label="名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入名称" />
         </el-form-item>
@@ -244,6 +249,16 @@
         <el-form-item label="提现手续费(%)" prop="withdrawRate">
           <el-input v-model="form.withdrawRate" placeholder="请输入提现手续费" />
         </el-form-item>
+        <el-form-item label="是否开启" prop="status">
+          <el-select v-model="form.status" placeholder="请选择状态">
+            <el-option
+              v-for="dict in dict.type.app_channel_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="parseInt(dict.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
 <!--        <el-form-item label="logo" prop="logoUrl">
           <el-input v-model="form.logoUrl" placeholder="请输入logo" />
         </el-form-item>
@@ -294,6 +309,7 @@ import { listChannel, getChannel, delChannel, addChannel, updateChannel } from "
 
 export default {
   name: "Channel",
+  dicts: ['app_channel_status'],
   data() {
     return {
       // 遮罩层

+ 42 - 1
game-ui/src/views/business/user/index.vue

@@ -176,6 +176,13 @@
       </el-table-column>
       <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            v-if="scope.row.role == 1 && scope.row.liveLive"
+            @click="handleLive(scope.row)"
+          >{{scope.row.liveLive.islive==1?'关播':'虚拟开播'}}</el-button>
           <el-button
             size="mini"
             type="text"
@@ -463,11 +470,25 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 虚拟开播对话框 -->
+    <el-dialog :title="title" :visible.sync="liveOpen" width="700px" append-to-body>
+      <el-form :validate-on-rule-change=false label-width="150px">
+        <el-form-item label="关播提示" prop="amount" v-if="liveLive.islive == 1">
+          <el-input type="text" v-model="resetWithdrawForm.amount" placeholder="请输入" />
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitLiveForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw } from "@/api/business/user";
+import { listUser, getUser, delUser, addUser, updateUser,resetUser,userCharge,channelList,withdraw,openLive } from "@/api/business/user";
 
 export default {
   name: "User",
@@ -502,6 +523,9 @@ export default {
       isReadOnly:true,
       rate:null,
       channelMap:{},
+      liveLive:{},
+      liveOpen:false,
+      closeMsg:null,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -602,6 +626,7 @@ export default {
       this.resetPwdopen = false;
       this.chargeopen = false;
       this.resetWithdrawopen = false;
+      this.liveOpen = false;
       this.reset();
       this.resetPwd();
       this.resetCharge();
@@ -828,6 +853,12 @@ export default {
         this.title = "修改app用户";
       });
     },
+    handleLive(row){
+      this.liveLive = row.liveLive;
+      this.title = row.liveLive.islive==1?"关播":"虚拟开播";
+      this.liveOpen = true;
+      this.closeMsg = null;
+    },
     /** 重置密码按钮操作 */
     handleRestPwd(row) {
       this.resetPwd();
@@ -962,6 +993,16 @@ export default {
         }
       });
     },
+    /** 开关播提交按钮 */
+    submitLiveForm() {
+      var that =this;
+      this.liveLive["title"] = this.closeMsg;
+      openLive(this.liveLive).then(response => {
+        this.$modal.msgSuccess(this.liveLive.islive==1?"关播":"虚拟开播"+"成功");
+        this.liveOpen = false;
+        this.getList();
+      });
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const userids = row.userid || this.ids;