Ver código fonte

Merge remote-tracking branch 'origin/master'

sangwenwei 1 ano atrás
pai
commit
616ee6a760
28 arquivos alterados com 1587 adições e 0 exclusões
  1. 72 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawEventsController.java
  2. 218 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawInfoController.java
  3. 124 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawMembersController.java
  4. 42 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawEventsController.java
  5. 22 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawInfoController.java
  6. 23 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawMembersController.java
  7. 45 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawAwards.java
  8. 43 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawEvents.java
  9. 22 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawInfo.java
  10. 23 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawMembers.java
  11. 19 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawAwardsMapper.java
  12. 32 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawEventsMapper.java
  13. 50 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawInfoMapper.java
  14. 29 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawMembersMapper.java
  15. 34 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawAwardsMapper.xml
  16. 75 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawEventsMapper.xml
  17. 87 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawInfoMapper.xml
  18. 40 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawMembersMapper.xml
  19. 15 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawAwardsService.java
  20. 129 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawEventsService.java
  21. 121 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawInfoService.java
  22. 145 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawMembersService.java
  23. 43 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawAwardsDTO.java
  24. 44 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawEventsDTO.java
  25. 35 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawInfoDto.java
  26. 25 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawMembersDto.java
  27. 15 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/mapstruct/LuckyDrawAwardsWrapper.java
  28. 15 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/mapstruct/LuckyDrawEventsWrapper.java

+ 72 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawEventsController.java

@@ -0,0 +1,72 @@
+package com.jeeplus.pubmodules.luckyDraw.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import com.jeeplus.pubmodules.luckyDraw.service.LuckyDrawEventsService;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import io.swagger.annotations.Api;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+@Api("抽奖-活动")
+@RestController
+@RequestMapping(value = "/luckyDraw/events")
+public class LuckyDrawEventsController {
+
+    @Resource
+    private LuckyDrawEventsService luckyDrawEventsService;
+
+
+    @ApiLog("活动列表")
+    @PreAuthorize("hasAuthority('lucky_draw:events:list')")
+    @GetMapping("list")
+    public ResponseEntity<IPage<LuckyDrawEventsDTO>> data(LuckyDrawEventsDTO luckyDrawEventsDTO, Page<LuckyDrawEventsDTO> page) throws Exception {
+        IPage<LuckyDrawEventsDTO> result = new Page<LuckyDrawEventsDTO>();
+        result = luckyDrawEventsService.findList (page,luckyDrawEventsDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    @ApiLog("查询活动数据详情")
+    @PreAuthorize("hasAnyAuthority('lucky_draw:events:view','lucky_draw:events:add','lucky_draw:events:edit')")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        LuckyDrawEventsDTO luckyDrawEventsDTO = luckyDrawEventsService.queryById ( id );
+        return ResponseEntity.ok (luckyDrawEventsDTO);
+    }
+
+    @ApiLog(value = "修改/新增活动数据", type = LogTypeEnum.SAVE)
+    @PreAuthorize("hasAnyAuthority('lucky_draw:events:add','lucky_draw:events:edit')")
+    @PostMapping("save")
+    public ResponseEntity save(@Valid @RequestBody LuckyDrawEventsDTO luckyDrawEventsDTO) throws Exception {
+        luckyDrawEventsService.saveForm(luckyDrawEventsDTO);
+        return ResponseEntity.ok ("操作成功");
+    }
+
+    @ApiLog(value = "删除活动", type = LogTypeEnum.SAVE)
+    @PreAuthorize("hasAuthority('lucky_draw:events:del')")
+    @DeleteMapping("delete")
+    public ResponseEntity delete(String ids) {
+        return luckyDrawEventsService.deleteByIds(ids);
+    }
+
+    @ApiLog("开启活动")
+    @PreAuthorize("hasAnyAuthority('lucky_draw:events:edit')")
+    @GetMapping("openEvent")
+    public ResponseEntity openEvent(@RequestParam("id") String id) {
+        return luckyDrawEventsService.changeSwitchOpen(id);
+    }
+
+    @ApiLog("关闭活动")
+    @PreAuthorize("hasAnyAuthority('lucky_draw:events:edit')")
+    @GetMapping("closeEvent")
+    public ResponseEntity closeEvent(@RequestParam("id") String id) {
+        return luckyDrawEventsService.changeSwitchClose(id);
+    }
+
+}

+ 218 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawInfoController.java

@@ -0,0 +1,218 @@
+package com.jeeplus.pubmodules.luckyDraw.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.pubmodules.luckyDraw.service.LuckyDrawInfoService;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawInfoDto;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:06
+ **/
+@RestController
+@Api(tags ="抽奖-抽奖")
+@RequestMapping(value = "/luckyDraw/info")
+public class LuckyDrawInfoController {
+
+    @Resource
+    private LuckyDrawInfoService drawInfoService;
+
+    /**
+     * 根据活动id查询抽奖信息
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据活动id查询抽奖信息")
+    @GetMapping("/findByEventId")
+    public ResponseEntity<LuckyDrawInfoDto> findByEventId(@RequestParam String id) throws Exception{
+        LuckyDrawInfoDto dto = drawInfoService.findByEventId(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    @ApiLog("活动列表")
+    @GetMapping("list")
+    public ResponseEntity<IPage<LuckyDrawInfoDto>> data(LuckyDrawInfoDto luckyDrawEventsDTO, Page<LuckyDrawInfoDto> page) throws Exception {
+        IPage<LuckyDrawInfoDto> result = new Page<LuckyDrawInfoDto>();
+        result = drawInfoService.findList (page,luckyDrawEventsDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    @ApiLog("数据拼接")
+    @GetMapping("pjList")
+    public ResponseEntity<IPage<LuckyDrawInfoDto>> pjList(LuckyDrawInfoDto luckyDrawEventsDTO, Page<LuckyDrawInfoDto> page) throws Exception {
+        page.setSize(-1);
+        page.setCurrent(1);
+        IPage<LuckyDrawInfoDto> result = new Page<LuckyDrawInfoDto>();
+        result = drawInfoService.findList (page,luckyDrawEventsDTO);
+        List<LuckyDrawInfoDto> records = result.getRecords();
+        List<LuckyDrawInfoDto> addList = new ArrayList<>();
+        //获取已抽奖人数和本活动剩余未抽奖人数
+       //drawInfoService.getLuckyDrawCount(luckyDrawEventsDTO);
+        records.forEach(re ->{
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                re.setLuckyDrawFlag("1");
+                re.setShowFlag("2");
+                re.setLuckyDrawAgainFlag("1");
+            }else{
+                re.setLuckyDrawFlag("0");
+                re.setShowFlag("1");
+                re.setLuckyDrawAgainFlag("0");
+            }
+            addList.add(re);
+
+            LuckyDrawInfoDto btn = new LuckyDrawInfoDto(); // 新增按钮行
+            btn.setIsButton("1"); // 标记此行数据是按钮
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                btn.setLuckyDrawFlag("1");
+                btn.setLuckyDrawAgainFlag("1");
+            }else{
+                btn.setLuckyDrawFlag("0");
+                btn.setLuckyDrawAgainFlag("0");
+            }
+            btn.setEventsId(re.getEventsId());
+            btn.setNumber(re.getNumber());
+            btn.setId(re.getId());
+            addList.add(btn);
+
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                LuckyDrawInfoDto sh = new LuckyDrawInfoDto();
+                sh.setAwardsName("姓名");
+                sh.setNumber("手机号");
+                sh.setPrizeName("部门");
+                sh.setShowFlag("1");
+                sh.setLuckyDrawFlag("1");
+                addList.add(sh);
+            }else{
+                re.setLuckyDrawFlag("0");
+                re.setShowFlag("2");
+            }
+
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                for (int i = 0; i< re.getLuckyDrawMembersDtos().size(); i++){
+                    LuckyDrawMembersDto mem = re.getLuckyDrawMembersDtos().get(i);
+                    LuckyDrawInfoDto l = new LuckyDrawInfoDto();
+                    l.setAwardsName(mem.getName());
+                    l.setNumber(mem.getPhone());
+                    l.setPrizeName(mem.getOfficeName());
+                    l.setShowFlag("0");
+                    l.setLuckyDrawFlag("1");
+                    l.setSerialNumber(i + 1);
+                    addList.add(l);
+                }
+            }
+        });
+        result.setRecords(addList);
+        return ResponseEntity.ok (result);
+    }
+
+    @ApiLog("数据拼接(中奖展示)")
+    @GetMapping("pjShowList")
+    public ResponseEntity<IPage<LuckyDrawInfoDto>> pjShowList(LuckyDrawInfoDto luckyDrawEventsDTO, Page<LuckyDrawInfoDto> page) throws Exception {
+        page.setSize(-1);
+        page.setCurrent(1);
+        IPage<LuckyDrawInfoDto> result = new Page<LuckyDrawInfoDto>();
+        result = drawInfoService.findList (page,luckyDrawEventsDTO);
+        List<LuckyDrawInfoDto> records = result.getRecords();
+        List<LuckyDrawInfoDto> addList = new ArrayList<>();
+        //获取已抽奖人数和本活动剩余未抽奖人数
+       //drawInfoService.getLuckyDrawCount(luckyDrawEventsDTO);
+        records.forEach(re ->{
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                re.setLuckyDrawFlag("1");
+                re.setShowFlag("2");
+                re.setLuckyDrawAgainFlag("1");
+            }else{
+                re.setLuckyDrawFlag("0");
+                re.setShowFlag("1");
+                re.setLuckyDrawAgainFlag("0");
+            }
+            addList.add(re);
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                LuckyDrawInfoDto sh = new LuckyDrawInfoDto();
+                sh.setAwardsName("姓名");
+                sh.setNumber("手机号");
+                sh.setPrizeName("部门");
+                sh.setShowFlag("1");
+                sh.setLuckyDrawFlag("1");
+                addList.add(sh);
+            }else{
+                re.setLuckyDrawFlag("0");
+                re.setShowFlag("2");
+            }
+
+            if(re.getLuckyDrawMembersDtos().size()>0){
+                for (int i = 0; i< re.getLuckyDrawMembersDtos().size(); i++){
+                    LuckyDrawMembersDto mem = re.getLuckyDrawMembersDtos().get(i);
+                    LuckyDrawInfoDto l = new LuckyDrawInfoDto();
+                    l.setAwardsName(mem.getName());
+                    l.setNumber(mem.getPhone());
+                    l.setPrizeName(mem.getOfficeName());
+                    l.setShowFlag("0");
+                    l.setLuckyDrawFlag("1");
+                    l.setSerialNumber(i + 1);
+                    addList.add(l);
+                }
+            }
+
+            /*re.getLuckyDrawMembersDtos().forEach(mem->{
+                LuckyDrawInfoDto l = new LuckyDrawInfoDto();
+                l.setAwardsName(mem.getName());
+                l.setNumber(mem.getPhone());
+                l.setPrizeName(mem.getOfficeName());
+                l.setShowFlag("0");
+                l.setLuckyDrawFlag("1");
+                addList.add(l);
+            });*/
+        });
+        result.setRecords(addList);
+        return ResponseEntity.ok (result);
+    }
+
+    /**
+     * 抽奖
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "抽奖")
+    @PostMapping("/luckyDraw")
+    public ResponseEntity<String> luckyDraw(@RequestBody LuckyDrawInfoDto dto) throws Exception{
+        String s = drawInfoService.luckyDraw(dto);
+        return ResponseUtil.newInstance().ok (s);
+    }
+
+    /**
+     * 重新抽奖
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "抽奖")
+    @PostMapping("/luckyDrawAgain")
+    public ResponseEntity<String> luckyDrawAgain(@RequestBody LuckyDrawInfoDto dto) throws Exception{
+        String s = drawInfoService.luckyDrawAgain(dto);
+        return ResponseUtil.newInstance().ok (s);
+    }
+
+    /**
+     * 重新抽奖
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "清除抽奖结果信息")
+    @PostMapping("/luckyDrawClear")
+    public ResponseEntity<String> luckyDrawClear(@RequestBody LuckyDrawInfoDto dto) throws Exception{
+        String s = drawInfoService.luckyDrawClear(dto);
+        return ResponseUtil.newInstance().ok (s);
+    }
+
+}

+ 124 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/LuckyDrawMembersController.java

@@ -0,0 +1,124 @@
+package com.jeeplus.pubmodules.luckyDraw.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.pubmodules.luckyDraw.service.LuckyDrawMembersService;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto;
+import com.jeeplus.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:08
+ **/
+@RestController
+@Api(tags ="抽奖-人员")
+@RequestMapping(value = "/luckyDraw/member")
+public class LuckyDrawMembersController {
+    @Resource
+    private LuckyDrawMembersService membersService;
+
+
+
+    /*@ApiOperation(value = "删除")
+    @GetMapping("/remove")
+    public ResponseEntity<String> remove(@RequestParam String id){
+        String s = membersService.remove(id);
+        return ResponseEntity.ok(s);
+    }*/
+    /**
+     * 删除
+     * @param ids
+     * @return
+     */
+    @ApiLog(value = "删除")
+    @DeleteMapping("remove")
+    public ResponseEntity delete(String ids) {
+        return membersService.deleteByIds(ids);
+    }
+
+    /**
+     * 新增/修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "新增、修改")
+    @PostMapping("/save")
+    public ResponseEntity<String> save(@RequestBody LuckyDrawMembersDto dto) throws Exception{
+        if(StringUtils.isBlank(dto.getEventId())){
+            return ResponseEntity.badRequest().body ("请选择参与的活动");
+        }
+        String result = membersService.save(dto);
+        switch (result){
+            case "1":
+                return ResponseEntity.badRequest().body ("您已参加该活动。无需重复参与");
+            case "2":
+                return ResponseEntity.badRequest().body ("新增失败");
+        }
+        return ResponseEntity.ok ("操作成功");
+    }
+
+    /**
+     * 查询
+     * @param phone
+     * @return
+     */
+    @ApiOperation(value = "联系电话唯一性")
+    @GetMapping("/findMobilePhoneOnly")
+    public ResponseEntity<Integer> findMobilePhoneOnly(@RequestParam String phone) throws Exception{
+        Integer idCardOnly = membersService.findMobilePhoneOnly(phone);
+        return ResponseEntity.ok(idCardOnly);
+    }
+
+    /**
+     * 查询
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询")
+    @GetMapping("/findById")
+    public ResponseEntity<LuckyDrawMembersDto> findById(@RequestParam String id) throws Exception{
+        LuckyDrawMembersDto dto = membersService.findById(id);
+        return ResponseEntity.ok(dto);
+    }
+
+    /**
+     * 列表查询
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/list")
+    public ResponseEntity<IPage<LuckyDrawMembersDto>> list(Page<LuckyDrawMembersDto> page, LuckyDrawMembersDto dto) throws Exception{
+        IPage<LuckyDrawMembersDto> iPage = membersService.list(page, dto);
+        return ResponseEntity.ok(iPage);
+    }
+
+    /**
+     * 列表查询
+     * @param dto
+     * @return
+     */
+    @ApiOperation(value = "app列表查询")
+    @GetMapping("/appShowList")
+    public ResponseEntity<IPage<LuckyDrawMembersDto>> appShowList(Page<LuckyDrawMembersDto> page, LuckyDrawMembersDto dto) throws Exception{
+        page.setSize(-1);
+        page.setCurrent(1);
+        IPage<LuckyDrawMembersDto> iPage = membersService.list(page, dto);
+        List<LuckyDrawMembersDto> records = iPage.getRecords();
+        if(records.size()>0){
+            for (int i = 0; i < records.size(); i++) {
+                LuckyDrawMembersDto info = records.get(i);
+                info.setSerialNumber(i +1);
+            }
+        }
+        return ResponseEntity.ok(iPage);
+    }
+}

+ 42 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawEventsController.java

@@ -0,0 +1,42 @@
+package com.jeeplus.pubmodules.luckyDraw.controller.app;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.pubmodules.luckyDraw.service.LuckyDrawEventsService;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import io.swagger.annotations.Api;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@Api("app-活动")
+@RestController
+@RequestMapping(value = "/app/luckyDraw/events")
+public class AppLuckyDrawEventsController {
+
+    @Resource
+    private LuckyDrawEventsService luckyDrawEventsService;
+
+    @ApiLog("活动列表")
+    @GetMapping("list")
+    public ResponseEntity<IPage<LuckyDrawEventsDTO>> data_app(LuckyDrawEventsDTO luckyDrawEventsDTO, Page<LuckyDrawEventsDTO> page) throws Exception {
+        IPage<LuckyDrawEventsDTO> result = new Page<LuckyDrawEventsDTO>();
+        result = luckyDrawEventsService.findList (page,luckyDrawEventsDTO);
+        return ResponseEntity.ok (result);
+    }
+
+    @ApiLog("查询活动数据详情")
+    @GetMapping("queryById")
+    public ResponseEntity queryById(@RequestParam("id") String id) {
+        LuckyDrawEventsDTO luckyDrawEventsDTO = luckyDrawEventsService.queryById ( id );
+        return ResponseEntity.ok (luckyDrawEventsDTO);
+    }
+
+
+
+}

+ 22 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawInfoController.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright © 2021-2025 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.pubmodules.luckyDraw.controller.app;
+
+import com.jeeplus.pubmodules.luckyDraw.controller.LuckyDrawInfoController;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * App测试移动表单Controller
+ * @author 刘高峰
+ * @version 2022-04-13
+ */
+
+@Api(tags ="测试移动表单")
+@RestController
+@RequestMapping(value = "/app/luckyDraw/info")
+public class AppLuckyDrawInfoController extends LuckyDrawInfoController {
+
+}

+ 23 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/controller/app/AppLuckyDrawMembersController.java

@@ -0,0 +1,23 @@
+package com.jeeplus.pubmodules.luckyDraw.controller.app;
+
+import com.jeeplus.pubmodules.luckyDraw.controller.LuckyDrawMembersController;
+import com.jeeplus.pubmodules.luckyDraw.service.LuckyDrawMembersService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:08
+ **/
+@RestController
+@Api(tags ="抽奖-人员")
+@RequestMapping(value = "/app/luckyDraw/member")
+public class AppLuckyDrawMembersController extends LuckyDrawMembersController {
+
+    @Resource
+    private LuckyDrawMembersService membersService;
+
+}

+ 45 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawAwards.java

@@ -0,0 +1,45 @@
+package com.jeeplus.pubmodules.luckyDraw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-奖项表
+ * @TableName lucky_draw_awards
+ */
+@TableName(value ="lucky_draw_awards")
+@Data
+public class LuckyDrawAwards extends BaseEntity implements Serializable {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 活动id
+     */
+    private String eventsId;
+
+    /**
+     * 奖项名称
+     */
+    private String name;
+
+    /**
+     * 奖品数量
+     */
+    private Integer number;
+
+    /**
+     * 奖品
+     */
+    private String prizeName;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 43 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawEvents.java

@@ -0,0 +1,43 @@
+package com.jeeplus.pubmodules.luckyDraw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.core.query.Query;
+import com.jeeplus.core.query.QueryType;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-活动表
+ * @TableName lucky_draw_events
+ */
+@TableName(value ="lucky_draw_events")
+@Data
+public class LuckyDrawEvents extends BaseEntity implements Serializable {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 活动名称
+     */
+    @Query(tableColumn = "lde.name",type = QueryType.LIKE)
+    private String name;
+
+    /**
+     * 活动详情
+     */
+    private String detail;
+
+    /**
+     * 开启状态   1开启   0关闭
+     */
+    private String switchFlag;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 22 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawInfo.java

@@ -0,0 +1,22 @@
+package com.jeeplus.pubmodules.luckyDraw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-抽奖表
+ * @author: 王强
+ * @create: 2023-02-28 10:56
+ **/
+@TableName(value ="lucky_draw_info")
+@Data
+public class LuckyDrawInfo extends BaseEntity implements Serializable {
+
+    private String memberId;
+    private String eventId;
+    private String luckyDrawFlag; //抽奖状态
+    private String awardId;//奖项id
+}

+ 23 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/domain/LuckyDrawMembers.java

@@ -0,0 +1,23 @@
+package com.jeeplus.pubmodules.luckyDraw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-人员表
+ * @author: 王强
+ * @create: 2023-02-28 10:56
+ **/
+@TableName(value ="lucky_draw_members")
+@Data
+public class LuckyDrawMembers extends BaseEntity implements Serializable {
+
+    private String name;
+    private String officeName;
+    private String phone;
+    private String eventId;
+    private String companyName;
+}

+ 19 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawAwardsMapper.java

@@ -0,0 +1,19 @@
+package com.jeeplus.pubmodules.luckyDraw.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawAwards;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface LuckyDrawAwardsMapper extends BaseMapper<LuckyDrawAwards> {
+
+}
+
+
+
+

+ 32 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawEventsMapper.java

@@ -0,0 +1,32 @@
+package com.jeeplus.pubmodules.luckyDraw.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Entity com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents
+ */
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface LuckyDrawEventsMapper extends BaseMapper<LuckyDrawEvents> {
+
+    IPage<LuckyDrawEventsDTO> findList(Page<LuckyDrawEventsDTO> page, @Param(Constants.WRAPPER) QueryWrapper<LuckyDrawEvents> queryWrapper);
+
+    LuckyDrawEventsDTO queryById(@Param("id") String id);
+
+    void changeSwitchOpen(@Param("id") String id);
+
+    void changeSwitchClose(@Param("id") String id);
+}
+
+
+
+

+ 50 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawInfoMapper.java

@@ -0,0 +1,50 @@
+package com.jeeplus.pubmodules.luckyDraw.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawInfo;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawInfoDto;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:01
+ **/
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface LuckyDrawInfoMapper extends BaseMapper<LuckyDrawInfo> {
+
+    IPage<LuckyDrawInfoDto> findList(Page<LuckyDrawInfoDto> page, @Param(Constants.WRAPPER) QueryWrapper<LuckyDrawInfoDto> queryWrapper);
+
+    /**
+     * 根据活动id查询抽奖信息
+     * @param id
+     * @return
+     */
+    LuckyDrawInfoDto findByEventId(String id);
+
+    /**
+     * 根据奖品数量随机抽取对应的用户
+     * @return
+     */
+    List<String> selectUserId(@Param("number") int number,
+                              @Param("eventId") String eventId);
+
+    /**
+     * 根据活动id和奖项id对该奖项数据信息进行删除
+     * @param info
+     * @return
+     */
+    void deleteByEventIdAndAwardId(LuckyDrawInfoDto info);
+
+    Integer getLuckyDrawUserCount(String eventId);
+
+    Integer getLuckyDrawMemberCount(String eventId);
+}

+ 29 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/LuckyDrawMembersMapper.java

@@ -0,0 +1,29 @@
+package com.jeeplus.pubmodules.luckyDraw.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawMembers;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:00
+ **/
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface LuckyDrawMembersMapper extends BaseMapper<LuckyDrawMembers> {
+
+    IPage<LuckyDrawMembersDto> findList(Page<LuckyDrawMembersDto> page, @Param(Constants.WRAPPER) QueryWrapper<LuckyDrawMembersDto> queryWrapper);
+
+    Integer getByName(LuckyDrawMembersDto dto);
+
+    int getByNameAndId(String name, String eventId);
+
+    LuckyDrawMembersDto findById(String id);
+}

+ 34 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawAwardsMapper.xml

@@ -0,0 +1,34 @@
+<?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.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawAwardsMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawAwardsDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="eventsId" column="events_id" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="number" column="number" jdbcType="INTEGER"/>
+            <result property="prizeName" column="prize_name" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Awards_Column_List">
+        lda.id,
+        lda.create_by_id,
+        lda.create_time,
+        lda.update_by_id,
+        lda.update_time,
+        lda.del_flag,
+        lda.remarks,
+        lda.events_id,
+        lda.name,
+        lda.number,
+        lda.prize_name
+    </sql>
+</mapper>

+ 75 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawEventsMapper.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.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawEventsMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="name" column="name" jdbcType="VARCHAR"/>
+            <result property="detail" column="detail" jdbcType="VARCHAR"/>
+            <result property="switchFlag" column="switch_flag" jdbcType="VARCHAR"></result>
+            <collection property="luckyDrawAwardsDTOList" ofType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawAwardsDTO" column="id" select="getLuckyDrawAwards"></collection>
+    </resultMap>
+
+    <sql id="Events_Column_List">
+        lde.id,
+        lde.create_by_id,
+        lde.create_time,
+        lde.update_by_id,
+        lde.update_time,
+        lde.del_flag,
+        lde.remarks,
+        lde.name,
+        lde.detail,
+        lde.switch_flag
+    </sql>
+
+    <sql id="Awards_Column_List">
+        lda.id,
+        lda.create_by_id,
+        lda.create_time,
+        lda.update_by_id,
+        lda.update_time,
+        lda.del_flag,
+        lda.remarks,
+        lda.events_id,
+        lda.name,
+        lda.number,
+        lda.prize_name
+    </sql>
+
+    <select id="getLuckyDrawAwards" resultType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawAwardsDTO">
+        select
+            <include refid="Awards_Column_List"></include>
+        from lucky_draw_awards lda where lda.events_id = #{id} and lda.del_flag = '0' order by lda.create_time asc
+    </select>
+
+    <select id="findList" resultMap="BaseResultMap">
+        select
+            <include refid="Events_Column_List"></include>
+        from lucky_draw_events lde
+        ${ew.customSqlSegment}
+    </select>
+
+    <select id="queryById" resultMap="BaseResultMap">
+        select
+            <include refid="Events_Column_List"></include>
+        from lucky_draw_events lde
+        where lde.del_flag = '0' and lde.id = #{id}
+    </select>
+
+    <update id="changeSwitchOpen">
+        update lucky_draw_events lde set lde.switch_flag = '1' where lde.id = #{id}
+    </update>
+
+    <update id="changeSwitchClose">
+        update lucky_draw_events lde set lde.switch_flag = '0' where lde.id = #{id}
+    </update>
+</mapper>

+ 87 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawInfoMapper.xml

@@ -0,0 +1,87 @@
+<?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.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawInfoMapper">
+    <resultMap id="BaseResultMap" type="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawInfoDto">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+        <result property="awardsName" column="name" jdbcType="VARCHAR"/>
+        <result property="prizeName" column="prize_name" jdbcType="VARCHAR"/>
+        <result property="number" column="number" jdbcType="VARCHAR"/>
+        <collection property="luckyDrawMembersDtos" ofType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto" column="id" select="getUserInfo"></collection>
+    </resultMap>
+
+    <sql id="User_Info_List">
+        ldm.id,
+        ldm.create_by_id,
+        ldm.create_time,
+        ldm.update_by_id,
+        ldm.update_time,
+        ldm.del_flag,
+        ldm.name,
+        ldm.office_name,
+        ldm.phone
+    </sql>
+
+    <sql id="Events_Column_List">
+        lda.id,
+        lda.create_by_id,
+        lda.create_time,
+        lda.update_by_id,
+        lda.update_time,
+        lda.del_flag,
+        lda.remarks,
+        lda.events_id,
+        lda.name,
+        lda.number,
+        lda.prize_name
+    </sql>
+
+    <select id="findByEventId" resultMap="BaseResultMap">
+        select
+        <include refid="Events_Column_List"></include>
+        from lucky_draw_awards lda
+        left join lucky_draw_info lui on lda.events_id = lui.event_id
+        left join lucky_draw_members ldm on lui.member_id = ldm.id
+        where lda.events_id = #{id}
+    </select>
+    <select id="selectUserId" resultType="java.lang.String">
+        select id from `lucky_draw_members`
+        WHERE id not in (SELECT member_id FROM lucky_draw_info b WHERE b.event_id = #{eventId}) and event_id = #{eventId} and del_flag = 0
+        order by rand() LIMIT #{number}
+    </select>
+    <select id="getUserInfo" resultType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto">
+        select
+        <include refid="User_Info_List"></include>
+        from lucky_draw_members ldm
+        left join lucky_draw_info lui on ldm.id = lui.member_id and lui.del_flag = '0'
+        left join lucky_draw_awards lda on lda.id = lui.award_id and lda.del_flag = '0'
+        where lda.id = #{id} and ldm.del_flag = '0'
+    </select>
+    <select id="findList" resultMap="BaseResultMap">
+        select
+        <include refid="Events_Column_List"></include>
+        from lucky_draw_awards lda
+        left join lucky_draw_events lde on lda.events_id = lde.id
+        ${ew.customSqlSegment}
+    </select>
+
+    <delete id="deleteByEventIdAndAwardId">
+        delete from lucky_draw_info
+        <where>
+            event_id = #{id}
+            and award_id = #{awardId}
+        </where>
+    </delete>
+
+    <select id="getLuckyDrawUserCount" resultType="java.lang.Integer">
+        select count(1) from lucky_draw_info where event_id = #{eventId}
+    </select>
+
+    <select id="getLuckyDrawMemberCount" resultType="java.lang.Integer">
+        select count(1) from lucky_draw_members where event_id = #{eventId}
+    </select>
+</mapper>

+ 40 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/mapper/xml/LuckyDrawMembersMapper.xml

@@ -0,0 +1,40 @@
+<?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.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawMembersMapper">
+    <select id="findList" resultType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto">
+        SELECT
+			a.id,
+			a.create_by_id,
+			a.create_time,
+			a.name,
+			a.office_name,
+			a.company_name,
+			a.phone,
+			a.event_id,
+			b.name as eventName
+		FROM
+			lucky_draw_members a
+			left join lucky_draw_events b on a.event_id = b.id and b.del_flag = '0'
+			${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+    </select>
+    <select id="getByName" resultType="java.lang.Integer">
+		select count(1) from lucky_draw_members
+		<where>
+			del_flag = 0 and
+			name = #{name}
+			and event_id = #{eventId}
+			<if test="id != null and id != ''">
+				and id != #{id}
+			</if>
+		</where>
+	</select>
+	<select id="getByNameAndId" resultType="java.lang.Integer">
+		select count(*) from lucky_draw_members where name = #{name} and event_id = #{eventId}
+	</select>
+	<select id="findById" resultType="com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto">
+		select a.*,b.name as eventName from lucky_draw_members a
+		left join lucky_draw_events b on a.event_id = b.id and b.del_flag = '0'
+		where a.id = #{id}
+	</select>
+</mapper>

+ 15 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawAwardsService.java

@@ -0,0 +1,15 @@
+package com.jeeplus.pubmodules.luckyDraw.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawAwards;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawAwardsMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service
+public class LuckyDrawAwardsService extends ServiceImpl<LuckyDrawAwardsMapper, LuckyDrawAwards> {
+
+    @Resource
+    private LuckyDrawAwardsMapper luckyDrawAwardsMapper;
+}

+ 129 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawEventsService.java

@@ -0,0 +1,129 @@
+package com.jeeplus.pubmodules.luckyDraw.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawAwards;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawAwardsMapper;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawEventsMapper;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawAwardsDTO;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import com.jeeplus.pubmodules.luckyDraw.service.mapstruct.LuckyDrawAwardsWrapper;
+import com.jeeplus.pubmodules.luckyDraw.service.mapstruct.LuckyDrawEventsWrapper;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class LuckyDrawEventsService extends ServiceImpl<LuckyDrawEventsMapper, LuckyDrawEvents> {
+
+    @Resource
+    private LuckyDrawEventsMapper luckyDrawEventsMapper;
+
+    @Resource
+    private LuckyDrawAwardsMapper luckyDrawAwardsMapper;
+
+    @Resource
+    private LuckyDrawAwardsService luckyDrawAwardsService;
+
+    public IPage<LuckyDrawEventsDTO> findList(Page<LuckyDrawEventsDTO> page, LuckyDrawEventsDTO luckyDrawEventsDTO) throws Exception{
+        QueryWrapper<LuckyDrawEvents> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( LuckyDrawEventsWrapper.INSTANCE.toEntity(luckyDrawEventsDTO), LuckyDrawEvents.class );
+        queryWrapper.eq("lde.del_flag","0");
+        queryWrapper.orderByDesc("lde.create_time");
+        IPage<LuckyDrawEventsDTO> list = luckyDrawEventsMapper.findList(page, queryWrapper);
+        return list;
+    }
+
+    public LuckyDrawEventsDTO queryById(String id) {
+
+        LuckyDrawEventsDTO luckyDrawEventsDTO = luckyDrawEventsMapper.queryById(id);
+
+        return luckyDrawEventsDTO;
+    }
+
+    public String saveForm(LuckyDrawEventsDTO luckyDrawEventsDTO) throws Exception{
+        LuckyDrawEvents luckyDrawEvents = LuckyDrawEventsWrapper.INSTANCE.toEntity(luckyDrawEventsDTO);
+        if (ObjectUtil.isNotEmpty(luckyDrawEventsDTO)) {
+            if (StringUtils.isBlank(luckyDrawEventsDTO.getId())) {
+                luckyDrawEvents.setSwitchFlag("1");
+            }
+        }
+
+        // 保存或修改活动信息
+        this.saveOrUpdate(luckyDrawEvents);
+
+        if (ObjectUtil.isNotEmpty(luckyDrawEventsDTO)) {
+            // 保存奖项数据
+            if (CollectionUtil.isNotEmpty(luckyDrawEventsDTO.getLuckyDrawAwardsDTOList())) {
+                // 获取奖项数据中拥有id的数据id
+                List<String> haveIdList = luckyDrawEventsDTO.getLuckyDrawAwardsDTOList().stream().filter(item -> {
+                    if (StringUtils.isNotBlank(item.getId())) {
+                        return true;
+                    }
+                    return false;
+                }).map(LuckyDrawAwardsDTO::getId).collect(Collectors.toList());
+                // 获取到的数据id除外的数据全部删除
+                if (CollectionUtil.isNotEmpty(haveIdList)) {
+                    luckyDrawAwardsMapper.delete(new QueryWrapper<LuckyDrawAwards>().lambda()
+                            .eq(LuckyDrawAwards::getEventsId,luckyDrawEvents.getId())
+                            .notIn(LuckyDrawAwards::getId,haveIdList)
+                    );
+                } else {
+                    luckyDrawAwardsMapper.delete(new QueryWrapper<LuckyDrawAwards>().lambda().eq(LuckyDrawAwards::getEventsId,luckyDrawEvents.getId()));
+                }
+                luckyDrawEventsDTO.getLuckyDrawAwardsDTOList().stream().forEach(dto -> {
+                    LuckyDrawAwards luckyDrawAwards = LuckyDrawAwardsWrapper.INSTANCE.toEntity(dto);
+                    luckyDrawAwards.setEventsId(luckyDrawEvents.getId());
+                    luckyDrawAwardsService.saveOrUpdate(luckyDrawAwards);
+                });
+            } else {
+                luckyDrawAwardsMapper.delete(new QueryWrapper<LuckyDrawAwards>().lambda().eq(LuckyDrawAwards::getEventsId,luckyDrawEvents.getId()));
+            }
+        }
+        return luckyDrawEvents.getId();
+    }
+
+    public ResponseEntity deleteByIds(String ids) {
+        String idArray[] =ids.split(",");
+        ArrayList<String> strings = Lists.newArrayList(idArray);
+        if (CollectionUtil.isNotEmpty(strings)) {
+            // 删除活动
+            this.removeByIds (strings);
+            // 根据活动id删除奖项数据
+            luckyDrawAwardsMapper.delete(new QueryWrapper<LuckyDrawAwards>().lambda().in(LuckyDrawAwards::getEventsId,strings));
+        }
+
+        return ResponseEntity.ok ("删除成功");
+    }
+
+    /**
+     * 开启活动
+     * @param id
+     * @return
+     */
+    public ResponseEntity changeSwitchOpen (String id) {
+        luckyDrawEventsMapper.changeSwitchOpen(id);
+        return ResponseEntity.ok ("活动开启成功");
+    }
+
+    /**
+     * 关闭活动
+     * @param id
+     * @return
+     */
+    public ResponseEntity changeSwitchClose (String id) {
+        luckyDrawEventsMapper.changeSwitchClose(id);
+        return ResponseEntity.ok ("活动关闭成功");
+    }
+}

+ 121 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawInfoService.java

@@ -0,0 +1,121 @@
+package com.jeeplus.pubmodules.luckyDraw.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawInfo;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawInfoMapper;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawMembersMapper;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawInfoDto;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:02
+ **/
+@Service
+@Transactional
+public class LuckyDrawInfoService extends ServiceImpl<LuckyDrawInfoMapper, LuckyDrawInfo> {
+
+    @Resource
+    private LuckyDrawInfoMapper drawInfoMapper;
+
+    @Resource
+    private LuckyDrawMembersMapper membersMapper;
+
+
+    /**
+     * 列表查询
+     */
+    public IPage<LuckyDrawInfoDto> findList(Page<LuckyDrawInfoDto> page , LuckyDrawInfoDto dto) throws Exception{
+        QueryWrapper<LuckyDrawInfoDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, LuckyDrawInfoDto.class);
+
+        queryWrapper.eq("lda.del_flag", "0");
+        queryWrapper.eq("lde.switch_flag", "1");
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            queryWrapper.eq("lda.events_id",dto.getId());
+        }
+
+        return drawInfoMapper.findList(page, queryWrapper);
+    }
+
+    /**
+     * 获取已抽奖人数和本活动剩余未抽奖人数
+     * @param dto
+     * @return
+     */
+    public Map<String,Integer> getLuckyDrawCount (LuckyDrawInfoDto dto){
+        Map<String,Integer> map =new HashMap<>();
+        //查询活动中奖人数
+        Integer luckyDrawUserCount = drawInfoMapper.getLuckyDrawUserCount(dto.getId());
+        map.put("luckyDrawUserCount",luckyDrawUserCount);
+        //查询活动参与人数
+        Integer luckyDrawMemberCount = drawInfoMapper.getLuckyDrawMemberCount(dto.getId());
+        map.put("luckyDrawMemberCount",luckyDrawMemberCount);
+        return map;
+    }
+
+    public LuckyDrawInfoDto findByEventId(String id) {
+        LuckyDrawInfoDto dto = drawInfoMapper.findByEventId(id);
+        return dto;
+    }
+
+    public String luckyDraw(LuckyDrawInfoDto dto) throws Exception{
+        return add(dto);
+    }
+
+    public String luckyDrawAgain(LuckyDrawInfoDto dto) throws Exception{
+        //根据活动id和奖项id对该奖项数据信息进行删除
+        drawInfoMapper.deleteByEventIdAndAwardId(dto);
+        return add(dto);
+    }
+
+    public String luckyDrawClear(LuckyDrawInfoDto dto){
+        //根据活动id和奖项id对该奖项数据信息进行删除
+        drawInfoMapper.deleteByEventIdAndAwardId(dto);
+        return "清除成功";
+    }
+
+    /**
+     *根据奖品数量随机抽取用户进行抽奖
+     * @param dto
+     * @return
+     * @throws Exception
+     */
+    public String add(LuckyDrawInfoDto dto) throws Exception{
+        LuckyDrawInfo members = new LuckyDrawInfo();
+        BeanUtils.copyProperties(dto, members);
+
+        members.setCreateById("1");
+        members.setCreateTime(new Date());
+        members.setUpdateById("1");
+        members.setUpdateTime(new Date());
+        members.setDelFlag(0);
+        members.setEventId(dto.getId());
+        members.setAwardId(dto.getAwardId());
+        members.setLuckyDrawFlag("1");
+        //当抽奖前
+        int num = Integer.parseInt(dto.getNumber());
+        //根据奖品数量和活动id随机抽取用户进行抽奖
+        List<String> list = drawInfoMapper.selectUserId(num,dto.getId());
+        list.forEach(userId->{
+            // 生成id
+            String id = UUID.randomUUID().toString().replace("-", "");
+            members.setId(id);
+            members.setMemberId(userId);
+            drawInfoMapper.insert(members);
+        });
+        if(list.size() < num){
+            return "活动剩余参与人数小于奖项人数,按剩余人数进行抽奖";
+        }
+        return "抽奖成功";
+    }
+}

+ 145 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/LuckyDrawMembersService.java

@@ -0,0 +1,145 @@
+package com.jeeplus.pubmodules.luckyDraw.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawMembers;
+import com.jeeplus.pubmodules.luckyDraw.mapper.LuckyDrawMembersMapper;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawMembersDto;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * @author: 王强
+ * @create: 2023-02-28 11:03
+ **/
+@Service
+@Transactional
+public class LuckyDrawMembersService extends ServiceImpl<LuckyDrawMembersMapper, LuckyDrawMembers> {
+
+    @Resource
+    private LuckyDrawMembersMapper membersMapper;
+
+    public Integer findMobilePhoneOnly(String phone) throws Exception {
+        // 删除基础信息表
+        Integer integer = membersMapper.selectCount(new QueryWrapper<LuckyDrawMembers>().eq("phone",phone));
+        return integer;
+    }
+
+    public String remove(String id) {
+        membersMapper.deleteById(id);
+        return "操作成功";
+    }
+
+    public ResponseEntity deleteByIds(String ids) {
+        String idArray[] =ids.split(",");
+        ArrayList<String> strings = Lists.newArrayList(idArray);
+        if (CollectionUtil.isNotEmpty(strings)) {
+            // 删除活动
+            this.removeByIds (strings);
+            // 根据活动id删除奖项数据
+            membersMapper.delete(new QueryWrapper<LuckyDrawMembers>().lambda().in(LuckyDrawMembers::getId,strings));
+        }
+
+        return ResponseEntity.ok ("删除成功");
+    }
+
+    public String save(LuckyDrawMembersDto dto) throws Exception{
+        // 获取当前登录人信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());;
+        if (StringUtils.isNotEmpty(dto.getId())) {
+            return update(dto, userDTO);
+        } else {
+            return add(dto, userDTO);
+        }
+    }
+    public String add(LuckyDrawMembersDto dto, UserDTO userDTO) throws Exception{
+        // 生成id
+        String id = UUID.randomUUID().toString().replace("-", "");
+        LuckyDrawMembers members = new LuckyDrawMembers();
+        BeanUtils.copyProperties(dto, members);
+        members.setId(id);
+        members.setCreateById(userDTO.getId());
+        members.setCreateTime(new Date());
+        members.setUpdateById(userDTO.getId());
+        members.setUpdateTime(new Date());
+        members.setDelFlag(0);
+        //插入前先看库中是否有对应的用户名称
+        Integer drawMembersCount = membersMapper.getByName(dto);
+        if (drawMembersCount == 0){
+            membersMapper.insert(members);
+        }else {
+            return "1";
+        }
+        return id;
+    }
+
+    public String update(LuckyDrawMembersDto dto, UserDTO userDTO) throws Exception {
+        // 修改基础信息
+        LuckyDrawMembers members = new LuckyDrawMembers();
+        BeanUtils.copyProperties(dto, members);
+        members.setUpdateById(userDTO.getId());
+        members.setUpdateTime(new Date());
+        //插入前先看库中是否有对应的用户名称
+        Integer drawMembersCount = membersMapper.getByName(dto);
+        if (drawMembersCount == 0){
+            membersMapper.updateById(members);
+        }else {
+            return "1";
+        }
+
+        return dto.getId();
+    }
+
+    public LuckyDrawMembersDto findById(String id) {
+        LuckyDrawMembersDto dto = membersMapper.findById(id);
+//        LuckyDrawMembers members = membersMapper.selectById(id);
+//        BeanUtils.copyProperties(members,dto);
+        return dto;
+    }
+
+    /**
+     * 列表查询
+     */
+    public IPage<LuckyDrawMembersDto> list(Page<LuckyDrawMembersDto> page , LuckyDrawMembersDto dto) throws Exception{
+        QueryWrapper<LuckyDrawMembersDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, LuckyDrawMembersDto.class);
+
+        queryWrapper.eq("a.del_flag", "0");
+        if (StringUtils.isNotEmpty(dto.getEventId())) {
+            queryWrapper.like("a.event_id", dto.getEventId());
+        }
+        if (StringUtils.isNotEmpty(dto.getName())) {
+            queryWrapper.like("a.name", dto.getName());
+        }
+        if (StringUtils.isNotEmpty(dto.getPhone())) {
+            queryWrapper.like("a.phone", dto.getPhone());
+        }
+        if (StringUtils.isNotEmpty(dto.getOfficeName())) {
+            queryWrapper.eq("a.office_name", dto.getOfficeName());
+        }
+        if (StringUtils.isNotEmpty(dto.getCompanyName())) {
+            queryWrapper.eq("a.company_name", dto.getCompanyName());
+        }
+        if (StringUtils.isNotEmpty(dto.getEventName())) {
+            queryWrapper.like("b.name", dto.getEventName());
+        }
+
+        return membersMapper.findList(page, queryWrapper);
+    }
+}

+ 43 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawAwardsDTO.java

@@ -0,0 +1,43 @@
+package com.jeeplus.pubmodules.luckyDraw.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-奖项表
+ * @TableName lucky_draw_awards
+ */
+@Data
+public class LuckyDrawAwardsDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 活动id
+     */
+    private String eventsId;
+
+    /**
+     * 奖项名称
+     */
+    private String name;
+
+    /**
+     * 奖品数量
+     */
+    private Integer number;
+
+    /**
+     * 奖品
+     */
+    private String prizeName;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 44 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawEventsDTO.java

@@ -0,0 +1,44 @@
+package com.jeeplus.pubmodules.luckyDraw.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 抽奖-活动表
+ * @TableName lucky_draw_events
+ */
+@Data
+public class LuckyDrawEventsDTO extends BaseDTO implements Serializable {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 活动名称
+     */
+    private String name;
+
+    /**
+     * 活动详情
+     */
+    private String detail;
+
+    /**
+     * 开启状态   1开启   0关闭
+     */
+    private String switchFlag;
+
+    /**
+     * 奖项
+     */
+    private List<LuckyDrawAwardsDTO> luckyDrawAwardsDTOList;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 35 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawInfoDto.java

@@ -0,0 +1,35 @@
+package com.jeeplus.pubmodules.luckyDraw.service.dto;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 抽奖-抽奖表
+ * @author: 王强
+ * @create: 2023-02-28 15:15
+ **/
+@Data
+public class LuckyDrawInfoDto extends BaseDTO implements Serializable {
+    private String memberId;//用户id
+    private String eventsId;//活动id
+    private String awardId;//奖项id
+    private String name;//姓名
+    private String officeName;
+    private String phone;
+    private String awardsName; //奖项名称
+    private String prizeName; //奖品名称
+    private String number; //奖品数量
+    private String luckyDrawFlag; //抽奖状态
+    private String showFlag; //展示状态
+    private String luckyDrawAgainFlag; //重新抽奖
+    private String isButton; //按钮行标记  1为按钮
+    private Integer serialNumber; //序号
+    /**
+     * 奖项
+     */
+    private List<LuckyDrawMembersDto> luckyDrawMembersDtos;
+
+}

+ 25 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/dto/LuckyDrawMembersDto.java

@@ -0,0 +1,25 @@
+package com.jeeplus.pubmodules.luckyDraw.service.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 抽奖-人员
+ * @author: 王强
+ * @create: 2023-02-28 11:14
+ **/
+@Data
+public class LuckyDrawMembersDto implements Serializable {
+
+    private String id;
+    private String name;
+    private String officeName;
+    private String companyName;
+    private String phone;
+    private String eventId; //活动id
+    private String createBy;
+    private Integer serialNumber; //序号
+
+    private String eventName;//活动名称
+}

+ 15 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/mapstruct/LuckyDrawAwardsWrapper.java

@@ -0,0 +1,15 @@
+package com.jeeplus.pubmodules.luckyDraw.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawAwards;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawAwardsDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface LuckyDrawAwardsWrapper extends EntityWrapper<LuckyDrawAwardsDTO, LuckyDrawAwards> {
+
+    LuckyDrawAwardsWrapper INSTANCE = Mappers.getMapper(LuckyDrawAwardsWrapper.class);
+
+}

+ 15 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/luckyDraw/service/mapstruct/LuckyDrawEventsWrapper.java

@@ -0,0 +1,15 @@
+package com.jeeplus.pubmodules.luckyDraw.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.pubmodules.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.pubmodules.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface LuckyDrawEventsWrapper extends EntityWrapper<LuckyDrawEventsDTO, LuckyDrawEvents> {
+
+    LuckyDrawEventsWrapper INSTANCE = Mappers.getMapper(LuckyDrawEventsWrapper.class);
+
+}