Ver código fonte

红包抽奖新增代码

chenguo 3 dias atrás
pai
commit
9692217ff6
48 arquivos alterados com 3268 adições e 1 exclusões
  1. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveEventConfController.java
  2. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveLotteryConfController.java
  3. 4 0
      fs-admin/src/main/java/com/fs/live/controller/LiveLotteryController.java
  4. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveLotteryRecordController.java
  5. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveLotteryRegistrationController.java
  6. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveRedConfController.java
  7. 4 0
      fs-admin/src/main/java/com/fs/live/controller/LiveRedController.java
  8. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveUserLotteryRecordController.java
  9. 103 0
      fs-admin/src/main/java/com/fs/live/controller/LiveUserRedRecordController.java
  10. 13 0
      fs-live-app/src/main/java/com/fs/app/controller/LiveGiftController.java
  11. 18 0
      fs-live-app/src/main/java/com/fs/app/controller/LiveLotteryController.java
  12. 13 0
      fs-live-app/src/main/java/com/fs/app/controller/LiveRedController.java
  13. 2 1
      fs-service/src/main/java/com/fs/live/domain/LiveAnchor.java
  14. 44 0
      fs-service/src/main/java/com/fs/live/domain/LiveEventConf.java
  15. 70 0
      fs-service/src/main/java/com/fs/live/domain/LiveLotteryConf.java
  16. 37 0
      fs-service/src/main/java/com/fs/live/domain/LiveLotteryRecord.java
  17. 46 0
      fs-service/src/main/java/com/fs/live/domain/LiveLotteryRegistration.java
  18. 60 0
      fs-service/src/main/java/com/fs/live/domain/LiveRedConf.java
  19. 47 0
      fs-service/src/main/java/com/fs/live/domain/LiveUserLotteryRecord.java
  20. 47 0
      fs-service/src/main/java/com/fs/live/domain/LiveUserRedRecord.java
  21. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveEventConfMapper.java
  22. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveLotteryConfMapper.java
  23. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveLotteryRecordMapper.java
  24. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveLotteryRegistrationMapper.java
  25. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveRedConfMapper.java
  26. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveUserLotteryRecordMapper.java
  27. 61 0
      fs-service/src/main/java/com/fs/live/mapper/LiveUserRedRecordMapper.java
  28. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveEventConfService.java
  29. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveLotteryConfService.java
  30. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveLotteryRecordService.java
  31. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveLotteryRegistrationService.java
  32. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveRedConfService.java
  33. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveUserLotteryRecordService.java
  34. 61 0
      fs-service/src/main/java/com/fs/live/service/ILiveUserRedRecordService.java
  35. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveEventConfServiceImpl.java
  36. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryConfServiceImpl.java
  37. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryRecordServiceImpl.java
  38. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryRegistrationServiceImpl.java
  39. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveRedConfServiceImpl.java
  40. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveUserLotteryRecordServiceImpl.java
  41. 93 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveUserRedRecordServiceImpl.java
  42. 86 0
      fs-service/src/main/resources/mapper/live/LiveEventConfMapper.xml
  43. 112 0
      fs-service/src/main/resources/mapper/live/LiveLotteryConfMapper.xml
  44. 75 0
      fs-service/src/main/resources/mapper/live/LiveLotteryRecordMapper.xml
  45. 91 0
      fs-service/src/main/resources/mapper/live/LiveLotteryRegistrationMapper.xml
  46. 107 0
      fs-service/src/main/resources/mapper/live/LiveRedConfMapper.xml
  47. 83 0
      fs-service/src/main/resources/mapper/live/LiveUserLotteryRecordMapper.xml
  48. 83 0
      fs-service/src/main/resources/mapper/live/LiveUserRedRecordMapper.xml

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveEventConfController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveEventConf;
+import com.fs.live.service.ILiveEventConfService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播触发事件配置Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveEventConf")
+public class LiveEventConfController extends BaseController
+{
+    @Autowired
+    private ILiveEventConfService liveEventConfService;
+
+    /**
+     * 查询直播触发事件配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveEventConf liveEventConf)
+    {
+        startPage();
+        List<LiveEventConf> list = liveEventConfService.selectLiveEventConfList(liveEventConf);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播触发事件配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:export')")
+    @Log(title = "直播触发事件配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveEventConf liveEventConf)
+    {
+        List<LiveEventConf> list = liveEventConfService.selectLiveEventConfList(liveEventConf);
+        ExcelUtil<LiveEventConf> util = new ExcelUtil<LiveEventConf>(LiveEventConf.class);
+        return util.exportExcel(list, "直播触发事件配置数据");
+    }
+
+    /**
+     * 获取直播触发事件配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:query')")
+    @GetMapping(value = "/{eventId}")
+    public AjaxResult getInfo(@PathVariable("eventId") Long eventId)
+    {
+        return AjaxResult.success(liveEventConfService.selectLiveEventConfByEventId(eventId));
+    }
+
+    /**
+     * 新增直播触发事件配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:add')")
+    @Log(title = "直播触发事件配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveEventConf liveEventConf)
+    {
+        return toAjax(liveEventConfService.insertLiveEventConf(liveEventConf));
+    }
+
+    /**
+     * 修改直播触发事件配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:edit')")
+    @Log(title = "直播触发事件配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveEventConf liveEventConf)
+    {
+        return toAjax(liveEventConfService.updateLiveEventConf(liveEventConf));
+    }
+
+    /**
+     * 删除直播触发事件配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveEventConf:remove')")
+    @Log(title = "直播触发事件配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{eventIds}")
+    public AjaxResult remove(@PathVariable Long[] eventIds)
+    {
+        return toAjax(liveEventConfService.deleteLiveEventConfByEventIds(eventIds));
+    }
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveLotteryConfController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveLotteryConf;
+import com.fs.live.service.ILiveLotteryConfService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播抽奖配置Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveLotteryConf")
+public class LiveLotteryConfController extends BaseController
+{
+    @Autowired
+    private ILiveLotteryConfService liveLotteryConfService;
+
+    /**
+     * 查询直播抽奖配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveLotteryConf liveLotteryConf)
+    {
+        startPage();
+        List<LiveLotteryConf> list = liveLotteryConfService.selectLiveLotteryConfList(liveLotteryConf);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播抽奖配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:export')")
+    @Log(title = "直播抽奖配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveLotteryConf liveLotteryConf)
+    {
+        List<LiveLotteryConf> list = liveLotteryConfService.selectLiveLotteryConfList(liveLotteryConf);
+        ExcelUtil<LiveLotteryConf> util = new ExcelUtil<LiveLotteryConf>(LiveLotteryConf.class);
+        return util.exportExcel(list, "直播抽奖配置数据");
+    }
+
+    /**
+     * 获取直播抽奖配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:query')")
+    @GetMapping(value = "/{lotteryId}")
+    public AjaxResult getInfo(@PathVariable("lotteryId") Long lotteryId)
+    {
+        return AjaxResult.success(liveLotteryConfService.selectLiveLotteryConfByLotteryId(lotteryId));
+    }
+
+    /**
+     * 新增直播抽奖配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:add')")
+    @Log(title = "直播抽奖配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveLotteryConf liveLotteryConf)
+    {
+        return toAjax(liveLotteryConfService.insertLiveLotteryConf(liveLotteryConf));
+    }
+
+    /**
+     * 修改直播抽奖配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:edit')")
+    @Log(title = "直播抽奖配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveLotteryConf liveLotteryConf)
+    {
+        return toAjax(liveLotteryConfService.updateLiveLotteryConf(liveLotteryConf));
+    }
+
+    /**
+     * 删除直播抽奖配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryConf:remove')")
+    @Log(title = "直播抽奖配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{lotteryIds}")
+    public AjaxResult remove(@PathVariable Long[] lotteryIds)
+    {
+        return toAjax(liveLotteryConfService.deleteLiveLotteryConfByLotteryIds(lotteryIds));
+    }
+}

+ 4 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveLotteryController.java

@@ -0,0 +1,4 @@
+package com.fs.live.controller;
+
+public class LiveLotteryController {
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveLotteryRecordController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveLotteryRecord;
+import com.fs.live.service.ILiveLotteryRecordService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播抽奖记录Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveLotteryRecord")
+public class LiveLotteryRecordController extends BaseController
+{
+    @Autowired
+    private ILiveLotteryRecordService liveLotteryRecordService;
+
+    /**
+     * 查询直播抽奖记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveLotteryRecord liveLotteryRecord)
+    {
+        startPage();
+        List<LiveLotteryRecord> list = liveLotteryRecordService.selectLiveLotteryRecordList(liveLotteryRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播抽奖记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:export')")
+    @Log(title = "直播抽奖记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveLotteryRecord liveLotteryRecord)
+    {
+        List<LiveLotteryRecord> list = liveLotteryRecordService.selectLiveLotteryRecordList(liveLotteryRecord);
+        ExcelUtil<LiveLotteryRecord> util = new ExcelUtil<LiveLotteryRecord>(LiveLotteryRecord.class);
+        return util.exportExcel(list, "直播抽奖记录数据");
+    }
+
+    /**
+     * 获取直播抽奖记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:query')")
+    @GetMapping(value = "/{lotteryId}")
+    public AjaxResult getInfo(@PathVariable("lotteryId") Long lotteryId)
+    {
+        return AjaxResult.success(liveLotteryRecordService.selectLiveLotteryRecordByLotteryId(lotteryId));
+    }
+
+    /**
+     * 新增直播抽奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:add')")
+    @Log(title = "直播抽奖记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveLotteryRecord liveLotteryRecord)
+    {
+        return toAjax(liveLotteryRecordService.insertLiveLotteryRecord(liveLotteryRecord));
+    }
+
+    /**
+     * 修改直播抽奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:edit')")
+    @Log(title = "直播抽奖记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveLotteryRecord liveLotteryRecord)
+    {
+        return toAjax(liveLotteryRecordService.updateLiveLotteryRecord(liveLotteryRecord));
+    }
+
+    /**
+     * 删除直播抽奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRecord:remove')")
+    @Log(title = "直播抽奖记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{lotteryIds}")
+    public AjaxResult remove(@PathVariable Long[] lotteryIds)
+    {
+        return toAjax(liveLotteryRecordService.deleteLiveLotteryRecordByLotteryIds(lotteryIds));
+    }
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveLotteryRegistrationController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveLotteryRegistration;
+import com.fs.live.service.ILiveLotteryRegistrationService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播抽奖登记Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveLotteryRegistration")
+public class LiveLotteryRegistrationController extends BaseController
+{
+    @Autowired
+    private ILiveLotteryRegistrationService liveLotteryRegistrationService;
+
+    /**
+     * 查询直播抽奖登记列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveLotteryRegistration liveLotteryRegistration)
+    {
+        startPage();
+        List<LiveLotteryRegistration> list = liveLotteryRegistrationService.selectLiveLotteryRegistrationList(liveLotteryRegistration);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播抽奖登记列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:export')")
+    @Log(title = "直播抽奖登记", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveLotteryRegistration liveLotteryRegistration)
+    {
+        List<LiveLotteryRegistration> list = liveLotteryRegistrationService.selectLiveLotteryRegistrationList(liveLotteryRegistration);
+        ExcelUtil<LiveLotteryRegistration> util = new ExcelUtil<LiveLotteryRegistration>(LiveLotteryRegistration.class);
+        return util.exportExcel(list, "直播抽奖登记数据");
+    }
+
+    /**
+     * 获取直播抽奖登记详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:query')")
+    @GetMapping(value = "/{registrationId}")
+    public AjaxResult getInfo(@PathVariable("registrationId") Long registrationId)
+    {
+        return AjaxResult.success(liveLotteryRegistrationService.selectLiveLotteryRegistrationByRegistrationId(registrationId));
+    }
+
+    /**
+     * 新增直播抽奖登记
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:add')")
+    @Log(title = "直播抽奖登记", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveLotteryRegistration liveLotteryRegistration)
+    {
+        return toAjax(liveLotteryRegistrationService.insertLiveLotteryRegistration(liveLotteryRegistration));
+    }
+
+    /**
+     * 修改直播抽奖登记
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:edit')")
+    @Log(title = "直播抽奖登记", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveLotteryRegistration liveLotteryRegistration)
+    {
+        return toAjax(liveLotteryRegistrationService.updateLiveLotteryRegistration(liveLotteryRegistration));
+    }
+
+    /**
+     * 删除直播抽奖登记
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveLotteryRegistration:remove')")
+    @Log(title = "直播抽奖登记", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{registrationIds}")
+    public AjaxResult remove(@PathVariable Long[] registrationIds)
+    {
+        return toAjax(liveLotteryRegistrationService.deleteLiveLotteryRegistrationByRegistrationIds(registrationIds));
+    }
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveRedConfController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveRedConf;
+import com.fs.live.service.ILiveRedConfService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播红包记录配置Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveRedConf")
+public class LiveRedConfController extends BaseController
+{
+    @Autowired
+    private ILiveRedConfService liveRedConfService;
+
+    /**
+     * 查询直播红包记录配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveRedConf liveRedConf)
+    {
+        startPage();
+        List<LiveRedConf> list = liveRedConfService.selectLiveRedConfList(liveRedConf);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播红包记录配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:export')")
+    @Log(title = "直播红包记录配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveRedConf liveRedConf)
+    {
+        List<LiveRedConf> list = liveRedConfService.selectLiveRedConfList(liveRedConf);
+        ExcelUtil<LiveRedConf> util = new ExcelUtil<LiveRedConf>(LiveRedConf.class);
+        return util.exportExcel(list, "直播红包记录配置数据");
+    }
+
+    /**
+     * 获取直播红包记录配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:query')")
+    @GetMapping(value = "/{redId}")
+    public AjaxResult getInfo(@PathVariable("redId") Long redId)
+    {
+        return AjaxResult.success(liveRedConfService.selectLiveRedConfByRedId(redId));
+    }
+
+    /**
+     * 新增直播红包记录配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:add')")
+    @Log(title = "直播红包记录配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveRedConf liveRedConf)
+    {
+        return toAjax(liveRedConfService.insertLiveRedConf(liveRedConf));
+    }
+
+    /**
+     * 修改直播红包记录配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:edit')")
+    @Log(title = "直播红包记录配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveRedConf liveRedConf)
+    {
+        return toAjax(liveRedConfService.updateLiveRedConf(liveRedConf));
+    }
+
+    /**
+     * 删除直播红包记录配置
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveRedConf:remove')")
+    @Log(title = "直播红包记录配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{redIds}")
+    public AjaxResult remove(@PathVariable Long[] redIds)
+    {
+        return toAjax(liveRedConfService.deleteLiveRedConfByRedIds(redIds));
+    }
+}

+ 4 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveRedController.java

@@ -0,0 +1,4 @@
+package com.fs.live.controller;
+
+public class LiveRedController {
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveUserLotteryRecordController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveUserLotteryRecord;
+import com.fs.live.service.ILiveUserLotteryRecordService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播用户中奖记录Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveUserLotteryRecord")
+public class LiveUserLotteryRecordController extends BaseController
+{
+    @Autowired
+    private ILiveUserLotteryRecordService liveUserLotteryRecordService;
+
+    /**
+     * 查询直播用户中奖记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        startPage();
+        List<LiveUserLotteryRecord> list = liveUserLotteryRecordService.selectLiveUserLotteryRecordList(liveUserLotteryRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播用户中奖记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:export')")
+    @Log(title = "直播用户中奖记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        List<LiveUserLotteryRecord> list = liveUserLotteryRecordService.selectLiveUserLotteryRecordList(liveUserLotteryRecord);
+        ExcelUtil<LiveUserLotteryRecord> util = new ExcelUtil<LiveUserLotteryRecord>(LiveUserLotteryRecord.class);
+        return util.exportExcel(list, "直播用户中奖记录数据");
+    }
+
+    /**
+     * 获取直播用户中奖记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(liveUserLotteryRecordService.selectLiveUserLotteryRecordById(id));
+    }
+
+    /**
+     * 新增直播用户中奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:add')")
+    @Log(title = "直播用户中奖记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        return toAjax(liveUserLotteryRecordService.insertLiveUserLotteryRecord(liveUserLotteryRecord));
+    }
+
+    /**
+     * 修改直播用户中奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:edit')")
+    @Log(title = "直播用户中奖记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        return toAjax(liveUserLotteryRecordService.updateLiveUserLotteryRecord(liveUserLotteryRecord));
+    }
+
+    /**
+     * 删除直播用户中奖记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserLotteryRecord:remove')")
+    @Log(title = "直播用户中奖记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(liveUserLotteryRecordService.deleteLiveUserLotteryRecordByIds(ids));
+    }
+}

+ 103 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveUserRedRecordController.java

@@ -0,0 +1,103 @@
+package com.fs.live.controller;
+
+import java.util.List;
+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.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.live.domain.LiveUserRedRecord;
+import com.fs.live.service.ILiveUserRedRecordService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 直播用户红包记录Controller
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@RestController
+@RequestMapping("/live/liveUserRedRecord")
+public class LiveUserRedRecordController extends BaseController
+{
+    @Autowired
+    private ILiveUserRedRecordService liveUserRedRecordService;
+
+    /**
+     * 查询直播用户红包记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(LiveUserRedRecord liveUserRedRecord)
+    {
+        startPage();
+        List<LiveUserRedRecord> list = liveUserRedRecordService.selectLiveUserRedRecordList(liveUserRedRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出直播用户红包记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:export')")
+    @Log(title = "直播用户红包记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(LiveUserRedRecord liveUserRedRecord)
+    {
+        List<LiveUserRedRecord> list = liveUserRedRecordService.selectLiveUserRedRecordList(liveUserRedRecord);
+        ExcelUtil<LiveUserRedRecord> util = new ExcelUtil<LiveUserRedRecord>(LiveUserRedRecord.class);
+        return util.exportExcel(list, "直播用户红包记录数据");
+    }
+
+    /**
+     * 获取直播用户红包记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(liveUserRedRecordService.selectLiveUserRedRecordById(id));
+    }
+
+    /**
+     * 新增直播用户红包记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:add')")
+    @Log(title = "直播用户红包记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody LiveUserRedRecord liveUserRedRecord)
+    {
+        return toAjax(liveUserRedRecordService.insertLiveUserRedRecord(liveUserRedRecord));
+    }
+
+    /**
+     * 修改直播用户红包记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:edit')")
+    @Log(title = "直播用户红包记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody LiveUserRedRecord liveUserRedRecord)
+    {
+        return toAjax(liveUserRedRecordService.updateLiveUserRedRecord(liveUserRedRecord));
+    }
+
+    /**
+     * 删除直播用户红包记录
+     */
+    @PreAuthorize("@ss.hasPermi('live:liveUserRedRecord:remove')")
+    @Log(title = "直播用户红包记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(liveUserRedRecordService.deleteLiveUserRedRecordByIds(ids));
+    }
+}

+ 13 - 0
fs-live-app/src/main/java/com/fs/app/controller/LiveGiftController.java

@@ -0,0 +1,13 @@
+package com.fs.app.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/app/live/liveGift")
+public class LiveGiftController {
+
+    /**
+     * 送礼物
+     * */
+}

+ 18 - 0
fs-live-app/src/main/java/com/fs/app/controller/LiveLotteryController.java

@@ -0,0 +1,18 @@
+package com.fs.app.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/app/live/liveLottery")
+public class LiveLotteryController {
+
+    /**
+     * 参与抽奖
+     * */
+    @RequestMapping("/participate")
+    public String participate(Long liveId, Long userId,Long lotteryId) {
+        return null;
+    }
+
+}

+ 13 - 0
fs-live-app/src/main/java/com/fs/app/controller/LiveRedController.java

@@ -0,0 +1,13 @@
+package com.fs.app.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/app/live/liveRed")
+public class LiveRedController {
+
+    /**
+     * 抢红包
+     * */
+}

+ 2 - 1
fs-service/src/main/java/com/fs/live/domain/LiveAnchor.java

@@ -16,7 +16,8 @@ import java.util.Date;
  * @date 2025-01-17
  */
 @Data
-public class LiveAnchor{
+@EqualsAndHashCode(callSuper = true)
+public class LiveAnchor extends BaseEntity {
 
     /** ID */
     @TableId(type = IdType.AUTO)

+ 44 - 0
fs-service/src/main/java/com/fs/live/domain/LiveEventConf.java

@@ -0,0 +1,44 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播触发事件配置对象 live_event_conf
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveEventConf extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long eventId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 事件类型 (0:用户进入直播间, 1:用户发言, 2:用户点赞, 3:用户关注) */
+    @Excel(name = "事件类型 (0:用户进入直播间, 1:用户发言, 2:用户点赞, 3:用户关注)")
+    private Long eventType;
+
+    /** 触发阈值 */
+    @Excel(name = "触发阈值")
+    private Long triggerCount;
+
+    /** 关联红包ID */
+    @Excel(name = "关联红包ID")
+    private Long redId;
+
+    /** 修改日期 */
+    private Date udpateTime;
+
+
+}

+ 70 - 0
fs-service/src/main/java/com/fs/live/domain/LiveLotteryConf.java

@@ -0,0 +1,70 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播抽奖配置对象 live_lottery_conf
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveLotteryConf extends BaseEntity{
+
+    /** 抽奖ID */
+    private Long lotteryId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 商品ID */
+    @Excel(name = "商品ID")
+    private Long productId;
+
+    /** 奖品等级 */
+    @Excel(name = "奖品等级")
+    private Long prizeLevel;
+
+    /** 单次中奖商品数量 */
+    @Excel(name = "单次中奖商品数量")
+    private Long perLotteryNum;
+
+    /** 可中奖份量 */
+    @Excel(name = "可中奖份量")
+    private Long totalLots;
+
+    /** 实际发放奖励份量 */
+    @Excel(name = "实际发放奖励份量")
+    private Long totalSend;
+
+    /** 参与抽奖方式 0:在线观众参与 1:关注参与 2:送礼参与 3:下单参与 */
+    @Excel(name = "参与抽奖方式 0:在线观众参与 1:关注参与 2:送礼参与 3:下单参与")
+    private Long require;
+
+    /** 参与抽奖方式 2/3对应的配置,2:送礼数量,以最低档位礼物为单位 3:指定商品Id及数量,|竖线分割 */
+    @Excel(name = "参与抽奖方式 2/3对应的配置,2:送礼数量,以最低档位礼物为单位 3:指定商品Id及数量,|竖线分割")
+    private String requireConf;
+
+    /** 持续时间 单位:分 */
+    @Excel(name = "持续时间 单位:分")
+    private Long duration;
+
+    /** 描述/标题 */
+    @Excel(name = "描述/标题")
+    private String desc;
+
+    /** 修改日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date udpateTime;
+
+
+}

+ 37 - 0
fs-service/src/main/java/com/fs/live/domain/LiveLotteryRecord.java

@@ -0,0 +1,37 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播抽奖记录对象 live_lottery_record
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveLotteryRecord extends BaseEntity{
+
+    /** 抽奖ID */
+    @Excel(name = "抽奖ID")
+    private Long lotteryId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 抽奖状态 0:未开始 1:进行中 2:已结束 */
+    @Excel(name = "抽奖状态 0:未开始 1:进行中 2:已结束")
+    private Long lotteryStauts;
+
+    /** 修改日期 */
+    private Date udpateTime;
+
+
+}

+ 46 - 0
fs-service/src/main/java/com/fs/live/domain/LiveLotteryRegistration.java

@@ -0,0 +1,46 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播抽奖登记对象 live_lottery_registration
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveLotteryRegistration extends BaseEntity{
+
+    /** 登记ID */
+    private Long registrationId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 用户ID */
+    @Excel(name = "用户ID")
+    private Long userId;
+
+    /** 是否中奖 0否1是 */
+    @Excel(name = "是否中奖 0否1是")
+    private Long isWin;
+
+    /** 奖品等级 */
+    @Excel(name = "奖品等级")
+    private Long rizeLevel;
+
+    /** 修改日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date udpateTime;
+
+
+}

+ 60 - 0
fs-service/src/main/java/com/fs/live/domain/LiveRedConf.java

@@ -0,0 +1,60 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播红包记录配置对象 live_red_conf
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveRedConf extends BaseEntity{
+
+    /** 红包ID */
+    private Long redId;
+
+    /** 红包状态 0:未发放 1:已发放 2:已结束 */
+    @Excel(name = "红包状态 0:未发放 1:已发放 2:已结束")
+    private Long redStauts;
+
+    /** 有效时间 单位:分 */
+    @Excel(name = "有效时间 单位:分")
+    private Long duration;
+
+    /** 红包类型 1:主播发起 2:事件红包 */
+    @Excel(name = "红包类型 1:主播发起 2:事件红包")
+    private Long redType;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 红包数量 */
+    @Excel(name = "红包数量")
+    private Long redNum;
+
+    /** 可中奖份量 */
+    @Excel(name = "可中奖份量")
+    private Long totalLots;
+
+    /** 实际发放奖励份量 */
+    @Excel(name = "实际发放奖励份量")
+    private Long totalSend;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String desc;
+
+    /** 修改日期 */
+    private Date udpateTime;
+
+
+}

+ 47 - 0
fs-service/src/main/java/com/fs/live/domain/LiveUserLotteryRecord.java

@@ -0,0 +1,47 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播用户中奖记录对象 live_user_lottery_record
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveUserLotteryRecord extends BaseEntity{
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long id;
+
+    /** 抽奖ID */
+    @Excel(name = "抽奖ID")
+    private Long lotteryId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 中奖用户ID */
+    @Excel(name = "中奖用户ID")
+    private Long userId;
+
+    /** 商品ID */
+    @Excel(name = "商品ID")
+    private Long productId;
+
+    /** 修改日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date udpateTime;
+
+
+}

+ 47 - 0
fs-service/src/main/java/com/fs/live/domain/LiveUserRedRecord.java

@@ -0,0 +1,47 @@
+package com.fs.live.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 直播用户红包记录对象 live_user_red_record
+ *
+ * @author fs
+ * @date 2025-07-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class LiveUserRedRecord extends BaseEntity{
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long id;
+
+    /** 抽奖ID */
+    @Excel(name = "抽奖ID")
+    private Long redId;
+
+    /** 直播间ID */
+    @Excel(name = "直播间ID")
+    private Long liveId;
+
+    /** 中奖用户ID */
+    @Excel(name = "中奖用户ID")
+    private Long userId;
+
+    /** 芳华币数量 */
+    @Excel(name = "芳华币数量")
+    private Long integral;
+
+    /** 修改日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "修改日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date udpateTime;
+
+
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveEventConfMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveEventConf;
+
+/**
+ * 直播触发事件配置Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveEventConfMapper extends BaseMapper<LiveEventConf>{
+    /**
+     * 查询直播触发事件配置
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 直播触发事件配置
+     */
+    LiveEventConf selectLiveEventConfByEventId(Long eventId);
+
+    /**
+     * 查询直播触发事件配置列表
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 直播触发事件配置集合
+     */
+    List<LiveEventConf> selectLiveEventConfList(LiveEventConf liveEventConf);
+
+    /**
+     * 新增直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    int insertLiveEventConf(LiveEventConf liveEventConf);
+
+    /**
+     * 修改直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    int updateLiveEventConf(LiveEventConf liveEventConf);
+
+    /**
+     * 删除直播触发事件配置
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 结果
+     */
+    int deleteLiveEventConfByEventId(Long eventId);
+
+    /**
+     * 批量删除直播触发事件配置
+     * 
+     * @param eventIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveEventConfByEventIds(Long[] eventIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveLotteryConfMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveLotteryConf;
+
+/**
+ * 直播抽奖配置Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveLotteryConfMapper extends BaseMapper<LiveLotteryConf>{
+    /**
+     * 查询直播抽奖配置
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 直播抽奖配置
+     */
+    LiveLotteryConf selectLiveLotteryConfByLotteryId(Long lotteryId);
+
+    /**
+     * 查询直播抽奖配置列表
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 直播抽奖配置集合
+     */
+    List<LiveLotteryConf> selectLiveLotteryConfList(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 新增直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    int insertLiveLotteryConf(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 修改直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    int updateLiveLotteryConf(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 删除直播抽奖配置
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 结果
+     */
+    int deleteLiveLotteryConfByLotteryId(Long lotteryId);
+
+    /**
+     * 批量删除直播抽奖配置
+     * 
+     * @param lotteryIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryConfByLotteryIds(Long[] lotteryIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveLotteryRecordMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveLotteryRecord;
+
+/**
+ * 直播抽奖记录Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveLotteryRecordMapper extends BaseMapper<LiveLotteryRecord>{
+    /**
+     * 查询直播抽奖记录
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 直播抽奖记录
+     */
+    LiveLotteryRecord selectLiveLotteryRecordByLotteryId(Long lotteryId);
+
+    /**
+     * 查询直播抽奖记录列表
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 直播抽奖记录集合
+     */
+    List<LiveLotteryRecord> selectLiveLotteryRecordList(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 新增直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    int insertLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 修改直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    int updateLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 删除直播抽奖记录
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 结果
+     */
+    int deleteLiveLotteryRecordByLotteryId(Long lotteryId);
+
+    /**
+     * 批量删除直播抽奖记录
+     * 
+     * @param lotteryIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryRecordByLotteryIds(Long[] lotteryIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveLotteryRegistrationMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveLotteryRegistration;
+
+/**
+ * 直播抽奖登记Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveLotteryRegistrationMapper extends BaseMapper<LiveLotteryRegistration>{
+    /**
+     * 查询直播抽奖登记
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 直播抽奖登记
+     */
+    LiveLotteryRegistration selectLiveLotteryRegistrationByRegistrationId(Long registrationId);
+
+    /**
+     * 查询直播抽奖登记列表
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 直播抽奖登记集合
+     */
+    List<LiveLotteryRegistration> selectLiveLotteryRegistrationList(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 新增直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    int insertLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 修改直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    int updateLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 删除直播抽奖登记
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 结果
+     */
+    int deleteLiveLotteryRegistrationByRegistrationId(Long registrationId);
+
+    /**
+     * 批量删除直播抽奖登记
+     * 
+     * @param registrationIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryRegistrationByRegistrationIds(Long[] registrationIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveRedConfMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveRedConf;
+
+/**
+ * 直播红包记录配置Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveRedConfMapper extends BaseMapper<LiveRedConf>{
+    /**
+     * 查询直播红包记录配置
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 直播红包记录配置
+     */
+    LiveRedConf selectLiveRedConfByRedId(Long redId);
+
+    /**
+     * 查询直播红包记录配置列表
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 直播红包记录配置集合
+     */
+    List<LiveRedConf> selectLiveRedConfList(LiveRedConf liveRedConf);
+
+    /**
+     * 新增直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    int insertLiveRedConf(LiveRedConf liveRedConf);
+
+    /**
+     * 修改直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    int updateLiveRedConf(LiveRedConf liveRedConf);
+
+    /**
+     * 删除直播红包记录配置
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 结果
+     */
+    int deleteLiveRedConfByRedId(Long redId);
+
+    /**
+     * 批量删除直播红包记录配置
+     * 
+     * @param redIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveRedConfByRedIds(Long[] redIds);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveUserLotteryRecordMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveUserLotteryRecord;
+
+/**
+ * 直播用户中奖记录Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveUserLotteryRecordMapper extends BaseMapper<LiveUserLotteryRecord>{
+    /**
+     * 查询直播用户中奖记录
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 直播用户中奖记录
+     */
+    LiveUserLotteryRecord selectLiveUserLotteryRecordById(Long id);
+
+    /**
+     * 查询直播用户中奖记录列表
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 直播用户中奖记录集合
+     */
+    List<LiveUserLotteryRecord> selectLiveUserLotteryRecordList(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 新增直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    int insertLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 修改直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    int updateLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 删除直播用户中奖记录
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 结果
+     */
+    int deleteLiveUserLotteryRecordById(Long id);
+
+    /**
+     * 批量删除直播用户中奖记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveUserLotteryRecordByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveUserRedRecordMapper.java

@@ -0,0 +1,61 @@
+package com.fs.live.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.live.domain.LiveUserRedRecord;
+
+/**
+ * 直播用户红包记录Mapper接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface LiveUserRedRecordMapper extends BaseMapper<LiveUserRedRecord>{
+    /**
+     * 查询直播用户红包记录
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 直播用户红包记录
+     */
+    LiveUserRedRecord selectLiveUserRedRecordById(Long id);
+
+    /**
+     * 查询直播用户红包记录列表
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 直播用户红包记录集合
+     */
+    List<LiveUserRedRecord> selectLiveUserRedRecordList(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 新增直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    int insertLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 修改直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    int updateLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 删除直播用户红包记录
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 结果
+     */
+    int deleteLiveUserRedRecordById(Long id);
+
+    /**
+     * 批量删除直播用户红包记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteLiveUserRedRecordByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveEventConfService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveEventConf;
+
+/**
+ * 直播触发事件配置Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveEventConfService extends IService<LiveEventConf>{
+    /**
+     * 查询直播触发事件配置
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 直播触发事件配置
+     */
+    LiveEventConf selectLiveEventConfByEventId(Long eventId);
+
+    /**
+     * 查询直播触发事件配置列表
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 直播触发事件配置集合
+     */
+    List<LiveEventConf> selectLiveEventConfList(LiveEventConf liveEventConf);
+
+    /**
+     * 新增直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    int insertLiveEventConf(LiveEventConf liveEventConf);
+
+    /**
+     * 修改直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    int updateLiveEventConf(LiveEventConf liveEventConf);
+
+    /**
+     * 批量删除直播触发事件配置
+     * 
+     * @param eventIds 需要删除的直播触发事件配置主键集合
+     * @return 结果
+     */
+    int deleteLiveEventConfByEventIds(Long[] eventIds);
+
+    /**
+     * 删除直播触发事件配置信息
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 结果
+     */
+    int deleteLiveEventConfByEventId(Long eventId);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveLotteryConfService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveLotteryConf;
+
+/**
+ * 直播抽奖配置Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveLotteryConfService extends IService<LiveLotteryConf>{
+    /**
+     * 查询直播抽奖配置
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 直播抽奖配置
+     */
+    LiveLotteryConf selectLiveLotteryConfByLotteryId(Long lotteryId);
+
+    /**
+     * 查询直播抽奖配置列表
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 直播抽奖配置集合
+     */
+    List<LiveLotteryConf> selectLiveLotteryConfList(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 新增直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    int insertLiveLotteryConf(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 修改直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    int updateLiveLotteryConf(LiveLotteryConf liveLotteryConf);
+
+    /**
+     * 批量删除直播抽奖配置
+     * 
+     * @param lotteryIds 需要删除的直播抽奖配置主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryConfByLotteryIds(Long[] lotteryIds);
+
+    /**
+     * 删除直播抽奖配置信息
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 结果
+     */
+    int deleteLiveLotteryConfByLotteryId(Long lotteryId);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveLotteryRecordService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveLotteryRecord;
+
+/**
+ * 直播抽奖记录Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveLotteryRecordService extends IService<LiveLotteryRecord>{
+    /**
+     * 查询直播抽奖记录
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 直播抽奖记录
+     */
+    LiveLotteryRecord selectLiveLotteryRecordByLotteryId(Long lotteryId);
+
+    /**
+     * 查询直播抽奖记录列表
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 直播抽奖记录集合
+     */
+    List<LiveLotteryRecord> selectLiveLotteryRecordList(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 新增直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    int insertLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 修改直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    int updateLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord);
+
+    /**
+     * 批量删除直播抽奖记录
+     * 
+     * @param lotteryIds 需要删除的直播抽奖记录主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryRecordByLotteryIds(Long[] lotteryIds);
+
+    /**
+     * 删除直播抽奖记录信息
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 结果
+     */
+    int deleteLiveLotteryRecordByLotteryId(Long lotteryId);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveLotteryRegistrationService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveLotteryRegistration;
+
+/**
+ * 直播抽奖登记Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveLotteryRegistrationService extends IService<LiveLotteryRegistration>{
+    /**
+     * 查询直播抽奖登记
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 直播抽奖登记
+     */
+    LiveLotteryRegistration selectLiveLotteryRegistrationByRegistrationId(Long registrationId);
+
+    /**
+     * 查询直播抽奖登记列表
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 直播抽奖登记集合
+     */
+    List<LiveLotteryRegistration> selectLiveLotteryRegistrationList(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 新增直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    int insertLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 修改直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    int updateLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration);
+
+    /**
+     * 批量删除直播抽奖登记
+     * 
+     * @param registrationIds 需要删除的直播抽奖登记主键集合
+     * @return 结果
+     */
+    int deleteLiveLotteryRegistrationByRegistrationIds(Long[] registrationIds);
+
+    /**
+     * 删除直播抽奖登记信息
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 结果
+     */
+    int deleteLiveLotteryRegistrationByRegistrationId(Long registrationId);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveRedConfService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveRedConf;
+
+/**
+ * 直播红包记录配置Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveRedConfService extends IService<LiveRedConf>{
+    /**
+     * 查询直播红包记录配置
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 直播红包记录配置
+     */
+    LiveRedConf selectLiveRedConfByRedId(Long redId);
+
+    /**
+     * 查询直播红包记录配置列表
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 直播红包记录配置集合
+     */
+    List<LiveRedConf> selectLiveRedConfList(LiveRedConf liveRedConf);
+
+    /**
+     * 新增直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    int insertLiveRedConf(LiveRedConf liveRedConf);
+
+    /**
+     * 修改直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    int updateLiveRedConf(LiveRedConf liveRedConf);
+
+    /**
+     * 批量删除直播红包记录配置
+     * 
+     * @param redIds 需要删除的直播红包记录配置主键集合
+     * @return 结果
+     */
+    int deleteLiveRedConfByRedIds(Long[] redIds);
+
+    /**
+     * 删除直播红包记录配置信息
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 结果
+     */
+    int deleteLiveRedConfByRedId(Long redId);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveUserLotteryRecordService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveUserLotteryRecord;
+
+/**
+ * 直播用户中奖记录Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveUserLotteryRecordService extends IService<LiveUserLotteryRecord>{
+    /**
+     * 查询直播用户中奖记录
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 直播用户中奖记录
+     */
+    LiveUserLotteryRecord selectLiveUserLotteryRecordById(Long id);
+
+    /**
+     * 查询直播用户中奖记录列表
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 直播用户中奖记录集合
+     */
+    List<LiveUserLotteryRecord> selectLiveUserLotteryRecordList(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 新增直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    int insertLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 修改直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    int updateLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord);
+
+    /**
+     * 批量删除直播用户中奖记录
+     * 
+     * @param ids 需要删除的直播用户中奖记录主键集合
+     * @return 结果
+     */
+    int deleteLiveUserLotteryRecordByIds(Long[] ids);
+
+    /**
+     * 删除直播用户中奖记录信息
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 结果
+     */
+    int deleteLiveUserLotteryRecordById(Long id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/live/service/ILiveUserRedRecordService.java

@@ -0,0 +1,61 @@
+package com.fs.live.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.live.domain.LiveUserRedRecord;
+
+/**
+ * 直播用户红包记录Service接口
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+public interface ILiveUserRedRecordService extends IService<LiveUserRedRecord>{
+    /**
+     * 查询直播用户红包记录
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 直播用户红包记录
+     */
+    LiveUserRedRecord selectLiveUserRedRecordById(Long id);
+
+    /**
+     * 查询直播用户红包记录列表
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 直播用户红包记录集合
+     */
+    List<LiveUserRedRecord> selectLiveUserRedRecordList(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 新增直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    int insertLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 修改直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    int updateLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord);
+
+    /**
+     * 批量删除直播用户红包记录
+     * 
+     * @param ids 需要删除的直播用户红包记录主键集合
+     * @return 结果
+     */
+    int deleteLiveUserRedRecordByIds(Long[] ids);
+
+    /**
+     * 删除直播用户红包记录信息
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 结果
+     */
+    int deleteLiveUserRedRecordById(Long id);
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveEventConfServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveEventConfMapper;
+import com.fs.live.domain.LiveEventConf;
+import com.fs.live.service.ILiveEventConfService;
+
+/**
+ * 直播触发事件配置Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveEventConfServiceImpl extends ServiceImpl<LiveEventConfMapper, LiveEventConf> implements ILiveEventConfService {
+
+    /**
+     * 查询直播触发事件配置
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 直播触发事件配置
+     */
+    @Override
+    public LiveEventConf selectLiveEventConfByEventId(Long eventId)
+    {
+        return baseMapper.selectLiveEventConfByEventId(eventId);
+    }
+
+    /**
+     * 查询直播触发事件配置列表
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 直播触发事件配置
+     */
+    @Override
+    public List<LiveEventConf> selectLiveEventConfList(LiveEventConf liveEventConf)
+    {
+        return baseMapper.selectLiveEventConfList(liveEventConf);
+    }
+
+    /**
+     * 新增直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    @Override
+    public int insertLiveEventConf(LiveEventConf liveEventConf)
+    {
+        liveEventConf.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveEventConf(liveEventConf);
+    }
+
+    /**
+     * 修改直播触发事件配置
+     * 
+     * @param liveEventConf 直播触发事件配置
+     * @return 结果
+     */
+    @Override
+    public int updateLiveEventConf(LiveEventConf liveEventConf)
+    {
+        return baseMapper.updateLiveEventConf(liveEventConf);
+    }
+
+    /**
+     * 批量删除直播触发事件配置
+     * 
+     * @param eventIds 需要删除的直播触发事件配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveEventConfByEventIds(Long[] eventIds)
+    {
+        return baseMapper.deleteLiveEventConfByEventIds(eventIds);
+    }
+
+    /**
+     * 删除直播触发事件配置信息
+     * 
+     * @param eventId 直播触发事件配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveEventConfByEventId(Long eventId)
+    {
+        return baseMapper.deleteLiveEventConfByEventId(eventId);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryConfServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveLotteryConfMapper;
+import com.fs.live.domain.LiveLotteryConf;
+import com.fs.live.service.ILiveLotteryConfService;
+
+/**
+ * 直播抽奖配置Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveLotteryConfServiceImpl extends ServiceImpl<LiveLotteryConfMapper, LiveLotteryConf> implements ILiveLotteryConfService {
+
+    /**
+     * 查询直播抽奖配置
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 直播抽奖配置
+     */
+    @Override
+    public LiveLotteryConf selectLiveLotteryConfByLotteryId(Long lotteryId)
+    {
+        return baseMapper.selectLiveLotteryConfByLotteryId(lotteryId);
+    }
+
+    /**
+     * 查询直播抽奖配置列表
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 直播抽奖配置
+     */
+    @Override
+    public List<LiveLotteryConf> selectLiveLotteryConfList(LiveLotteryConf liveLotteryConf)
+    {
+        return baseMapper.selectLiveLotteryConfList(liveLotteryConf);
+    }
+
+    /**
+     * 新增直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    @Override
+    public int insertLiveLotteryConf(LiveLotteryConf liveLotteryConf)
+    {
+        liveLotteryConf.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveLotteryConf(liveLotteryConf);
+    }
+
+    /**
+     * 修改直播抽奖配置
+     * 
+     * @param liveLotteryConf 直播抽奖配置
+     * @return 结果
+     */
+    @Override
+    public int updateLiveLotteryConf(LiveLotteryConf liveLotteryConf)
+    {
+        return baseMapper.updateLiveLotteryConf(liveLotteryConf);
+    }
+
+    /**
+     * 批量删除直播抽奖配置
+     * 
+     * @param lotteryIds 需要删除的直播抽奖配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryConfByLotteryIds(Long[] lotteryIds)
+    {
+        return baseMapper.deleteLiveLotteryConfByLotteryIds(lotteryIds);
+    }
+
+    /**
+     * 删除直播抽奖配置信息
+     * 
+     * @param lotteryId 直播抽奖配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryConfByLotteryId(Long lotteryId)
+    {
+        return baseMapper.deleteLiveLotteryConfByLotteryId(lotteryId);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryRecordServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveLotteryRecordMapper;
+import com.fs.live.domain.LiveLotteryRecord;
+import com.fs.live.service.ILiveLotteryRecordService;
+
+/**
+ * 直播抽奖记录Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveLotteryRecordServiceImpl extends ServiceImpl<LiveLotteryRecordMapper, LiveLotteryRecord> implements ILiveLotteryRecordService {
+
+    /**
+     * 查询直播抽奖记录
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 直播抽奖记录
+     */
+    @Override
+    public LiveLotteryRecord selectLiveLotteryRecordByLotteryId(Long lotteryId)
+    {
+        return baseMapper.selectLiveLotteryRecordByLotteryId(lotteryId);
+    }
+
+    /**
+     * 查询直播抽奖记录列表
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 直播抽奖记录
+     */
+    @Override
+    public List<LiveLotteryRecord> selectLiveLotteryRecordList(LiveLotteryRecord liveLotteryRecord)
+    {
+        return baseMapper.selectLiveLotteryRecordList(liveLotteryRecord);
+    }
+
+    /**
+     * 新增直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    @Override
+    public int insertLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord)
+    {
+        liveLotteryRecord.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveLotteryRecord(liveLotteryRecord);
+    }
+
+    /**
+     * 修改直播抽奖记录
+     * 
+     * @param liveLotteryRecord 直播抽奖记录
+     * @return 结果
+     */
+    @Override
+    public int updateLiveLotteryRecord(LiveLotteryRecord liveLotteryRecord)
+    {
+        return baseMapper.updateLiveLotteryRecord(liveLotteryRecord);
+    }
+
+    /**
+     * 批量删除直播抽奖记录
+     * 
+     * @param lotteryIds 需要删除的直播抽奖记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryRecordByLotteryIds(Long[] lotteryIds)
+    {
+        return baseMapper.deleteLiveLotteryRecordByLotteryIds(lotteryIds);
+    }
+
+    /**
+     * 删除直播抽奖记录信息
+     * 
+     * @param lotteryId 直播抽奖记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryRecordByLotteryId(Long lotteryId)
+    {
+        return baseMapper.deleteLiveLotteryRecordByLotteryId(lotteryId);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveLotteryRegistrationServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveLotteryRegistrationMapper;
+import com.fs.live.domain.LiveLotteryRegistration;
+import com.fs.live.service.ILiveLotteryRegistrationService;
+
+/**
+ * 直播抽奖登记Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveLotteryRegistrationServiceImpl extends ServiceImpl<LiveLotteryRegistrationMapper, LiveLotteryRegistration> implements ILiveLotteryRegistrationService {
+
+    /**
+     * 查询直播抽奖登记
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 直播抽奖登记
+     */
+    @Override
+    public LiveLotteryRegistration selectLiveLotteryRegistrationByRegistrationId(Long registrationId)
+    {
+        return baseMapper.selectLiveLotteryRegistrationByRegistrationId(registrationId);
+    }
+
+    /**
+     * 查询直播抽奖登记列表
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 直播抽奖登记
+     */
+    @Override
+    public List<LiveLotteryRegistration> selectLiveLotteryRegistrationList(LiveLotteryRegistration liveLotteryRegistration)
+    {
+        return baseMapper.selectLiveLotteryRegistrationList(liveLotteryRegistration);
+    }
+
+    /**
+     * 新增直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    @Override
+    public int insertLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration)
+    {
+        liveLotteryRegistration.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveLotteryRegistration(liveLotteryRegistration);
+    }
+
+    /**
+     * 修改直播抽奖登记
+     * 
+     * @param liveLotteryRegistration 直播抽奖登记
+     * @return 结果
+     */
+    @Override
+    public int updateLiveLotteryRegistration(LiveLotteryRegistration liveLotteryRegistration)
+    {
+        return baseMapper.updateLiveLotteryRegistration(liveLotteryRegistration);
+    }
+
+    /**
+     * 批量删除直播抽奖登记
+     * 
+     * @param registrationIds 需要删除的直播抽奖登记主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryRegistrationByRegistrationIds(Long[] registrationIds)
+    {
+        return baseMapper.deleteLiveLotteryRegistrationByRegistrationIds(registrationIds);
+    }
+
+    /**
+     * 删除直播抽奖登记信息
+     * 
+     * @param registrationId 直播抽奖登记主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveLotteryRegistrationByRegistrationId(Long registrationId)
+    {
+        return baseMapper.deleteLiveLotteryRegistrationByRegistrationId(registrationId);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveRedConfServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveRedConfMapper;
+import com.fs.live.domain.LiveRedConf;
+import com.fs.live.service.ILiveRedConfService;
+
+/**
+ * 直播红包记录配置Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveRedConfServiceImpl extends ServiceImpl<LiveRedConfMapper, LiveRedConf> implements ILiveRedConfService {
+
+    /**
+     * 查询直播红包记录配置
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 直播红包记录配置
+     */
+    @Override
+    public LiveRedConf selectLiveRedConfByRedId(Long redId)
+    {
+        return baseMapper.selectLiveRedConfByRedId(redId);
+    }
+
+    /**
+     * 查询直播红包记录配置列表
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 直播红包记录配置
+     */
+    @Override
+    public List<LiveRedConf> selectLiveRedConfList(LiveRedConf liveRedConf)
+    {
+        return baseMapper.selectLiveRedConfList(liveRedConf);
+    }
+
+    /**
+     * 新增直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    @Override
+    public int insertLiveRedConf(LiveRedConf liveRedConf)
+    {
+        liveRedConf.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveRedConf(liveRedConf);
+    }
+
+    /**
+     * 修改直播红包记录配置
+     * 
+     * @param liveRedConf 直播红包记录配置
+     * @return 结果
+     */
+    @Override
+    public int updateLiveRedConf(LiveRedConf liveRedConf)
+    {
+        return baseMapper.updateLiveRedConf(liveRedConf);
+    }
+
+    /**
+     * 批量删除直播红包记录配置
+     * 
+     * @param redIds 需要删除的直播红包记录配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveRedConfByRedIds(Long[] redIds)
+    {
+        return baseMapper.deleteLiveRedConfByRedIds(redIds);
+    }
+
+    /**
+     * 删除直播红包记录配置信息
+     * 
+     * @param redId 直播红包记录配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveRedConfByRedId(Long redId)
+    {
+        return baseMapper.deleteLiveRedConfByRedId(redId);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveUserLotteryRecordServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveUserLotteryRecordMapper;
+import com.fs.live.domain.LiveUserLotteryRecord;
+import com.fs.live.service.ILiveUserLotteryRecordService;
+
+/**
+ * 直播用户中奖记录Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveUserLotteryRecordServiceImpl extends ServiceImpl<LiveUserLotteryRecordMapper, LiveUserLotteryRecord> implements ILiveUserLotteryRecordService {
+
+    /**
+     * 查询直播用户中奖记录
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 直播用户中奖记录
+     */
+    @Override
+    public LiveUserLotteryRecord selectLiveUserLotteryRecordById(Long id)
+    {
+        return baseMapper.selectLiveUserLotteryRecordById(id);
+    }
+
+    /**
+     * 查询直播用户中奖记录列表
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 直播用户中奖记录
+     */
+    @Override
+    public List<LiveUserLotteryRecord> selectLiveUserLotteryRecordList(LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        return baseMapper.selectLiveUserLotteryRecordList(liveUserLotteryRecord);
+    }
+
+    /**
+     * 新增直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    @Override
+    public int insertLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        liveUserLotteryRecord.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveUserLotteryRecord(liveUserLotteryRecord);
+    }
+
+    /**
+     * 修改直播用户中奖记录
+     * 
+     * @param liveUserLotteryRecord 直播用户中奖记录
+     * @return 结果
+     */
+    @Override
+    public int updateLiveUserLotteryRecord(LiveUserLotteryRecord liveUserLotteryRecord)
+    {
+        return baseMapper.updateLiveUserLotteryRecord(liveUserLotteryRecord);
+    }
+
+    /**
+     * 批量删除直播用户中奖记录
+     * 
+     * @param ids 需要删除的直播用户中奖记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveUserLotteryRecordByIds(Long[] ids)
+    {
+        return baseMapper.deleteLiveUserLotteryRecordByIds(ids);
+    }
+
+    /**
+     * 删除直播用户中奖记录信息
+     * 
+     * @param id 直播用户中奖记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveUserLotteryRecordById(Long id)
+    {
+        return baseMapper.deleteLiveUserLotteryRecordById(id);
+    }
+}

+ 93 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveUserRedRecordServiceImpl.java

@@ -0,0 +1,93 @@
+package com.fs.live.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.live.mapper.LiveUserRedRecordMapper;
+import com.fs.live.domain.LiveUserRedRecord;
+import com.fs.live.service.ILiveUserRedRecordService;
+
+/**
+ * 直播用户红包记录Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-07-17
+ */
+@Service
+public class LiveUserRedRecordServiceImpl extends ServiceImpl<LiveUserRedRecordMapper, LiveUserRedRecord> implements ILiveUserRedRecordService {
+
+    /**
+     * 查询直播用户红包记录
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 直播用户红包记录
+     */
+    @Override
+    public LiveUserRedRecord selectLiveUserRedRecordById(Long id)
+    {
+        return baseMapper.selectLiveUserRedRecordById(id);
+    }
+
+    /**
+     * 查询直播用户红包记录列表
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 直播用户红包记录
+     */
+    @Override
+    public List<LiveUserRedRecord> selectLiveUserRedRecordList(LiveUserRedRecord liveUserRedRecord)
+    {
+        return baseMapper.selectLiveUserRedRecordList(liveUserRedRecord);
+    }
+
+    /**
+     * 新增直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    @Override
+    public int insertLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord)
+    {
+        liveUserRedRecord.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertLiveUserRedRecord(liveUserRedRecord);
+    }
+
+    /**
+     * 修改直播用户红包记录
+     * 
+     * @param liveUserRedRecord 直播用户红包记录
+     * @return 结果
+     */
+    @Override
+    public int updateLiveUserRedRecord(LiveUserRedRecord liveUserRedRecord)
+    {
+        return baseMapper.updateLiveUserRedRecord(liveUserRedRecord);
+    }
+
+    /**
+     * 批量删除直播用户红包记录
+     * 
+     * @param ids 需要删除的直播用户红包记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveUserRedRecordByIds(Long[] ids)
+    {
+        return baseMapper.deleteLiveUserRedRecordByIds(ids);
+    }
+
+    /**
+     * 删除直播用户红包记录信息
+     * 
+     * @param id 直播用户红包记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteLiveUserRedRecordById(Long id)
+    {
+        return baseMapper.deleteLiveUserRedRecordById(id);
+    }
+}

+ 86 - 0
fs-service/src/main/resources/mapper/live/LiveEventConfMapper.xml

@@ -0,0 +1,86 @@
+<?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.fs.live.mapper.LiveEventConfMapper">
+    
+    <resultMap type="LiveEventConf" id="LiveEventConfResult">
+        <result property="eventId"    column="event_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="eventType"    column="event_type"    />
+        <result property="triggerCount"    column="trigger_count"    />
+        <result property="redId"    column="red_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveEventConfVo">
+        select event_id, live_id, event_type, trigger_count, red_id, create_time, udpate_time, create_by, update_by from live_event_conf
+    </sql>
+
+    <select id="selectLiveEventConfList" parameterType="LiveEventConf" resultMap="LiveEventConfResult">
+        <include refid="selectLiveEventConfVo"/>
+        <where>  
+            <if test="liveId != null "> and live_id = #{liveId}</if>
+            <if test="eventType != null "> and event_type = #{eventType}</if>
+            <if test="createTime != null "> and create_time = #{createTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectLiveEventConfByEventId" parameterType="Long" resultMap="LiveEventConfResult">
+        <include refid="selectLiveEventConfVo"/>
+        where event_id = #{eventId}
+    </select>
+        
+    <insert id="insertLiveEventConf" parameterType="LiveEventConf" useGeneratedKeys="true" keyProperty="eventId">
+        insert into live_event_conf
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">live_id,</if>
+            <if test="eventType != null">event_type,</if>
+            <if test="triggerCount != null">trigger_count,</if>
+            <if test="redId != null">red_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">#{liveId},</if>
+            <if test="eventType != null">#{eventType},</if>
+            <if test="triggerCount != null">#{triggerCount},</if>
+            <if test="redId != null">#{redId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveEventConf" parameterType="LiveEventConf">
+        update live_event_conf
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="eventType != null">event_type = #{eventType},</if>
+            <if test="triggerCount != null">trigger_count = #{triggerCount},</if>
+            <if test="redId != null">red_id = #{redId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where event_id = #{eventId}
+    </update>
+
+    <delete id="deleteLiveEventConfByEventId" parameterType="Long">
+        delete from live_event_conf where event_id = #{eventId}
+    </delete>
+
+    <delete id="deleteLiveEventConfByEventIds" parameterType="String">
+        delete from live_event_conf where event_id in 
+        <foreach item="eventId" collection="array" open="(" separator="," close=")">
+            #{eventId}
+        </foreach>
+    </delete>
+</mapper>

+ 112 - 0
fs-service/src/main/resources/mapper/live/LiveLotteryConfMapper.xml

@@ -0,0 +1,112 @@
+<?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.fs.live.mapper.LiveLotteryConfMapper">
+    
+    <resultMap type="LiveLotteryConf" id="LiveLotteryConfResult">
+        <result property="lotteryId"    column="lottery_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="productId"    column="product_id"    />
+        <result property="prizeLevel"    column="prize_level"    />
+        <result property="perLotteryNum"    column="per_lottery_num"    />
+        <result property="totalLots"    column="total_lots"    />
+        <result property="totalSend"    column="total_send"    />
+        <result property="require"    column="require"    />
+        <result property="requireConf"    column="require_conf"    />
+        <result property="duration"    column="duration"    />
+        <result property="desc"    column="desc"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveLotteryConfVo">
+        select lottery_id, live_id, product_id, prize_level, per_lottery_num, total_lots, total_send, require, require_conf, duration, desc, create_time, udpate_time, create_by, update_by from live_lottery_conf
+    </sql>
+
+    <select id="selectLiveLotteryConfList" parameterType="LiveLotteryConf" resultMap="LiveLotteryConfResult">
+        <include refid="selectLiveLotteryConfVo"/>
+        <where>  
+            <if test="liveId != null "> and live_id = #{liveId}</if>
+            <if test="productId != null "> and product_id = #{productId}</if>
+            <if test="prizeLevel != null "> and prize_level = #{prizeLevel}</if>
+            <if test="require != null "> and require = #{require}</if>
+            <if test="createTime != null "> and create_time = #{createTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectLiveLotteryConfByLotteryId" parameterType="Long" resultMap="LiveLotteryConfResult">
+        <include refid="selectLiveLotteryConfVo"/>
+        where lottery_id = #{lotteryId}
+    </select>
+        
+    <insert id="insertLiveLotteryConf" parameterType="LiveLotteryConf" useGeneratedKeys="true" keyProperty="lotteryId">
+        insert into live_lottery_conf
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">live_id,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="prizeLevel != null">prize_level,</if>
+            <if test="perLotteryNum != null">per_lottery_num,</if>
+            <if test="totalLots != null">total_lots,</if>
+            <if test="totalSend != null">total_send,</if>
+            <if test="require != null">require,</if>
+            <if test="requireConf != null">require_conf,</if>
+            <if test="duration != null">duration,</if>
+            <if test="desc != null and desc != ''">desc,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">#{liveId},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="prizeLevel != null">#{prizeLevel},</if>
+            <if test="perLotteryNum != null">#{perLotteryNum},</if>
+            <if test="totalLots != null">#{totalLots},</if>
+            <if test="totalSend != null">#{totalSend},</if>
+            <if test="require != null">#{require},</if>
+            <if test="requireConf != null">#{requireConf},</if>
+            <if test="duration != null">#{duration},</if>
+            <if test="desc != null and desc != ''">#{desc},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveLotteryConf" parameterType="LiveLotteryConf">
+        update live_lottery_conf
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="prizeLevel != null">prize_level = #{prizeLevel},</if>
+            <if test="perLotteryNum != null">per_lottery_num = #{perLotteryNum},</if>
+            <if test="totalLots != null">total_lots = #{totalLots},</if>
+            <if test="totalSend != null">total_send = #{totalSend},</if>
+            <if test="require != null">require = #{require},</if>
+            <if test="requireConf != null">require_conf = #{requireConf},</if>
+            <if test="duration != null">duration = #{duration},</if>
+            <if test="desc != null and desc != ''">desc = #{desc},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where lottery_id = #{lotteryId}
+    </update>
+
+    <delete id="deleteLiveLotteryConfByLotteryId" parameterType="Long">
+        delete from live_lottery_conf where lottery_id = #{lotteryId}
+    </delete>
+
+    <delete id="deleteLiveLotteryConfByLotteryIds" parameterType="String">
+        delete from live_lottery_conf where lottery_id in 
+        <foreach item="lotteryId" collection="array" open="(" separator="," close=")">
+            #{lotteryId}
+        </foreach>
+    </delete>
+</mapper>

+ 75 - 0
fs-service/src/main/resources/mapper/live/LiveLotteryRecordMapper.xml

@@ -0,0 +1,75 @@
+<?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.fs.live.mapper.LiveLotteryRecordMapper">
+    
+    <resultMap type="LiveLotteryRecord" id="LiveLotteryRecordResult">
+        <result property="lotteryId"    column="lottery_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="lotteryStauts"    column="lottery_stauts"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveLotteryRecordVo">
+        select lottery_id, live_id, lottery_stauts, create_time, udpate_time, create_by, update_by from live_lottery_record
+    </sql>
+
+    <select id="selectLiveLotteryRecordList" parameterType="LiveLotteryRecord" resultMap="LiveLotteryRecordResult">
+        <include refid="selectLiveLotteryRecordVo"/>
+        <where>  
+        </where>
+    </select>
+    
+    <select id="selectLiveLotteryRecordByLotteryId" parameterType="Long" resultMap="LiveLotteryRecordResult">
+        <include refid="selectLiveLotteryRecordVo"/>
+        where lottery_id = #{lotteryId}
+    </select>
+        
+    <insert id="insertLiveLotteryRecord" parameterType="LiveLotteryRecord" useGeneratedKeys="true" keyProperty="lotteryId">
+        insert into live_lottery_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">live_id,</if>
+            <if test="lotteryStauts != null">lottery_stauts,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">#{liveId},</if>
+            <if test="lotteryStauts != null">#{lotteryStauts},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveLotteryRecord" parameterType="LiveLotteryRecord">
+        update live_lottery_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="lotteryStauts != null">lottery_stauts = #{lotteryStauts},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where lottery_id = #{lotteryId}
+    </update>
+
+    <delete id="deleteLiveLotteryRecordByLotteryId" parameterType="Long">
+        delete from live_lottery_record where lottery_id = #{lotteryId}
+    </delete>
+
+    <delete id="deleteLiveLotteryRecordByLotteryIds" parameterType="String">
+        delete from live_lottery_record where lottery_id in 
+        <foreach item="lotteryId" collection="array" open="(" separator="," close=")">
+            #{lotteryId}
+        </foreach>
+    </delete>
+</mapper>

+ 91 - 0
fs-service/src/main/resources/mapper/live/LiveLotteryRegistrationMapper.xml

@@ -0,0 +1,91 @@
+<?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.fs.live.mapper.LiveLotteryRegistrationMapper">
+    
+    <resultMap type="LiveLotteryRegistration" id="LiveLotteryRegistrationResult">
+        <result property="registrationId"    column="registration_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="isWin"    column="is_win"    />
+        <result property="rizeLevel"    column="rize_level"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveLotteryRegistrationVo">
+        select registration_id, live_id, user_id, is_win, rize_level, create_time, udpate_time, create_by, update_by from live_lottery_registration
+    </sql>
+
+    <select id="selectLiveLotteryRegistrationList" parameterType="LiveLotteryRegistration" resultMap="LiveLotteryRegistrationResult">
+        <include refid="selectLiveLotteryRegistrationVo"/>
+        <where>  
+            <if test="liveId != null "> and live_id = #{liveId}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="isWin != null "> and is_win = #{isWin}</if>
+            <if test="rizeLevel != null "> and rize_level = #{rizeLevel}</if>
+            <if test="createTime != null "> and create_time = #{createTime}</if>
+            <if test="udpateTime != null "> and udpate_time = #{udpateTime}</if>
+            <if test="createBy != null "> and create_by = #{createBy}</if>
+            <if test="updateBy != null "> and update_by = #{updateBy}</if>
+        </where>
+    </select>
+    
+    <select id="selectLiveLotteryRegistrationByRegistrationId" parameterType="Long" resultMap="LiveLotteryRegistrationResult">
+        <include refid="selectLiveLotteryRegistrationVo"/>
+        where registration_id = #{registrationId}
+    </select>
+        
+    <insert id="insertLiveLotteryRegistration" parameterType="LiveLotteryRegistration" useGeneratedKeys="true" keyProperty="registrationId">
+        insert into live_lottery_registration
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">live_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="isWin != null">is_win,</if>
+            <if test="rizeLevel != null">rize_level,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="liveId != null">#{liveId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="isWin != null">#{isWin},</if>
+            <if test="rizeLevel != null">#{rizeLevel},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveLotteryRegistration" parameterType="LiveLotteryRegistration">
+        update live_lottery_registration
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="isWin != null">is_win = #{isWin},</if>
+            <if test="rizeLevel != null">rize_level = #{rizeLevel},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where registration_id = #{registrationId}
+    </update>
+
+    <delete id="deleteLiveLotteryRegistrationByRegistrationId" parameterType="Long">
+        delete from live_lottery_registration where registration_id = #{registrationId}
+    </delete>
+
+    <delete id="deleteLiveLotteryRegistrationByRegistrationIds" parameterType="String">
+        delete from live_lottery_registration where registration_id in 
+        <foreach item="registrationId" collection="array" open="(" separator="," close=")">
+            #{registrationId}
+        </foreach>
+    </delete>
+</mapper>

+ 107 - 0
fs-service/src/main/resources/mapper/live/LiveRedConfMapper.xml

@@ -0,0 +1,107 @@
+<?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.fs.live.mapper.LiveRedConfMapper">
+    
+    <resultMap type="LiveRedConf" id="LiveRedConfResult">
+        <result property="redId"    column="red_id"    />
+        <result property="redStauts"    column="red_stauts"    />
+        <result property="duration"    column="duration"    />
+        <result property="redType"    column="red_type"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="redNum"    column="red_num"    />
+        <result property="totalLots"    column="total_lots"    />
+        <result property="totalSend"    column="total_send"    />
+        <result property="desc"    column="desc"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveRedConfVo">
+        select red_id, red_stauts, duration, red_type, live_id, red_num, total_lots, total_send, desc, create_time, udpate_time, create_by, update_by from live_red_conf
+    </sql>
+
+    <select id="selectLiveRedConfList" parameterType="LiveRedConf" resultMap="LiveRedConfResult">
+        <include refid="selectLiveRedConfVo"/>
+        <where>  
+            <if test="redStauts != null "> and red_stauts = #{redStauts}</if>
+            <if test="duration != null "> and duration = #{duration}</if>
+            <if test="redType != null "> and red_type = #{redType}</if>
+            <if test="liveId != null "> and live_id = #{liveId}</if>
+            <if test="redNum != null "> and red_num = #{redNum}</if>
+            <if test="totalLots != null "> and total_lots = #{totalLots}</if>
+            <if test="totalSend != null "> and total_send = #{totalSend}</if>
+            <if test="desc != null  and desc != ''"> and desc = #{desc}</if>
+        </where>
+    </select>
+    
+    <select id="selectLiveRedConfByRedId" parameterType="Long" resultMap="LiveRedConfResult">
+        <include refid="selectLiveRedConfVo"/>
+        where red_id = #{redId}
+    </select>
+        
+    <insert id="insertLiveRedConf" parameterType="LiveRedConf" useGeneratedKeys="true" keyProperty="redId">
+        insert into live_red_conf
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="redStauts != null">red_stauts,</if>
+            <if test="duration != null">duration,</if>
+            <if test="redType != null">red_type,</if>
+            <if test="liveId != null">live_id,</if>
+            <if test="redNum != null">red_num,</if>
+            <if test="totalLots != null">total_lots,</if>
+            <if test="totalSend != null">total_send,</if>
+            <if test="desc != null and desc != ''">desc,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="redStauts != null">#{redStauts},</if>
+            <if test="duration != null">#{duration},</if>
+            <if test="redType != null">#{redType},</if>
+            <if test="liveId != null">#{liveId},</if>
+            <if test="redNum != null">#{redNum},</if>
+            <if test="totalLots != null">#{totalLots},</if>
+            <if test="totalSend != null">#{totalSend},</if>
+            <if test="desc != null and desc != ''">#{desc},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveRedConf" parameterType="LiveRedConf">
+        update live_red_conf
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="redStauts != null">red_stauts = #{redStauts},</if>
+            <if test="duration != null">duration = #{duration},</if>
+            <if test="redType != null">red_type = #{redType},</if>
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="redNum != null">red_num = #{redNum},</if>
+            <if test="totalLots != null">total_lots = #{totalLots},</if>
+            <if test="totalSend != null">total_send = #{totalSend},</if>
+            <if test="desc != null and desc != ''">desc = #{desc},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where red_id = #{redId}
+    </update>
+
+    <delete id="deleteLiveRedConfByRedId" parameterType="Long">
+        delete from live_red_conf where red_id = #{redId}
+    </delete>
+
+    <delete id="deleteLiveRedConfByRedIds" parameterType="String">
+        delete from live_red_conf where red_id in 
+        <foreach item="redId" collection="array" open="(" separator="," close=")">
+            #{redId}
+        </foreach>
+    </delete>
+</mapper>

+ 83 - 0
fs-service/src/main/resources/mapper/live/LiveUserLotteryRecordMapper.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.fs.live.mapper.LiveUserLotteryRecordMapper">
+    
+    <resultMap type="LiveUserLotteryRecord" id="LiveUserLotteryRecordResult">
+        <result property="id"    column="id"    />
+        <result property="lotteryId"    column="lottery_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="productId"    column="product_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveUserLotteryRecordVo">
+        select id, lottery_id, live_id, user_id, product_id, create_time, udpate_time, create_by, update_by from live_user_lottery_record
+    </sql>
+
+    <select id="selectLiveUserLotteryRecordList" parameterType="LiveUserLotteryRecord" resultMap="LiveUserLotteryRecordResult">
+        <include refid="selectLiveUserLotteryRecordVo"/>
+        <where>  
+        </where>
+    </select>
+    
+    <select id="selectLiveUserLotteryRecordById" parameterType="Long" resultMap="LiveUserLotteryRecordResult">
+        <include refid="selectLiveUserLotteryRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertLiveUserLotteryRecord" parameterType="LiveUserLotteryRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into live_user_lottery_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="lotteryId != null">lottery_id,</if>
+            <if test="liveId != null">live_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="lotteryId != null">#{lotteryId},</if>
+            <if test="liveId != null">#{liveId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveUserLotteryRecord" parameterType="LiveUserLotteryRecord">
+        update live_user_lottery_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="lotteryId != null">lottery_id = #{lotteryId},</if>
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLiveUserLotteryRecordById" parameterType="Long">
+        delete from live_user_lottery_record where id = #{id}
+    </delete>
+
+    <delete id="deleteLiveUserLotteryRecordByIds" parameterType="String">
+        delete from live_user_lottery_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 83 - 0
fs-service/src/main/resources/mapper/live/LiveUserRedRecordMapper.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.fs.live.mapper.LiveUserRedRecordMapper">
+    
+    <resultMap type="LiveUserRedRecord" id="LiveUserRedRecordResult">
+        <result property="id"    column="id"    />
+        <result property="redId"    column="red_id"    />
+        <result property="liveId"    column="live_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="integral"    column="integral"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="udpateTime"    column="udpate_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectLiveUserRedRecordVo">
+        select id, red_id, live_id, user_id, integral, create_time, udpate_time, create_by, update_by from live_user_red_record
+    </sql>
+
+    <select id="selectLiveUserRedRecordList" parameterType="LiveUserRedRecord" resultMap="LiveUserRedRecordResult">
+        <include refid="selectLiveUserRedRecordVo"/>
+        <where>  
+        </where>
+    </select>
+    
+    <select id="selectLiveUserRedRecordById" parameterType="Long" resultMap="LiveUserRedRecordResult">
+        <include refid="selectLiveUserRedRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertLiveUserRedRecord" parameterType="LiveUserRedRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into live_user_red_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="redId != null">red_id,</if>
+            <if test="liveId != null">live_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="integral != null">integral,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="udpateTime != null">udpate_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="redId != null">#{redId},</if>
+            <if test="liveId != null">#{liveId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="integral != null">#{integral},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="udpateTime != null">#{udpateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateLiveUserRedRecord" parameterType="LiveUserRedRecord">
+        update live_user_red_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="redId != null">red_id = #{redId},</if>
+            <if test="liveId != null">live_id = #{liveId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="integral != null">integral = #{integral},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteLiveUserRedRecordById" parameterType="Long">
+        delete from live_user_red_record where id = #{id}
+    </delete>
+
+    <delete id="deleteLiveUserRedRecordByIds" parameterType="String">
+        delete from live_user_red_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>