main
parent
9b2ae2c15e
commit
f045477807
|
|
@ -60,6 +60,9 @@ public class AppEvents extends BaseEntity
|
||||||
|
|
||||||
private List<Long> ids;
|
private List<Long> ids;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.app.domain;
|
package com.ruoyi.app.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
|
@ -11,6 +12,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
* @author wyh
|
* @author wyh
|
||||||
* @date 2024-07-23
|
* @date 2024-07-23
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class AppEventsUser extends BaseEntity
|
public class AppEventsUser extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
@ -38,6 +40,8 @@ public class AppEventsUser extends BaseEntity
|
||||||
@Excel(name = "微信号")
|
@Excel(name = "微信号")
|
||||||
private String wechatId;
|
private String wechatId;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
package com.ruoyi.app.service.impl;
|
package com.ruoyi.app.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.ruoyi.app.domain.AppEventsUser;
|
||||||
|
import com.ruoyi.app.mapper.AppEventsUserMapper;
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.ruoyi.common.core.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -20,6 +24,9 @@ public class AppEventsServiceImpl implements IAppEventsService
|
||||||
@Autowired
|
@Autowired
|
||||||
private AppEventsMapper appEventsMapper;
|
private AppEventsMapper appEventsMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AppEventsUserMapper appEventsUserMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询活动发布
|
* 查询活动发布
|
||||||
*
|
*
|
||||||
|
|
@ -39,8 +46,15 @@ public class AppEventsServiceImpl implements IAppEventsService
|
||||||
* @return 活动发布
|
* @return 活动发布
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AppEvents> selectAppEventsList(AppEvents appEvents)
|
public List<AppEvents> selectAppEventsList(AppEvents appEvents) {
|
||||||
{
|
if (appEvents.getType() == 4 && appEvents.getUserId() != null) {
|
||||||
|
AppEventsUser appEventsUser = new AppEventsUser();
|
||||||
|
appEventsUser.setUserId(appEvents.getUserId());
|
||||||
|
List<AppEventsUser> list = appEventsUserMapper.selectAppEventsUserList(appEventsUser);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
appEvents.setIds(list.stream().map(x->x.getEventsId()).distinct().collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
}
|
||||||
return appEventsMapper.selectAppEventsList(appEvents);
|
return appEventsMapper.selectAppEventsList(appEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||||
<if test="type != null "> and type = #{type}</if>
|
<if test="type != null "> and type = #{type}</if>
|
||||||
|
<if test="ids != null and ids.size() > 0">
|
||||||
|
and id in
|
||||||
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="updateBy" column="updateBy" />
|
<result property="updateBy" column="updateBy" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAppEventsUserVo">
|
<sql id="selectAppEventsUserVo">
|
||||||
select id, events_id, name, company_name, phone, wechat_id, create_time, update_time, create_by, updateBy, remark from app_events_user
|
select id, events_id, name, company_name, phone, wechat_id, create_time, update_time, create_by, updateBy, remark, user_id from app_events_user
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAppEventsUserList" parameterType="AppEventsUser" resultMap="AppEventsUserResult">
|
<select id="selectAppEventsUserList" parameterType="AppEventsUser" resultMap="AppEventsUserResult">
|
||||||
|
|
@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||||
<if test="wechatId != null and wechatId != ''"> and wechat_id = #{wechatId}</if>
|
<if test="wechatId != null and wechatId != ''"> and wechat_id = #{wechatId}</if>
|
||||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -52,7 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateBy != null">updateBy,</if>
|
<if test="updateBy != null">updateBy,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
</trim>
|
<if test="userId != null">user_id,</if>
|
||||||
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="eventsId != null">#{eventsId},</if>
|
<if test="eventsId != null">#{eventsId},</if>
|
||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
|
|
@ -64,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
</trim>
|
<if test="userId != null">#{userId},</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateAppEventsUser" parameterType="AppEventsUser">
|
<update id="updateAppEventsUser" parameterType="AppEventsUser">
|
||||||
|
|
@ -80,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue