Merge remote-tracking branch 'origin/feature-20240104' into feature-20240104

master
elliott 2 years ago
commit bf379a1960

@ -4,7 +4,9 @@ import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
@ -45,6 +47,8 @@ public class CtLeaveMessage extends BaseEntity
/** 用户留言 */
@Excel(name = "用户留言")
@NotBlank(message = "留言反馈不能为空")
@Length(min = 1, max = 100)
private String messageInfo;
/** 查询开始时间 */
private Date beginTime;

@ -23,6 +23,11 @@ public class WxUserScriptLog extends BaseEntity {
*/
private Long wxUserId;
/**
* 01234567
*/
private Integer messageType;
/**
* 01
*/
@ -259,4 +264,12 @@ public class WxUserScriptLog extends BaseEntity {
public void setStatus(Integer status) {
this.status = status;
}
public Integer getMessageType() {
return messageType;
}
public void setMessageType(Integer messageType) {
this.messageType = messageType;
}
}

@ -0,0 +1,47 @@
package com.flossom.common.core.domain.ret;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flossom.common.core.annotation.Excel;
import com.flossom.common.core.domain.entity.WxUserMember;
import com.flossom.common.core.domain.entity.WxUserRemark;
import com.flossom.common.core.domain.entity.WxUserTag;
import com.flossom.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
*
*
* @author flossom
* @date 2023-12-08
*/
public class WxUserMemberRet extends WxUserMember {
/**
*
*/
private List<WxUserTag> miniProgramTags;
/**
*
*/
private List<WxUserTag> wecomTags;
public List<WxUserTag> getMiniProgramTags() {
return miniProgramTags;
}
public void setMiniProgramTags(List<WxUserTag> miniProgramTags) {
this.miniProgramTags = miniProgramTags;
}
public List<WxUserTag> getWecomTags() {
return wecomTags;
}
public void setWecomTags(List<WxUserTag> wecomTags) {
this.wecomTags = wecomTags;
}
}

@ -0,0 +1,35 @@
package com.flossom.common.core.enums;
/**
* wx_user_script_log
* <p>
* 01234567
*/
public enum WxUserIntegralMessageTypeEnum {
UNKNOWN(0, "未知"),
USER_REGISTRATION(1, "用户注册"),
BINDING_INSTRUMENTS(2, "绑定仪器"),
CLOCK_ACTIVITIES(3, "打卡活动"),
CARE_PLAN(4, "护理计划"),
QUESTIONNAIRE_ACTIVITY(5, "问卷活动"),
MEMBER_MANAGEMENT(6, "会员管理"),
MESSAGE_TEMPLATE(7, "消息模板");
private final Integer code;
private final String info;
WxUserIntegralMessageTypeEnum(Integer code, String info) {
this.code = code;
this.info = info;
}
public Integer getCode() {
return code;
}
public String getInfo() {
return info;
}
}

@ -81,5 +81,5 @@ public interface WxUserMemberMapper {
List<Integer> selectWxUserMemberIdList();
List<WxUserMember> selectWxUserMemberByMobile(@Param("mobile") String mobile);
}

@ -291,5 +291,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT id FROM `wx_user_member`
</select>
<select id="selectWxUserMemberByMobile" resultMap="WxUserMemberResult">
<include refid="selectWxUserMemberVo"/>
WHERE
mobile = #{mobile}
</select>
</mapper>

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="WxUserScriptLog" id="WxUserScriptLogResult">
<result property="id" column="id" />
<result property="wxUserId" column="wx_user_id" />
<result property="messageType" column="message_type" />
<result property="isRead" column="is_read" />
<result property="isCustom" column="is_custom" />
<result property="scriptTemplateId" column="script_template_id" />
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectWxUserScriptLogVo">
select id, wx_user_id, is_read, is_custom, script_template_id, script_name, titile, content, tag_type, type, link, link_params, redirect_appid, redirect_url, video_no, feed_id, tag_names, tag_ids, status, create_by, create_time from wx_user_script_log
select id, wx_user_id, message_type, is_read, is_custom, script_template_id, script_name, titile, content, tag_type, type, link, link_params, redirect_appid, redirect_url, video_no, feed_id, tag_names, tag_ids, status, create_by, create_time from wx_user_script_log
</sql>
<select id="selectWxUserScriptLogList" parameterType="WxUserScriptLog" resultMap="WxUserScriptLogResult">
@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="wxUserId != null "> and wx_user_id = #{wxUserId}</if>
<if test="isRead != null "> and is_read = #{isRead}</if>
<if test="messageType != null "> and message_type = #{messageType}</if>
<if test="isCustom != null "> and is_custom = #{isCustom}</if>
<if test="scriptTemplateId != null "> and script_template_id = #{scriptTemplateId}</if>
<if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wxUserId != null">wx_user_id,</if>
<if test="isRead != null">is_read,</if>
<if test="messageType != null">message_type,</if>
<if test="isCustom != null">is_custom,</if>
<if test="scriptTemplateId != null">script_template_id,</if>
<if test="scriptName != null">script_name,</if>
@ -88,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wxUserId != null">#{wxUserId},</if>
<if test="isRead != null">#{isRead},</if>
<if test="messageType != null">#{messageType},</if>
<if test="isCustom != null">#{isCustom},</if>
<if test="scriptTemplateId != null">#{scriptTemplateId},</if>
<if test="scriptName != null">#{scriptName},</if>
@ -113,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update wx_user_script_log
<trim prefix="SET" suffixOverrides=",">
<if test="wxUserId != null">wx_user_id = #{wxUserId},</if>
<if test="messageType != null">message_type = #{messageType},</if>
<if test="isRead != null">is_read = #{isRead},</if>
<if test="isCustom != null">is_custom = #{isCustom},</if>
<if test="scriptTemplateId != null">script_template_id = #{scriptTemplateId},</if>

@ -8,6 +8,7 @@ import com.flossom.common.log.enums.BusinessType;
import com.flossom.common.security.annotation.RequiresPermissions;
import com.flossom.miniProgram.service.ICtleaveMeassageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -26,7 +27,7 @@ public class CtleaveMessageApiController extends BaseController {
*/
@Log(title = "共创管理-留言管理", businessType = BusinessType.INSERT)
@PostMapping("/saveMessage")
public AjaxResult add(@RequestBody CtLeaveMessage ctLeaveMessage)
public AjaxResult add(@RequestBody @Validated CtLeaveMessage ctLeaveMessage)
{
return toAjax(ctleaveMeassageService.saveCtleaveMeassage(ctLeaveMessage));
}

@ -46,7 +46,7 @@ public class LoginUserVo {
* id
*/
@Excel(name = "省id")
private String provinceId;
private Long provinceId;
/**
*
@ -58,7 +58,7 @@ public class LoginUserVo {
* id
*/
@Excel(name = "市id")
private String cityId;
private Long cityId;
/**
*
@ -70,7 +70,7 @@ public class LoginUserVo {
* id
*/
@Excel(name = "区id")
private String areaId;
private Long areaId;
/**
*
@ -87,11 +87,16 @@ public class LoginUserVo {
private String token;
/**
*
*/
private String integralText;
public LoginUserVo() {
}
public LoginUserVo(Long id, String nickname, String headimg, String username, Integer credit, String mobile, String provinceId, String province, String cityId, String city, String areaId, String area, Date birthday, String token) {
public LoginUserVo(Long id, String nickname, String headimg, String username, Integer credit, String mobile, Long provinceId, String province, Long cityId, String city, Long areaId, String area, Date birthday, String token) {
this.id = id;
this.nickname = nickname;
this.headimg = headimg;
@ -156,11 +161,11 @@ public class LoginUserVo {
this.mobile = mobile;
}
public String getProvinceId() {
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(String provinceId) {
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
@ -172,11 +177,11 @@ public class LoginUserVo {
this.province = province;
}
public String getCityId() {
public Long getCityId() {
return cityId;
}
public void setCityId(String cityId) {
public void setCityId(Long cityId) {
this.cityId = cityId;
}
@ -188,11 +193,11 @@ public class LoginUserVo {
this.city = city;
}
public String getAreaId() {
public Long getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
@ -219,4 +224,12 @@ public class LoginUserVo {
public void setToken(String token) {
this.token = token;
}
public String getIntegralText() {
return integralText;
}
public void setIntegralText(String integralText) {
this.integralText = integralText;
}
}

@ -25,19 +25,37 @@ public class UserMemberUpdateVo {
*
*/
@NotNull(message = "请选择省")
private Integer provinceId;
private Long provinceId;
/**
*
*/
@NotNull(message = "请选择省")
private String province;
/**
*
*/
@NotNull(message = "请选择市")
private Long cityId;
/**
*
*/
@NotNull(message = "请选择市")
private Integer cityId;
private String city;
/**
*
*/
@NotNull(message = "请选择区")
private Integer areaId;
private Long areaId;
/**
*
*/
@NotNull(message = "请选择区")
private String area;
/**
*
@ -49,15 +67,6 @@ public class UserMemberUpdateVo {
public UserMemberUpdateVo() {
}
public UserMemberUpdateVo(String nickname, String headimg, Integer provinceId, Integer cityId, Integer areaId, Date birthday) {
this.nickname = nickname;
this.headimg = headimg;
this.provinceId = provinceId;
this.cityId = cityId;
this.areaId = areaId;
this.birthday = birthday;
}
public String getNickname() {
return nickname;
}
@ -74,27 +83,27 @@ public class UserMemberUpdateVo {
this.headimg = headimg;
}
public Integer getProvinceId() {
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
public Integer getCityId() {
public Long getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
public void setCityId(Long cityId) {
this.cityId = cityId;
}
public Integer getAreaId() {
public Long getAreaId() {
return areaId;
}
public void setAreaId(Integer areaId) {
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
@ -105,4 +114,28 @@ public class UserMemberUpdateVo {
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
}

@ -21,7 +21,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@ -108,7 +111,16 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
logger.error("获取用户手机号码失败: {}", wxCode2PhoneRet.getErrmsg());
throw new ServiceException("获取用户手机号码失败");
}
// 查询号码是否存在
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberByMobile(wxCode2PhoneRet.getPhoneInfo().getPhoneNumber());
if (wxUserMembers.size() > 0) {
throw new ServiceException("手机号码已注册!");
}
wxUserMemberMapper.upgradeMember(wxCode2PhoneRet.getPhoneInfo().getPhoneNumber(), SecurityUtils.getLoginUser().getWxUserMember().getId().intValue());
/**
* TODO:
*/
return wxCode2PhoneRet.getPhoneInfo().getPhoneNumber();
}
@ -116,18 +128,26 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
public LoginUserVo updateUser(UserMemberUpdateVo userMemberUpdateVo) {
// 完善用户信息, 判断是否标记完善信息
WxUserMember wxUserMember = wxUserMemberMapper.selectWxUserMemberByOpenId(SecurityUtils.getLoginUser().getWxUserMember().getOpenid());
Boolean isCompleteInformation = false;
if (wxUserMember.getIsCompleteInformation() == null || wxUserMember.getIsCompleteInformation() == 0) {
isCompleteInformation = true;
// 修改完善状态
wxUserMember.setIsCompleteInformation(1);
// TODO 首次完善,增加加分 (未完成)
}
BeanUtils.copyProperties(userMemberUpdateVo, wxUserMember);
wxUserMember.setUpdateTime(DateUtils.getNowDate());
wxUserMemberMapper.updateWxUserMember(wxUserMember);
WxUserMember update = new WxUserMember();
BeanUtils.copyProperties(userMemberUpdateVo, update);
update.setUpdateTime(DateUtils.getNowDate());
wxUserMemberMapper.updateWxUserMember(update);
// 刷新用户信息
return refreshWxUserInfo();
LoginUserVo loginUserVo = refreshWxUserInfo();
if (isCompleteInformation) {
// TODO查询积分列表
loginUserVo.setIntegralText("您已完善个人信息获得XX积分");
}
return loginUserVo;
}
/**
@ -136,6 +156,7 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
* @return
*/
@Override
@Transactional(propagation = Propagation.SUPPORTS)
public LoginUserVo refreshWxUserInfo() {
// 1、获取用户最新信息
String openid = SecurityUtils.getLoginUser().getWxUserMember().getOpenid();

@ -8,6 +8,7 @@ import com.flossom.common.core.domain.req.AllChangIntegralOperateReq;
import com.flossom.common.core.domain.req.WxUserIntegralVm;
import com.flossom.common.core.domain.req.WxUserMemberReq;
import com.flossom.common.core.domain.req.WxUserMemberVm;
import com.flossom.common.core.domain.ret.WxUserMemberRet;
import com.flossom.common.core.enums.IntegralChangeTypeEnum;
import com.flossom.common.core.exception.ServiceException;
import com.flossom.common.core.utils.StringUtils;
@ -49,6 +50,16 @@ public class WxUserMemberController extends BaseController {
return getDataTable(list);
}
/**
*
*/
@GetMapping("/listRet")
public TableDataInfo listRet(WxUserMemberVm wxUserMemberVm) {
startPage();
List<WxUserMemberRet> list = wxUserMemberService.selectWxUserMemberRetList(wxUserMemberVm);
return getDataTable(list);
}
/**
*
*/

@ -5,6 +5,7 @@ import com.flossom.common.core.domain.entity.WxUserMember;
import com.flossom.common.core.domain.req.WxUserIntegralVm;
import com.flossom.common.core.domain.req.WxUserMemberReq;
import com.flossom.common.core.domain.req.WxUserMemberVm;
import com.flossom.common.core.domain.ret.WxUserMemberRet;
import com.flossom.common.core.domain.vo.WxUserMemberVo;
import java.util.List;
@ -84,4 +85,6 @@ public interface IWxUserMemberService
void openOrCloseClock(Long id);
void openOrCloseActivity(Long id);
List<WxUserMemberRet> selectWxUserMemberRetList(WxUserMemberVm wxUserMemberVm);
}

@ -9,6 +9,7 @@ import com.flossom.common.core.domain.entity.*;
import com.flossom.common.core.domain.req.WxUserIntegralVm;
import com.flossom.common.core.domain.req.WxUserMemberReq;
import com.flossom.common.core.domain.req.WxUserMemberVm;
import com.flossom.common.core.domain.ret.WxUserMemberRet;
import com.flossom.common.core.domain.vo.WxUserMemberVo;
import com.flossom.common.core.enums.IntegralChangeTypeEnum;
import com.flossom.common.core.enums.Status;
@ -133,7 +134,7 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
/**
*
*
* @param WxUserMemberReq
* @param
* @return
*/
@Override
@ -351,4 +352,25 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService {
}
wxUserMemberMapper.updateWxUserMember(update);
}
@Override
public List<WxUserMemberRet> selectWxUserMemberRetList(WxUserMemberVm wxUserMemberVm) {
List<WxUserMemberRet> list = new ArrayList<>();
List<WxUserMember> wxUserMembers = wxUserMemberMapper.selectWxUserMemberListByVm(wxUserMemberVm);
if (wxUserMembers != null && wxUserMembers.size() > 0) {
WxUserMemberRet wxUserMemberRet;
for (WxUserMember wxUserMember : wxUserMembers) {
wxUserMemberRet = new WxUserMemberRet();
BeanUtils.copyProperties(wxUserMember, wxUserMemberRet);
WxUserTag wxUserTag = new WxUserTag();
wxUserTag.setUserId(wxUserMember.getId());
wxUserTag.setType(TagTypeStatus.MINI_PROGRAM.getCode());
wxUserMemberRet.setMiniProgramTags(wxUserTagMapper.selectWxUserTagList(wxUserTag));
wxUserTag.setType(TagTypeStatus.ENTERPRISE_WECHAT.getCode());
wxUserMemberRet.setWecomTags(wxUserTagMapper.selectWxUserTagList(wxUserTag));
list.add(wxUserMemberRet);
}
}
return list;
}
}

@ -8,6 +8,7 @@ import com.flossom.common.core.domain.entity.SysTag;
import com.flossom.common.core.domain.entity.WxScriptTemplate;
import com.flossom.common.core.domain.entity.WxUserScriptLog;
import com.flossom.common.core.domain.req.WxUserScriptReq;
import com.flossom.common.core.enums.WxUserIntegralMessageTypeEnum;
import com.flossom.common.core.mapper.*;
import com.flossom.common.core.utils.DateUtils;
import com.flossom.common.core.utils.StringUtils;
@ -114,6 +115,7 @@ public class WxUserScriptLogServiceImpl implements IWxUserScriptLogService {
if (wxUserScriptReq.getTagIds() != null && wxUserScriptReq.getTagIds().size() > 0) {
wxUserScriptLog.setTagIds(wxUserScriptReq.getTagIds().stream().collect(Collectors.joining(",")));
}
wxUserScriptLog.setMessageType(WxUserIntegralMessageTypeEnum.MEMBER_MANAGEMENT.getCode());
wxUserScriptLog.setWxUserId(wxUserId);
wxUserScriptLog.setCreateBy(SecurityUtils.getUsername());
wxUserScriptLog.setCreateTime(DateUtils.getNowDate());

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询用户列表
export function listMember(query) {
return request({
url: '/system/member/list',
url: '/system/member/listRet',
method: 'get',
params: query
})
@ -249,3 +249,30 @@ export function openOrCloseActivity(id) {
method: 'get'
})
}
// 分页获取消息列表
export function uObtainUserScriptLog(data) {
return request({
url: '/system/userScriptLog/list',
method: 'get',
params: data
})
}
// 删除用户的消息列表
export function delUserScriptLog(data) {
return request({
url: '/system/userScriptLog',
method: 'put',
data: data
})
}
// 获取用户积分列表
export function obtainUserIntegralLog(data) {
return request({
url: '/system/integralLog/list',
method: 'get',
params: data
})
}

@ -197,19 +197,35 @@
<el-table-column label="用户编号" align="center" prop="id"/>
<el-table-column label="手机号码" align="center" prop="mobile" width="120px"/>
<el-table-column label="生日" align="center" prop="birthday" width="120px"/>
<el-table-column label="省" align="center" prop="province"/>
<el-table-column label="市" align="center" prop="city"/>
<el-table-column label="区" align="center" prop="area"/>
<el-table-column label="地区" align="center" prop="province" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span><br/>
<span>{{ scope.row.city }}</span><br/>
<span>{{ scope.row.area }}</span>
</template>
</el-table-column>
<el-table-column label="信息完善" align="center" prop="isCompleteInformation">
<template slot-scope="scope">
<span v-show="scope.row.isCompleteInformation == 0"></span>
<span v-show="scope.row.isCompleteInformation == 1"></span>
<span style="color: red" v-show="scope.row.isCompleteInformation == 0"></span>
<span v-show="scope.row.isCompleteInformation == 1"></span>
</template>
</el-table-column>
<el-table-column label="用户注册时间" align="center" prop="createTime" width="200px"/>
<el-table-column label="仪器数量" align="center" prop="devicesNum"/>
<el-table-column label="小程序标签" align="center" prop=""/>
<el-table-column label="企微标签" align="center" prop=""/>
<el-table-column label="小程序标签" align="center" prop="miniProgramTags" width="150px">
<template slot-scope="scope">
<el-tag v-for="item in scope.row.miniProgramTags" :key="item.id">
{{ item.tagName }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="企微标签" align="center" prop="wecomTags" width="150px">
<template slot-scope="scope">
<el-tag v-for="item in scope.row.wecomTags" :key="item.id">
{{ item.tagName }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="是否对接" align="center" prop="is_abutment">
<template slot-scope="scope">
<span v-show="scope.row.isAbutment == 1"></span>
@ -217,7 +233,13 @@
<span v-show="scope.row.isAbutment == 3"></span>
</template>
</el-table-column>
<el-table-column label="积分" align="center" prop="credit"/>
<el-table-column label="积分" align="center" prop="credit">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="viewUserIntegralDetail(scope.row)">
{{ scope.row.credit }}
</el-button>
</template>
</el-table-column>
<el-table-column label="即将过期积分" align="center" prop=""/>
<el-table-column label="用户类型" align="center" prop="userType">
<template slot-scope="scope">
@ -235,7 +257,11 @@
</template>
</el-table-column>
<el-table-column label="消息列表" align="center" prop="">
<span>查看详情</span>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="viewMessageDetail(scope.row)">
查看详情
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -541,6 +567,81 @@
<el-button @click="cancelscriptDialog"> </el-button>
</div>
</el-dialog>
<!-- 查看用户消息列表 -->
<el-dialog title="消息记录" :visible.sync="userScriptLogVisible" width="90%"
:before-close="cancelUserScriptLogDialog">
<template>
<el-table :data="userScriptLogQuery.userScriptList" :stripe="true" style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column prop="messageType" label="消息类型" width="100px">
<template slot-scope="scope">
<span v-show="scope.row.messageType == 0"></span>
<span v-show="scope.row.messageType == 1"></span>
<span v-show="scope.row.messageType == 2"></span>
<span v-show="scope.row.messageType == 3"></span>
<span v-show="scope.row.messageType == 4"></span>
<span v-show="scope.row.messageType == 5"></span>
<span v-show="scope.row.messageType == 6"></span>
<span v-show="scope.row.messageType == 7"></span>
</template>
</el-table-column>
<el-table-column prop="titile" label="标题" width="200"></el-table-column>
<el-table-column prop="content" label="内容"></el-table-column>
<el-table-column prop="isRead" label="状态" width="100">
<template slot-scope="scope">
<span v-show="scope.row.isRead == 0"></span>
<span v-show="scope.row.isRead == 1"></span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="发送时间" width="200"></el-table-column>
<el-table-column prop="status" label="操作" width="100">
<template slot-scope="scope">
<el-button v-show="scope.row.status == 0" size="mini" type="text" @click="delUserScriptLog(scope.row)">
撤销
</el-button>
<el-button v-show="scope.row.status == 1" size="mini" type="text" disabled>已撤销</el-button>
</template>
</el-table-column>
</el-table>
</template>
<pagination
v-show="userScriptLogQuery.total>0"
:total="userScriptLogQuery.total"
:page.sync="userScriptLogQuery.pageNum"
:limit.sync="userScriptLogQuery.pageSize"
@pagination="getUserScriptLogList"
/>
</el-dialog>
<!-- 查看用户积分列表 -->
<el-dialog title="积分记录" :visible.sync="userIntegralLogVisible" width="90%"
:before-close="cancelUserIntegralLogDialog">
<template>
<el-table :data="userIntegralLogQuery.userIntegralLogList" @sort-change="userIntegralSortChang"
:default-sort="{prop: 'createTime', order: 'desc'}" :stripe="true" style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<el-table-column prop="source" label="类型" width="100px">
<template slot-scope="scope">
<span v-show="scope.row.source == 0"></span>
<span v-show="scope.row.source == 1"></span>
</template>
</el-table-column>
<el-table-column prop="floatScore" label="变动积分"
:sortable="'custom'" width="100"></el-table-column>
<el-table-column prop="soureId" label="来源ID" width="100"></el-table-column>
<el-table-column prop="remarkContent" label="说明"></el-table-column>
<el-table-column prop="createTime" :sortable="'custom'" label="操作时间" width="200"></el-table-column>
</el-table>
</template>
<pagination
v-show="userIntegralLogQuery.total>0"
:total="userIntegralLogQuery.total"
:page.sync="userIntegralLogQuery.pageNum"
:limit.sync="userIntegralLogQuery.pageSize"
@pagination="getUserIntegralLogList"
/>
</el-dialog>
</div>
</template>
@ -569,7 +670,7 @@ import {
getMiniProgramTagsTree,
scriptTreeSelect,
editRemark, delRemark,
openOrCloseClock, openOrCloseActivity,
openOrCloseClock, openOrCloseActivity, uObtainUserScriptLog, delUserScriptLog, obtainUserIntegralLog,
} from "@/api/system/member";
import Treeselect from "@riophae/vue-treeselect";
import {tagTreeSelect} from "@/api/system/wechatTab";
@ -580,6 +681,23 @@ export default {
components: {Treeselect},
data() {
return {
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
//
loading: true,
//
@ -671,6 +789,28 @@ export default {
//
scriptContent: null,
},
//
userScriptLogVisible: false,
userScriptLogQuery: {
total: 0,
pageNum: 1,
pageSize: 10,
wxUserId: null,
userScriptList: null,
orderByColumn: "createTime",
isAsc: "desc"
},
//
userIntegralLogVisible: false,
userIntegralLogQuery: {
total: 0,
pageNum: 1,
pageSize: 10,
userIntegralLogList: null,
userId: null,
orderByColumn: "createTime",
isAsc: "desc"
},
//
queryParams: {
pageNum: 1,
@ -822,9 +962,25 @@ export default {
this.batchRemarkVisible = false;
}
},
cancelUserScriptLogDialog() {
this.userScriptLogVisible = false;
this.userScriptLogQuery.total = 0;
this.userScriptLogQuery.pageNum = 1;
this.userScriptLogQuery.pageSize = 10;
this.userScriptLogQuery.wxUserId = null;
this.userScriptLogQuery.userScriptList = null;
},
cancelUserIntegralLogDialog() {
this.userIntegralLogVisible = false;
this.userIntegralLogQuery.total = 0
this.userIntegralLogQuery.pageNum = 1;
this.userIntegralLogQuery.pageSize = 10;
this.userIntegralLogQuery.userId = null;
this.userIntegralLogQuery.userIntegralLogList = null;
},
cancelscriptDialog(isclose) {
this.scriptForm.isCustom = null,
this.scriptForm.scriptName = null;
this.scriptForm.isCustom = null;
this.scriptForm.scriptName = null;
this.scriptForm.titile = null;
this.scriptForm.content = null;
this.scriptForm.tagType = null;
@ -1320,6 +1476,48 @@ export default {
this.download('system/member/export', {
...this.queryParams
}, `member_${new Date().getTime()}.xlsx`)
},
//
viewMessageDetail(row) {
this.userScriptLogQuery.wxUserId = row.id;
this.getUserScriptLogList();
this.userScriptLogVisible = true;
},
//
getUserScriptLogList() {
uObtainUserScriptLog(this.userScriptLogQuery).then(response => {
this.userScriptLogQuery.userScriptList = response.rows;
this.userScriptLogQuery.total = response.total;
});
},
//
delUserScriptLog(row) {
let wxUserScriptLog = {
id: row.id,
status: row.status == 0 ? 1 : 0,
}
delUserScriptLog(wxUserScriptLog).then(Response => {
row.status = wxUserScriptLog.status;
this.$modal.msgSuccess("撤销成功");
})
},
//
viewUserIntegralDetail(row) {
this.userIntegralLogQuery.userId = row.id;
this.getUserIntegralLogList();
this.userIntegralLogVisible = true;
},
//
getUserIntegralLogList() {
obtainUserIntegralLog(this.userIntegralLogQuery).then(Response => {
this.userIntegralLogQuery.userIntegralLogList = Response.rows;
this.userIntegralLogQuery.total = Response.total;
})
},
userIntegralSortChang({column, prop}) {
this.userIntegralLogQuery.orderByColumn = prop;
this.userIntegralLogQuery.isAsc = column.order == 'ascending' ? 'asc' : 'desc';
this.getUserIntegralLogList();
}
}
}

Loading…
Cancel
Save