Commit 7af58467 by 吕明尚

Merge branch 'refs/heads/dev' into test

parents caf44548 6a80cfd7
...@@ -10,6 +10,9 @@ import share.common.core.page.TableDataInfo; ...@@ -10,6 +10,9 @@ import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.system.domain.EquityFundLog; import share.system.domain.EquityFundLog;
import share.system.domain.SConsumer;
import share.system.domain.vo.DurationLogVo;
import share.system.domain.vo.FrontTokenComponent;
import share.system.service.EquityFundLogService; import share.system.service.EquityFundLogService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -28,40 +31,18 @@ public class EquityFundLogController extends BaseController { ...@@ -28,40 +31,18 @@ public class EquityFundLogController extends BaseController {
private EquityFundLogService equityFundLogService; private EquityFundLogService equityFundLogService;
/** /**
* 查询权益金记录列表 * 查询本人权益金记录列表
*/ */
@PostMapping("/list") @GetMapping("/list")
public TableDataInfo list(EquityFundLog equityFundLog) { public TableDataInfo list(EquityFundLog equityFundLog) {
startPage(); startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
equityFundLog.setUid(user.getId());
List<EquityFundLog> list = equityFundLogService.selectEquityFundLogList(equityFundLog); List<EquityFundLog> list = equityFundLogService.selectEquityFundLogList(equityFundLog);
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取权益金记录详细信息
*/
@PreAuthorize("@ss.hasPermi('system:equityFundLog:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(equityFundLogService.selectEquityFundLogById(id));
}
/**
* 查询权益金记录列表
*/
// @PreAuthorize("@ss.hasPermi('system:equityFundLog:listUid')")
@GetMapping("/listUid/{uid}")
public TableDataInfo equityFundLogListByUid(@PathVariable("uid") Long uid) {
startPage();
List<EquityFundLog> list = equityFundLogService.selectEquityFundLogByUid(uid);
return getDataTable(list);
}
@GetMapping("/listNewUid/{id}")
public TableDataInfo equityFundLogListByNewUid(@PathVariable("id") Long id) {
startPage();
List<EquityFundLog> list = equityFundLogService.selectEquityFundLogByNewUid(id);
return getDataTable(list);
}
} }
...@@ -10,6 +10,7 @@ import share.common.core.domain.AjaxResult; ...@@ -10,6 +10,7 @@ import share.common.core.domain.AjaxResult;
import share.common.core.domain.R; import share.common.core.domain.R;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
import share.common.core.redis.RedisUtil; import share.common.core.redis.RedisUtil;
import share.common.enums.YesNoEnum;
import share.common.utils.JsonConvertUtil; import share.common.utils.JsonConvertUtil;
import share.system.domain.SConsumer; import share.system.domain.SConsumer;
import share.system.domain.vo.FrontTokenComponent; import share.system.domain.vo.FrontTokenComponent;
...@@ -43,6 +44,7 @@ public class MonthlyCardOrderController extends BaseController { ...@@ -43,6 +44,7 @@ public class MonthlyCardOrderController extends BaseController {
startPage(); startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry(); SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardOrder.setConsumerId(user.getId()); monthlyCardOrder.setConsumerId(user.getId());
monthlyCardOrder.setPayStatus(YesNoEnum.yes.getIndex());
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder); List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
return getDataTable(list); return getDataTable(list);
} }
...@@ -51,6 +53,7 @@ public class MonthlyCardOrderController extends BaseController { ...@@ -51,6 +53,7 @@ public class MonthlyCardOrderController extends BaseController {
public AjaxResult query(MonthlyCardOrderVo monthlyCardOrder) { public AjaxResult query(MonthlyCardOrderVo monthlyCardOrder) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry(); SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
monthlyCardOrder.setConsumerId(user.getId()); monthlyCardOrder.setConsumerId(user.getId());
monthlyCardOrder.setPayStatus(YesNoEnum.yes.getIndex());
List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder); List<MonthlyCardOrderVo> list = monthlyCardOrderService.selectMonthlyCardOrderList(monthlyCardOrder);
return success(list); return success(list);
} }
......
...@@ -5,7 +5,10 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -5,7 +5,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import share.common.core.controller.BaseController; import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
import share.system.domain.SConsumer;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SecondaryCardLogVo; import share.system.domain.vo.SecondaryCardLogVo;
import share.system.service.SecondaryCardLogService; import share.system.service.SecondaryCardLogService;
...@@ -29,8 +32,17 @@ public class SecondaryCardLogController extends BaseController { ...@@ -29,8 +32,17 @@ public class SecondaryCardLogController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SecondaryCardLogVo secondaryCardLog) { public TableDataInfo list(SecondaryCardLogVo secondaryCardLog) {
startPage(); startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
secondaryCardLog.setConsumerId(user.getId());
List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog); List<SecondaryCardLogVo> list = secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog);
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/query")
public AjaxResult query(SecondaryCardLogVo secondaryCardLog) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
secondaryCardLog.setConsumerId(user.getId());
return success(secondaryCardLogService.selectSecondaryCardLogList(secondaryCardLog));
}
} }
...@@ -9,7 +9,10 @@ import share.common.core.controller.BaseController; ...@@ -9,7 +9,10 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.R; import share.common.core.domain.R;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
import share.common.core.redis.RedisUtil; import share.common.core.redis.RedisUtil;
import share.common.enums.YesNoEnum;
import share.common.utils.JsonConvertUtil; import share.common.utils.JsonConvertUtil;
import share.system.domain.SConsumer;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SecondaryCardOrderVo; import share.system.domain.vo.SecondaryCardOrderVo;
import share.system.request.SecondaryCardOrderRequest; import share.system.request.SecondaryCardOrderRequest;
import share.system.response.SecondaryCardOrderPayResultResponse; import share.system.response.SecondaryCardOrderPayResultResponse;
...@@ -38,6 +41,9 @@ public class SecondaryCardOrderController extends BaseController { ...@@ -38,6 +41,9 @@ public class SecondaryCardOrderController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SecondaryCardOrderVo secondaryCardOrder) { public TableDataInfo list(SecondaryCardOrderVo secondaryCardOrder) {
startPage(); startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
secondaryCardOrder.setConsumerId(user.getId());
secondaryCardOrder.setPayStatus(YesNoEnum.yes.getIndex());
List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder); List<SecondaryCardOrderVo> list = secondaryCardOrderService.selectSecondaryCardOrderList(secondaryCardOrder);
return getDataTable(list); return getDataTable(list);
} }
......
package share.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import share.common.annotation.Log;
import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil;
import share.system.domain.EquityFundLog;
import share.system.domain.SConsumer;
import share.system.domain.SharingActivities;
import share.system.domain.vo.FrontTokenComponent;
import share.system.service.SharingActivitiesService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 分享活动绑定关系Controller
*
* @author wuwenlong
* @date 2024-09-02
*/
@RestController
@RequestMapping("/activities")
public class SharingActivitiesController extends BaseController {
@Autowired
private SharingActivitiesService sharingActivitiesService;
/**
* 查询分享活动绑定关系列表
*/
@GetMapping("/list")
public TableDataInfo list(SharingActivities sharingActivities) {
startPage();
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
sharingActivities.setUid(user.getId());
List<SharingActivities> list = sharingActivitiesService.selectSharingActivitiesList(sharingActivities);
return getDataTable(list);
}
@GetMapping("/query")
public AjaxResult query(SharingActivities sharingActivities) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
sharingActivities.setNewUid(user.getId());
List<SharingActivities> list = sharingActivitiesService.selectSharingActivitiesList(sharingActivities);
return success(list);
}
}
package share.system.domain; package share.system.domain;
import com.baomidou.mybatisplus.annotation.*;
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 share.common.annotation.Excel; import share.common.annotation.Excel;
import share.common.core.domain.BaseEntity; import share.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data; import lombok.Data;
/** /**
* 分享活动绑定关系对象 s_sharing_activities * 分享活动绑定关系对象 s_sharing_activities
* *
* @author wuwenlong * @author wuwenlong
* @date 2024-09-02 * @date 2024-09-14
*/ */
@Data @Data
@TableName("s_sharing_activities")
public class SharingActivities extends BaseEntity public class SharingActivities extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@TableId(type = IdType.AUTO)
private Long id; private Long id;
/** 活动类型(0-新用户注册,1-权益金会员分享) */ /** 活动类型(0-新用户注册,1-权益金会员分享) */
...@@ -40,20 +39,50 @@ public class SharingActivities extends BaseEntity ...@@ -40,20 +39,50 @@ public class SharingActivities extends BaseEntity
@TableField(select = false) @TableField(select = false)
private Long isDelete; private Long isDelete;
/** 上级用户头像 */
@Excel(name = "上级用户头像")
private String avatar;
/** 下级用户头像 */
@Excel(name = "下级用户头像")
private String newAvatar;
/** 上级用户昵称 */
@Excel(name = "上级用户昵称")
private String nickName;
/** 下级用户昵称 */
@Excel(name = "下级用户昵称")
private String newNickName;
/** 上级电话 */
@Excel(name = "上级电话")
private String phone;
/** 下级电话 */
@Excel(name = "下级电话")
private String newPhone;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("activityType", getActivityType()) .append("activityType", getActivityType())
.append("uid", getUid()) .append("uid", getUid())
.append("newUid", getNewUid()) .append("newUid", getNewUid())
.append("isDelete", getIsDelete()) .append("isDelete", getIsDelete())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("remark", getRemark()) .append("remark", getRemark())
.toString(); .append("avatar", getAvatar())
.append("newAvatar", getNewAvatar())
.append("nickName", getNickName())
.append("newNickName", getNewNickName())
.append("phone", getPhone())
.append("newPhone", getNewPhone())
.toString();
} }
} }
...@@ -59,4 +59,6 @@ public interface SharingActivitiesMapper extends BaseMapper<SharingActivities> ...@@ -59,4 +59,6 @@ public interface SharingActivitiesMapper extends BaseMapper<SharingActivities>
* @return 结果 * @return 结果
*/ */
public int deleteSharingActivitiesByIds(Long[] ids); public int deleteSharingActivitiesByIds(Long[] ids);
} }
...@@ -312,8 +312,16 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo ...@@ -312,8 +312,16 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
//判断是否为分享新用户 //判断是否为分享新用户
if (uid != null){ if (uid != null){
//添加绑定关系 //添加绑定关系
SConsumer consumer = sConsumerService.selectSConsumerById(uid);
SConsumer newConsumer = sConsumerService.selectSConsumerById(id);
SharingActivities sharingActivities = new SharingActivities(); SharingActivities sharingActivities = new SharingActivities();
sharingActivities.setUid(uid); sharingActivities.setUid(uid);
sharingActivities.setPhone(consumer.getPhone());
sharingActivities.setAvatar(consumer.getAvatar());
sharingActivities.setNickName(consumer.getNickName());
sharingActivities.setNewPhone(newConsumer.getPhone());
sharingActivities.setNewAvatar(newConsumer.getAvatar());
sharingActivities.setNewNickName(newConsumer.getNickName());
sharingActivities.setNewUid(id); sharingActivities.setNewUid(id);
sharingActivities.setCreateTime(DateUtils.getNowDate()); sharingActivities.setCreateTime(DateUtils.getNowDate());
sharingActivitiesService.insertSharingActivities(sharingActivities); sharingActivitiesService.insertSharingActivities(sharingActivities);
......
...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import share.system.domain.SConsumer;
import share.system.domain.SecondaryCardLog; import share.system.domain.SecondaryCardLog;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SecondaryCardLogVo; import share.system.domain.vo.SecondaryCardLogVo;
import share.system.mapper.SecondaryCardLogMapper; import share.system.mapper.SecondaryCardLogMapper;
import share.system.service.SecondaryCardLogService; import share.system.service.SecondaryCardLogService;
...@@ -41,6 +43,8 @@ public class SecondaryCardLogServiceImpl extends ServiceImpl<SecondaryCardLogMap ...@@ -41,6 +43,8 @@ public class SecondaryCardLogServiceImpl extends ServiceImpl<SecondaryCardLogMap
*/ */
@Override @Override
public List<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo secondaryCardLog) { public List<SecondaryCardLogVo> selectSecondaryCardLogList(SecondaryCardLogVo secondaryCardLog) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
secondaryCardLog.setConsumerId(user.getId());
return secondaryCardLogMapper.selectSecondaryCardLogList(secondaryCardLog); return secondaryCardLogMapper.selectSecondaryCardLogList(secondaryCardLog);
} }
......
...@@ -15,8 +15,10 @@ import share.common.enums.YesNoEnum; ...@@ -15,8 +15,10 @@ import share.common.enums.YesNoEnum;
import share.common.utils.DateUtils; import share.common.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;
import share.system.domain.SConsumer;
import share.system.mapper.SharingActivitiesMapper; import share.system.mapper.SharingActivitiesMapper;
import share.system.domain.SharingActivities; import share.system.domain.SharingActivities;
import share.system.service.SConsumerService;
import share.system.service.SharingActivitiesService; import share.system.service.SharingActivitiesService;
/** /**
...@@ -32,6 +34,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM ...@@ -32,6 +34,9 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
private SharingActivitiesMapper sharingActivitiesMapper; private SharingActivitiesMapper sharingActivitiesMapper;
@Autowired @Autowired
private SConsumerService consumerService;
@Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
/** /**
...@@ -81,7 +86,11 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM ...@@ -81,7 +86,11 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
@Override @Override
public int updateSharingActivities(SharingActivities sharingActivities) public int updateSharingActivities(SharingActivities sharingActivities)
{ {
SConsumer consumer = consumerService.selectSConsumerById(sharingActivities.getUid());
sharingActivities.setUpdateTime(DateUtils.getNowDate()); sharingActivities.setUpdateTime(DateUtils.getNowDate());
sharingActivities.setAvatar(consumer.getAvatar());
sharingActivities.setPhone(consumer.getPhone());
sharingActivities.setNickName(consumer.getNickName());
return sharingActivitiesMapper.updateSharingActivities(sharingActivities); return sharingActivitiesMapper.updateSharingActivities(sharingActivities);
} }
...@@ -109,4 +118,6 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM ...@@ -109,4 +118,6 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
return sharingActivitiesMapper.deleteSharingActivitiesById(id); return sharingActivitiesMapper.deleteSharingActivitiesById(id);
} }
} }
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.SharingActivitiesMapper"> <mapper namespace="share.system.mapper.SharingActivitiesMapper">
<resultMap type="SharingActivities" id="SharingActivitiesResult"> <resultMap type="SharingActivities" id="SharingActivitiesResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="activityType" column="activity_type" /> <result property="activityType" column="activity_type" />
...@@ -15,27 +15,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -15,27 +15,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="avatar" column="avatar" />
<result property="newAvatar" column="new_avatar" />
<result property="nickName" column="nick_name" />
<result property="newNickName" column="new_nick_name" />
<result property="phone" column="phone" />
<result property="newPhone" column="new_phone" />
</resultMap> </resultMap>
<sql id="selectSharingActivitiesVo"> <sql id="selectSharingActivitiesVo">
select id, activity_type, uid, new_uid, is_delete, create_by, create_time, update_by, update_time, remark from s_sharing_activities select id, activity_type, uid, new_uid, is_delete, create_by, create_time, update_by, update_time, remark, avatar, new_avatar, nick_name, new_nick_name, phone, new_phone from s_sharing_activities
</sql> </sql>
<select id="selectSharingActivitiesList" parameterType="SharingActivities" resultMap="SharingActivitiesResult"> <select id="selectSharingActivitiesList" parameterType="SharingActivities" resultMap="SharingActivitiesResult">
<include refid="selectSharingActivitiesVo"/> <include refid="selectSharingActivitiesVo"/>
<where> <where>
<if test="activityType != null and activityType != ''"> and activity_type = #{activityType}</if> <if test="activityType != null and activityType != ''"> and activity_type = #{activityType}</if>
<if test="uid != null "> and uid = #{uid}</if> <if test="uid != null "> and uid = #{uid}</if>
<if test="newUid != null "> and new_uid = #{newUid}</if> <if test="newUid != null "> and new_uid = #{newUid}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if> <if test="isDelete != null "> and is_delete = #{isDelete}</if>
<if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
<if test="newAvatar != null and newAvatar != ''"> and new_avatar = #{newAvatar}</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="newNickName != null and newNickName != ''"> and new_nick_name like concat('%', #{newNickName}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="newPhone != null and newPhone != ''"> and new_phone = #{newPhone}</if>
</where> </where>
</select> </select>
<select id="selectSharingActivitiesById" parameterType="Long" resultMap="SharingActivitiesResult"> <select id="selectSharingActivitiesById" parameterType="Long" resultMap="SharingActivitiesResult">
<include refid="selectSharingActivitiesVo"/> <include refid="selectSharingActivitiesVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertSharingActivities" parameterType="SharingActivities" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSharingActivities" parameterType="SharingActivities" useGeneratedKeys="true" keyProperty="id">
insert into s_sharing_activities insert into s_sharing_activities
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -48,7 +60,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -48,7 +60,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> <if test="avatar != null">avatar,</if>
<if test="newAvatar != null">new_avatar,</if>
<if test="nickName != null">nick_name,</if>
<if test="newNickName != null">new_nick_name,</if>
<if test="phone != null">phone,</if>
<if test="newPhone != null">new_phone,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="activityType != null and activityType != ''">#{activityType},</if> <if test="activityType != null and activityType != ''">#{activityType},</if>
<if test="uid != null">#{uid},</if> <if test="uid != null">#{uid},</if>
...@@ -59,7 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,7 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
</trim> <if test="avatar != null">#{avatar},</if>
<if test="newAvatar != null">#{newAvatar},</if>
<if test="nickName != null">#{nickName},</if>
<if test="newNickName != null">#{newNickName},</if>
<if test="phone != null">#{phone},</if>
<if test="newPhone != null">#{newPhone},</if>
</trim>
</insert> </insert>
<update id="updateSharingActivities" parameterType="SharingActivities"> <update id="updateSharingActivities" parameterType="SharingActivities">
...@@ -74,6 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -74,6 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="avatar != null">avatar = #{avatar},</if>
<if test="newAvatar != null">new_avatar = #{newAvatar},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="newNickName != null">new_nick_name = #{newNickName},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="newPhone != null">new_phone = #{newPhone},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
...@@ -83,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -83,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteSharingActivitiesByIds" parameterType="String"> <delete id="deleteSharingActivitiesByIds" parameterType="String">
delete from s_sharing_activities where id in delete from s_sharing_activities where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment