lizhenhao 2 年之前
父节点
当前提交
809c6bcf7f
共有 13 个文件被更改,包括 490 次插入4 次删除
  1. 72 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/controller/LuckyDrawEventsController.java
  2. 45 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/domain/LuckyDrawAwards.java
  3. 8 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/domain/LuckyDrawEvents.java
  4. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/LuckyDrawAwardsMapper.java
  5. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/LuckyDrawEventsMapper.java
  6. 34 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/xml/LuckyDrawAwardsMapper.xml
  7. 55 4
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/xml/LuckyDrawEventsMapper.xml
  8. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/LuckyDrawAwardsService.java
  9. 140 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/LuckyDrawEventsService.java
  10. 45 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/dto/LuckyDrawAwardsDTO.java
  11. 12 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/dto/LuckyDrawEventsDTO.java
  12. 17 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/mapstruct/LuckyDrawAwardsWrapper.java
  13. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/mapstruct/LuckyDrawEventsWrapper.java

+ 72 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/controller/LuckyDrawEventsController.java

@@ -0,0 +1,72 @@
+package com.jeeplus.test.luckyDraw.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.sys.constant.enums.LogTypeEnum;
+import com.jeeplus.test.luckyDraw.service.LuckyDrawEventsService;
+import com.jeeplus.test.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);
+    }
+
+}

+ 45 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/domain/LuckyDrawAwards.java

@@ -0,0 +1,45 @@
+package com.jeeplus.test.luckyDraw.domain;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 抽奖-奖项表
+ * @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;
+}

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/domain/LuckyDrawEvents.java

@@ -6,6 +6,8 @@ import java.util.Date;
 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;
 
 /**
@@ -24,6 +26,7 @@ public class LuckyDrawEvents extends BaseEntity implements Serializable {
     /**
      * 活动名称
      */
+    @Query(tableColumn = "lde.name",type = QueryType.EQ)
     private String name;
 
     /**
@@ -31,6 +34,11 @@ public class LuckyDrawEvents extends BaseEntity implements Serializable {
      */
     private String detail;
 
+    /**
+     * 开启状态   1开启   0关闭
+     */
+    private String switchFlag;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 }

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/LuckyDrawAwardsMapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.test.luckyDraw.mapper;
+
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Entity com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards
+ */
+@Mapper
+public interface LuckyDrawAwardsMapper extends BaseMapper<LuckyDrawAwards> {
+
+}
+
+
+
+

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/LuckyDrawEventsMapper.java

@@ -1,8 +1,16 @@
 package com.jeeplus.test.luckyDraw.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.test.klgBase.question.domain.KlgBaseQuestions;
+import com.jeeplus.test.klgBase.question.service.dto.KlgBaseQuestionsDTO;
 import com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.test.luckyDraw.service.dto.LuckyDrawEventsDTO;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * @Entity com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents
@@ -10,6 +18,13 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 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);
 }
 
 

+ 34 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/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.test.luckyDraw.mapper.LuckyDrawAwardsMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.test.luckyDraw.service.dto.LuckyDrawAwardsDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateDate" column="update_date" 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,
+        lda.create_date,
+        lda.update_by,
+        lda.update_date,
+        lda.del_flag,
+        lda.remarks,
+        lda.events_id,
+        lda.name,
+        lda.number,
+        lda.prize_name
+    </sql>
+</mapper>

+ 55 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/mapper/xml/LuckyDrawEventsMapper.xml

@@ -14,11 +14,62 @@
             <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.test.luckyDraw.service.dto.LuckyDrawAwardsDTO" column="id" select="getLuckyDrawAwards"></collection>
     </resultMap>
 
-    <sql id="Base_Column_List">
-        id,create_by,create_date,
-        update_by,update_date,del_flag,
-        remarks,name,detail
+    <sql id="Events_Column_List">
+        lde.id,
+        lde.create_by,
+        lde.create_date,
+        lde.update_by,
+        lde.update_date,
+        lde.del_flag,
+        lde.remarks,
+        lde.name,
+        lde.detail,
+        lde.switch_flag
     </sql>
+
+    <sql id="Awards_Column_List">
+        lda.id,
+        lda.create_by,
+        lda.create_date,
+        lda.update_by,
+        lda.update_date,
+        lda.del_flag,
+        lda.remarks,
+        lda.events_id,
+        lda.name,
+        lda.number,
+        lda.prize_name
+    </sql>
+
+    <select id="getLuckyDrawAwards" resultType="com.jeeplus.test.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'
+    </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>

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/LuckyDrawAwardsService.java

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

+ 140 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/LuckyDrawEventsService.java

@@ -0,0 +1,140 @@
+package com.jeeplus.test.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.sys.domain.User;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.sys.utils.UserUtils;
+import com.jeeplus.test.editor.domain.EditorFiles;
+import com.jeeplus.test.editor.service.dto.EditorFilesDTO;
+import com.jeeplus.test.klgBase.question.domain.KlgBaseDispose;
+import com.jeeplus.test.klgBase.question.domain.KlgBaseQuestions;
+import com.jeeplus.test.klgBase.question.domain.KlgBaseReply;
+import com.jeeplus.test.klgBase.question.service.dto.KlgBaseQuestionsDTO;
+import com.jeeplus.test.klgBase.question.service.mapstruct.KlgBaseDisposeWrapper;
+import com.jeeplus.test.klgBase.question.service.mapstruct.KlgBaseQuestionsWrapper;
+import com.jeeplus.test.klgBase.question.service.mapstruct.KlgBaseReplyWrapper;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.test.luckyDraw.mapper.LuckyDrawAwardsMapper;
+import com.jeeplus.test.luckyDraw.mapper.LuckyDrawEventsMapper;
+import com.jeeplus.test.luckyDraw.service.dto.LuckyDrawAwardsDTO;
+import com.jeeplus.test.luckyDraw.service.dto.LuckyDrawEventsDTO;
+import com.jeeplus.test.luckyDraw.service.mapstruct.LuckyDrawAwardsWrapper;
+import com.jeeplus.test.luckyDraw.service.mapstruct.LuckyDrawEventsWrapper;
+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_date");
+        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 ("活动关闭成功");
+    }
+}

+ 45 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/dto/LuckyDrawAwardsDTO.java

@@ -0,0 +1,45 @@
+package com.jeeplus.test.luckyDraw.service.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+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;
+}

+ 12 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/dto/LuckyDrawEventsDTO.java

@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * 抽奖-活动表
@@ -30,6 +32,16 @@ public class LuckyDrawEventsDTO extends BaseDTO implements Serializable {
      */
     private String detail;
 
+    /**
+     * 开启状态   1开启   0关闭
+     */
+    private String switchFlag;
+
+    /**
+     * 奖项
+     */
+    private List<LuckyDrawAwardsDTO> luckyDrawAwardsDTOList;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 }

+ 17 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/mapstruct/LuckyDrawAwardsWrapper.java

@@ -0,0 +1,17 @@
+package com.jeeplus.test.luckyDraw.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawAwards;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.test.luckyDraw.service.dto.LuckyDrawAwardsDTO;
+import com.jeeplus.test.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 LuckyDrawAwardsWrapper extends EntityWrapper<LuckyDrawAwardsDTO, LuckyDrawAwards> {
+
+    LuckyDrawAwardsWrapper INSTANCE = Mappers.getMapper(LuckyDrawAwardsWrapper.class);
+
+}

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/luckyDraw/service/mapstruct/LuckyDrawEventsWrapper.java

@@ -0,0 +1,15 @@
+package com.jeeplus.test.luckyDraw.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.test.luckyDraw.domain.LuckyDrawEvents;
+import com.jeeplus.test.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);
+
+}