活动管理-抽奖活动管理删除修改
This commit is contained in:
parent
9ca96f647d
commit
95e26a93a4
|
|
@ -5,6 +5,7 @@ import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽奖活动管理对象 draw_info
|
* 抽奖活动管理对象 draw_info
|
||||||
|
|
@ -78,6 +79,15 @@ public class DrawInfo extends BaseEntity
|
||||||
/** */
|
/** */
|
||||||
private String VALIDATETYPE;
|
private String VALIDATETYPE;
|
||||||
|
|
||||||
|
private List<String> drawId;
|
||||||
|
|
||||||
|
public List<String> getDrawId() {
|
||||||
|
return drawId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDrawId(List<String> drawId) {
|
||||||
|
this.drawId = drawId;
|
||||||
|
}
|
||||||
|
|
||||||
public void setDRAWID(String DRAWID)
|
public void setDRAWID(String DRAWID)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,10 @@ public interface ActConfigMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ActConfig selectActConfigByCode(String drawCode);
|
public ActConfig selectActConfigByCode(String drawCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动代码删除活动配置信息
|
||||||
|
* @param toStrArray
|
||||||
|
*/
|
||||||
|
public void deleteActConfigByCode(String[] toStrArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,10 @@ public interface ActPageConfigGuideMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ActPageConfigGuide selectActPageConfigGuideByCode(String drawCode);
|
public ActPageConfigGuide selectActPageConfigGuideByCode(String drawCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动代码删除活动展示内容配置信息
|
||||||
|
* @param toStrArray
|
||||||
|
*/
|
||||||
|
public void deleteActPageConfigGuideByCode(String[] toStrArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,10 @@ public interface ActPageConfigSubscribeMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ActPageConfigSubscribe selectActPageConfigSubscribeByCode(String drawCode);
|
public ActPageConfigSubscribe selectActPageConfigSubscribeByCode(String drawCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动代码删除活动配置信息
|
||||||
|
* @param toStrArray
|
||||||
|
*/
|
||||||
|
public void deleteActPageConfigSubscribeByCode(String[] toStrArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,10 @@ public interface ActPageConfigUserinfoMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ActPageConfigUserinfo selectActPageConfigUserinfoByCode(String drawCode);
|
public ActPageConfigUserinfo selectActPageConfigUserinfoByCode(String drawCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动代码删除活动收集配置信息
|
||||||
|
* @param toStrArray
|
||||||
|
*/
|
||||||
|
public void deleteActPageConfigUserinfoByCode(String[] toStrArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,4 +65,10 @@ public interface DrawRuleMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public DrawRule selectDrawRuleByCode(String drawCode);
|
public DrawRule selectDrawRuleByCode(String drawCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据活动代码删除抽奖活动管理信息
|
||||||
|
* @param toStrArray
|
||||||
|
*/
|
||||||
|
public void deleteDrawRuleByIdCode(String[] toStrArray);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
package com.sinosoft.activity.service.impl;
|
package com.sinosoft.activity.service.impl;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.sinosoft.activity.domain.DrawInfo;
|
import com.sinosoft.activity.domain.DrawInfo;
|
||||||
import com.sinosoft.activity.mapper.DrawInfoMapper;
|
import com.sinosoft.activity.mapper.*;
|
||||||
import com.sinosoft.activity.service.IDrawInfoService;
|
import com.sinosoft.activity.service.IDrawInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -21,6 +23,17 @@ public class DrawInfoServiceImpl implements IDrawInfoService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private DrawInfoMapper drawInfoMapper;
|
private DrawInfoMapper drawInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private ActConfigMapper actConfigMapper;
|
||||||
|
@Autowired
|
||||||
|
private ActPageConfigGuideMapper actPageConfigGuideMapper;
|
||||||
|
@Autowired
|
||||||
|
private ActPageConfigSubscribeMapper actPageConfigSubscribeMapper;
|
||||||
|
@Autowired
|
||||||
|
private ActPageConfigUserinfoMapper actPageConfigUserinfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private DrawRuleMapper drawRuleMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询抽奖活动管理对象
|
* 查询抽奖活动管理对象
|
||||||
|
|
@ -76,7 +89,7 @@ public class DrawInfoServiceImpl implements IDrawInfoService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除抽奖活动管理对象对象
|
* 删除抽奖活动管理及其相关活动配置信息
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|
@ -84,7 +97,28 @@ public class DrawInfoServiceImpl implements IDrawInfoService
|
||||||
@Override
|
@Override
|
||||||
public int deleteDrawInfoByIds(String ids)
|
public int deleteDrawInfoByIds(String ids)
|
||||||
{
|
{
|
||||||
return drawInfoMapper.deleteDrawInfoByIds(Convert.toStrArray(ids));
|
DrawInfo drawInfo = new DrawInfo();
|
||||||
|
String[] string = ids.split(",");
|
||||||
|
List<String> code = Arrays.asList(string);
|
||||||
|
drawInfo.setDrawId(code);
|
||||||
|
//根据ID查询抽奖活动信息
|
||||||
|
List<DrawInfo> drawInfos = drawInfoMapper.selectDrawInfoList(drawInfo);
|
||||||
|
//删除活动管理信息
|
||||||
|
int i = drawInfoMapper.deleteDrawInfoByIds(Convert.toStrArray(ids));
|
||||||
|
List<String> collect = drawInfos.stream().map(DrawInfo::getDRAWCODE).collect(Collectors.toList());
|
||||||
|
String policyEndorseNos = String.join(",",collect);
|
||||||
|
|
||||||
|
//根据活动代码删除活动配置信息
|
||||||
|
actConfigMapper.deleteActConfigByCode(Convert.toStrArray(policyEndorseNos));
|
||||||
|
//根据活动代码删除活动展示内容配置信息
|
||||||
|
actPageConfigGuideMapper.deleteActPageConfigGuideByCode(Convert.toStrArray(policyEndorseNos));
|
||||||
|
//根据活动代码删除活动配置信息
|
||||||
|
actPageConfigSubscribeMapper.deleteActPageConfigSubscribeByCode(Convert.toStrArray(policyEndorseNos));
|
||||||
|
//根据活动代码删除活动收集配置信息
|
||||||
|
actPageConfigUserinfoMapper.deleteActPageConfigUserinfoByCode(Convert.toStrArray(policyEndorseNos));
|
||||||
|
//根据活动代码删除抽奖活动管理信息
|
||||||
|
drawRuleMapper.deleteDrawRuleByIdCode(Convert.toStrArray(policyEndorseNos));
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -100,5 +100,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteActConfigByCode" parameterType="String">
|
||||||
|
delete from act_config where act_code in
|
||||||
|
<foreach item="actCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{actCode}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -100,5 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteActPageConfigGuideByCode" parameterType="String">
|
||||||
|
delete from act_page_config_guide where act_code in
|
||||||
|
<foreach item="actCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{actCode}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -80,5 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteActPageConfigSubscribeByCode" parameterType="String">
|
||||||
|
delete from act_page_config_subscribe where act_code in
|
||||||
|
<foreach item="actCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{actCode}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -135,5 +135,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteActPageConfigUserinfoByCode" parameterType="String">
|
||||||
|
delete from act_page_config_userinfo where act_code in
|
||||||
|
<foreach item="actCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{actCode}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -28,7 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectDrawInfoList" parameterType="DrawInfo" resultMap="DrawInfoResult">
|
<select id="selectDrawInfoList" parameterType="DrawInfo" resultMap="DrawInfoResult">
|
||||||
<include refid="selectDrawInfoVo"/>
|
<include refid="selectDrawInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="drawId != null and drawId != '' ">
|
||||||
|
and DRAWID in
|
||||||
|
<foreach item="DRAWID" collection="drawId" open="(" separator="," close=")">
|
||||||
|
#{DRAWID}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="DRAWCODE != null and DRAWCODE != ''"> and DRAWCODE = #{DRAWCODE}</if>
|
<if test="DRAWCODE != null and DRAWCODE != ''"> and DRAWCODE = #{DRAWCODE}</if>
|
||||||
<if test="DRAWTYPE != null and DRAWTYPE != ''"> and DRAWTYPE = #{DRAWTYPE}</if>
|
<if test="DRAWTYPE != null and DRAWTYPE != ''"> and DRAWTYPE = #{DRAWTYPE}</if>
|
||||||
<if test="DRAWNAME != null and DRAWNAME != ''"> and DRAWNAME like concat('%', #{DRAWNAME}, '%')</if>
|
<if test="DRAWNAME != null and DRAWNAME != ''"> and DRAWNAME like concat('%', #{DRAWNAME}, '%')</if>
|
||||||
|
|
|
||||||
|
|
@ -115,5 +115,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{DRAWRULEID}
|
#{DRAWRULEID}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteDrawRuleByIdCode" parameterType="String">
|
||||||
|
delete from draw_rule where DRAWCODE in
|
||||||
|
<foreach item="drawCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{drawCode}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue