25个文件已修改
1个文件已删除
14个文件已添加
| | |
| | | @ApiModelProperty(value = "店铺地址区code") |
| | | private String shopAreaCode; |
| | | |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String shopName; |
| | | } |
| | |
| | | package com.ruoyi.common.core.utils; |
| | | |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | |
| | | import java.lang.management.ManagementFactory; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.ZoneId; |
| | | import java.time.ZonedDateTime; |
| | | import java.time.*; |
| | | import java.util.Date; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | |
| | | /** |
| | | * 时间工具类 |
| | |
| | | "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", |
| | | "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(getNowDate()); |
| | | public static void main(String[] args) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date start = sdf.parse("2021-10-01 10:00:00"); |
| | | Date end = sdf.parse("2021-10-01 12:30:00"); |
| | | String time = formatDuration(start,end); |
| | | System.out.println(time); |
| | | } |
| | | |
| | | /** |
| | |
| | | ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); |
| | | return Date.from(zdt.toInstant()); |
| | | } |
| | | |
| | | public static String formatDuration(Date start, Date end) { |
| | | long duration = end.getTime() - start.getTime(); |
| | | long days = duration / (24 * 60 * 60 * 1000); |
| | | long hours = (duration % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000); |
| | | long minutes = (duration % (60 * 60 * 1000)) / (60 * 1000); |
| | | long seconds = (duration % (60 * 1000)) / 1000; |
| | | StringBuilder sb = new StringBuilder(); |
| | | if (days > 0) { |
| | | sb.append(days).append("天"); |
| | | } |
| | | if (hours > 0) { |
| | | sb.append(hours).append("小时"); |
| | | } |
| | | if (minutes > 0) { |
| | | sb.append(minutes).append("分"); |
| | | } |
| | | if (seconds > 0) { |
| | | sb.append(seconds).append("秒"); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | @RequestMapping(value = "/pageMgtMemberSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取用户建议") |
| | | @ApiOperation(value = "平台获取用户建议列表") |
| | | public R<Page<MgtMemberSuggestPageVo>> pageMgtMemberSuggest(@RequestBody MgtMemberSuggestPageDto memberSuggestPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | memberSuggestPageDto.setUserId(userId); |
| | |
| | | return R.ok(page.setRecords(mgtMemberSuggestPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtReplayMemberSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台回复会员建议") |
| | | public R mgtReplayMemberSuggest(@RequestBody MgtReplayMemberSuggestDto mgtReplayMemberSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtReplayMemberSuggestDto.setUserId(userId); |
| | | memberSuggestService.mgtReplayMemberSuggest(mgtReplayMemberSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/listMgtMemberSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取会员建议标签") |
| | | public R<List<MgtMemberSuggestTagVo>> listMgtMemberSuggestTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | List<MgtMemberSuggestTagVo> mgtMemberSuggestTagVoList = memberSuggestService.listMgtMemberSuggestTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(mgtMemberSuggestTagVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtEditMemberSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台编辑会员建议标签") |
| | | public R mgtEditMemberSuggestTag(@RequestBody MgtTagMemberSuggestDto mgtTagMemberSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtTagMemberSuggestDto.setUserId(userId); |
| | | memberSuggestService.mgtEditMemberSuggestTag(mgtTagMemberSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/userSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "发起建议") |
| | | @ApiOperation(value = "用户发起建议") |
| | | public R userSuggest(@RequestBody AppUserSuggestDto appUserSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | appUserSuggestDto.setUserId(userId); |
| | |
| | | @ApiModelProperty(value = "提交结束时间") |
| | | private Date createEndTime; |
| | | |
| | | @ApiModelProperty(value = "建议状态1未回复2已回复") |
| | | @ApiModelProperty(value = "建议状态0未回复1已回复") |
| | | private Integer suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "性别0男1女") |
New file |
| | |
| | | package com.ruoyi.member.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtReplayMemberSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:04 |
| | | */ |
| | | @Data |
| | | public class MgtReplayMemberSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "平台回复内容") |
| | | private String replayContent; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtTagMemberSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:26 |
| | | */ |
| | | @Data |
| | | public class MgtTagMemberSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "标签 多个,隔开") |
| | | private String suggestTags; |
| | | } |
| | |
| | | */ |
| | | @TableField("replay_time") |
| | | private Date replayTime; |
| | | |
| | | @TableField("response_time") |
| | | private String responseTime; |
| | | /** |
| | | * 商户id |
| | | */ |
| | |
| | | @TableField("shop_replay_time") |
| | | private Date shopReplayTime; |
| | | |
| | | @TableField("shop_response_time") |
| | | private String shopResponseTime; |
| | | |
| | | /** |
| | | * 回复标记 |
| | | */ |
| | | @TableField("replay_flag") |
| | | private Integer replayFlag; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "回复人姓名") |
| | | private String replayUserName; |
| | | |
| | | @ApiModelProperty(value = "回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date replayTime; |
| | | |
| | | @ApiModelProperty(value = "平台响应时间") |
| | |
| | | private String shopReplayUserName; |
| | | |
| | | @ApiModelProperty(value = "商户回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date shopReplayTime; |
| | | |
| | | @ApiModelProperty(value = "商户响应时间") |
New file |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MgtShopTagVo |
| | | * @description: TODO |
| | | * @date 2023年04月21日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MgtMemberSuggestTagVo { |
| | | |
| | | @ApiModelProperty(value = "标签id") |
| | | private Long tagId; |
| | | |
| | | @ApiModelProperty(value = "标签名称") |
| | | private String tagName; |
| | | |
| | | @ApiModelProperty(value = "是否选择0否1是") |
| | | private Integer selectFlag; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.member.domain.dto.MgtMemberSuggestPageDto; |
| | | import com.ruoyi.member.domain.dto.MgtReplayMemberSuggestDto; |
| | | import com.ruoyi.member.domain.dto.MgtTagMemberSuggestDto; |
| | | import com.ruoyi.member.domain.pojo.member.MemberSuggest; |
| | | import com.ruoyi.member.domain.vo.AppSuggestPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestTagVo; |
| | | import com.ruoyi.member.mapper.member.MemberSuggestMapper; |
| | | import com.ruoyi.member.service.member.MemberSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.AppSuggestPageDto; |
| | | import com.ruoyi.system.api.domain.dto.AppUserSuggestDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.MgtShopIdByCodeVo; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import com.ruoyi.system.api.service.RemoteUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | @Resource |
| | | private RemoteUserService remoteUserService; |
| | | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | /** |
| | | * |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 用户建议 |
| | | * @param appUserSuggestDto |
| | | */ |
| | | @Override |
| | |
| | | memberSuggest.setSuggestContent(appUserSuggestDto.getSuggestContent()); |
| | | memberSuggest.setCreateTime(new Date()); |
| | | memberSuggest.setSuggestType(appUserSuggestDto.getSuggestType()); |
| | | memberSuggest.setReplayFlag(0); |
| | | this.saveOrUpdate(memberSuggest); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public List<MgtMemberSuggestPageVo> pageMgtMemberSuggest(Page page,MgtMemberSuggestPageDto memberSuggestPageDto){ |
| | | //如果区域代码不为null获取对应的商户id |
| | | if(StringUtils.isNotBlank(memberSuggestPageDto.getShopProvinceCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopCityCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopAreaCode())){ |
| | | if(StringUtils.isNotBlank(memberSuggestPageDto.getKeyword())||StringUtils.isNotBlank(memberSuggestPageDto.getShopProvinceCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopCityCode())||StringUtils.isNotBlank(memberSuggestPageDto.getShopAreaCode())){ |
| | | MgtShopIdByCodeDto mgtShopIdByCodeDto = new MgtShopIdByCodeDto(); |
| | | mgtShopIdByCodeDto.setShopName(memberSuggestPageDto.getKeyword()); |
| | | mgtShopIdByCodeDto.setShopProvinceCode(memberSuggestPageDto.getShopProvinceCode()); |
| | | mgtShopIdByCodeDto.setShopCityCode(memberSuggestPageDto.getShopCityCode()); |
| | | mgtShopIdByCodeDto.setShopAreaCode(memberSuggestPageDto.getShopAreaCode()); |
| | |
| | | memberSuggestPageDto.setShopIds(mgtShopIdByCodeVo.getShopIds()); |
| | | } |
| | | } |
| | | //处理标签为正则方便sql判断 |
| | | if(StringUtils.isNotBlank(memberSuggestPageDto.getTags())){ |
| | | memberSuggestPageDto.setTags(memberSuggestPageDto.getTags().replace(",","|")); |
| | | } |
| | | if(memberSuggestPageDto.getSuggestStatus()!=null&&memberSuggestPageDto.getSuggestStatus()!=1){ |
| | | memberSuggestPageDto.setSuggestStatus(0); |
| | | } |
| | | //获取返回结果 |
| | | List<MgtMemberSuggestPageVo> mgtMemberSuggestPageVoList = memberSuggestMapper.pageMgtMemberSuggest(page, memberSuggestPageDto); |
| | | return mgtMemberSuggestPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayMemberSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:03 |
| | | */ |
| | | @Override |
| | | public void mgtReplayMemberSuggest(MgtReplayMemberSuggestDto mgtReplayMemberSuggestDto){ |
| | | Long userId = mgtReplayMemberSuggestDto.getUserId(); |
| | | SysUser sysUser = remoteUserService.getSysUser(userId).getData(); |
| | | MemberSuggest memberSuggest = this.getById(mgtReplayMemberSuggestDto.getSuggestId()); |
| | | memberSuggest.setReplayContent(mgtReplayMemberSuggestDto.getReplayContent()); |
| | | memberSuggest.setReplayTime(new Date()); |
| | | memberSuggest.setReplayUserId(userId); |
| | | memberSuggest.setReplayUserName(sysUser.getNickName()); |
| | | memberSuggest.setReplayFlag(1); |
| | | String responseTime = DateUtils.formatDuration(memberSuggest.getCreateTime(), memberSuggest.getReplayTime()); |
| | | memberSuggest.setResponseTime(responseTime); |
| | | this.saveOrUpdate(memberSuggest); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取建议标签列表 |
| | | * @param suggestId |
| | | * @return List<MgtMemberSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:12 |
| | | */ |
| | | @Override |
| | | public List<MgtMemberSuggestTagVo> listMgtMemberSuggestTag(Long suggestId){ |
| | | MemberSuggest memberSuggest = this.getById(suggestId); |
| | | String suggestTags = memberSuggest.getSuggestTags(); |
| | | Long[] tagIdLongArr = null; |
| | | if(StringUtils.isNotBlank(suggestTags)){ |
| | | String[] tagIdArr = suggestTags.split(","); |
| | | tagIdLongArr = new Long[tagIdArr.length]; |
| | | for (int i = 0; i < tagIdArr.length; i++) { |
| | | try { |
| | | tagIdLongArr[i] = Long.parseLong(tagIdArr[i]); |
| | | } catch (NumberFormatException e) { |
| | | tagIdLongArr[i] = null; |
| | | } |
| | | } |
| | | } |
| | | List<SysTag> sysTagsList = remoteConfigService.listSysTag(4).getData(); |
| | | //生成返回结果 |
| | | List<MgtMemberSuggestTagVo> mgtMemberSuggestTagVoList = new ArrayList<>(); |
| | | for(SysTag sysTag : sysTagsList){ |
| | | MgtMemberSuggestTagVo mgtMemberSuggestTagVo = new MgtMemberSuggestTagVo(); |
| | | mgtMemberSuggestTagVo.setTagId(sysTag.getTagId()); |
| | | mgtMemberSuggestTagVo.setTagName(sysTag.getTagName()); |
| | | //判断是否选择 |
| | | if(tagIdLongArr!=null && tagIdLongArr.length>0){ |
| | | for(Long tagId : tagIdLongArr){ |
| | | if(tagId!=null && tagId.equals(sysTag.getTagId())){ |
| | | mgtMemberSuggestTagVo.setSelectFlag(1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | mgtMemberSuggestTagVoList.add(mgtMemberSuggestTagVo); |
| | | } |
| | | return mgtMemberSuggestTagVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagMemberSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:28 |
| | | */ |
| | | @Override |
| | | public void mgtEditMemberSuggestTag(MgtTagMemberSuggestDto mgtTagMemberSuggestDto){ |
| | | MemberSuggest memberSuggest = this.getById(mgtTagMemberSuggestDto.getSuggestId()); |
| | | memberSuggest.setSuggestTags(mgtTagMemberSuggestDto.getSuggestTags()); |
| | | this.saveOrUpdate(memberSuggest); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.member.domain.dto.MgtMemberSuggestPageDto; |
| | | import com.ruoyi.member.domain.dto.MgtReplayMemberSuggestDto; |
| | | import com.ruoyi.member.domain.dto.MgtTagMemberSuggestDto; |
| | | import com.ruoyi.member.domain.pojo.member.MemberSuggest; |
| | | import com.ruoyi.member.domain.vo.AppSuggestPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestTagVo; |
| | | import com.ruoyi.system.api.domain.dto.AppSuggestPageDto; |
| | | import com.ruoyi.system.api.domain.dto.AppUserSuggestDto; |
| | | |
| | |
| | | List<AppSuggestPageVo> pageAppUserSuggest(Page page, AppSuggestPageDto appSuggestPageDto); |
| | | |
| | | /** |
| | | * |
| | | * 用户建议 |
| | | * @param appUserSuggestDto |
| | | */ |
| | | void userSuggest(AppUserSuggestDto appUserSuggestDto); |
| | |
| | | * @return List<MgtMemberSuggestPageVo> |
| | | */ |
| | | List<MgtMemberSuggestPageVo> pageMgtMemberSuggest(Page page, MgtMemberSuggestPageDto memberSuggestPageDto); |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayMemberSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:04 |
| | | */ |
| | | void mgtReplayMemberSuggest(MgtReplayMemberSuggestDto mgtReplayMemberSuggestDto); |
| | | |
| | | /** |
| | | * @description 获取建议标签列表 |
| | | * @param suggestId |
| | | * @return List<MgtMemberSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:12 |
| | | */ |
| | | List<MgtMemberSuggestTagVo> listMgtMemberSuggestTag(Long suggestId); |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagMemberSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:28 |
| | | */ |
| | | void mgtEditMemberSuggestTag(MgtTagMemberSuggestDto mgtTagMemberSuggestDto); |
| | | } |
| | |
| | | tms.suggest_content suggestContent, |
| | | tms.replay_content replayContent, |
| | | tms.shop_replay_content shopReplayContent, |
| | | CASE WHEN replay_content IS NOT NULL THEN "已回复" WHEN shop_replay_content IS NOT NULL THEN "已回复" ELSE "未回复" END suggestStatus, |
| | | CASE tms.replay_flag WHEN 1 THEN "已回复" ELSE "未回复" END suggestStatus, |
| | | tms.create_time createTime, |
| | | tms.replay_user_name replayUserName, |
| | | tms.replay_time replayTime, |
| | | tms.response_time responseTime, |
| | | tms.shop_replay_user_name shopReplayUserName, |
| | | tms.shop_replay_time shopReplayTime, |
| | | tms.shop_response_time shopResponseTime, |
| | | tms.suggest_tags suggestTags |
| | | FROM |
| | | t_member_suggest tms |
| | | INNER JOIN t_member tm ON tms.create_user_id = tm.user_id |
| | | WHERE del_flag = 0 |
| | | <if test="param.keyword!=null and param.keyword !=''"> |
| | | |
| | | AND (tm.real_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.nick_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.mobile LIKE CONCAT('%',#{param.keyword},'%') OR tms.replay_user_name LIKE CONCAT('%',#{param.keyword},'%') OR tms.shop_replay_user_name LIKE CONCAT('%',#{param.keyword},'%')) |
| | | </if> |
| | | <if test="param.createStartTime!=null and param.createStartTime!=''"> |
| | | AND tms.create_time >= #{param.createStartTime} |
| | | </if> |
| | | <if test="param.createEndTime!=null and param.createEndTime!=''"> |
| | | AND tms.create_time <= #{param.createEndTime} |
| | | </if> |
| | | <if test="param.suggestStatus!=null and param.suggestStatus!=''"> |
| | | AND tms.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.gender!=null and param.gender!=''"> |
| | | AND tm.gender = #{param.gender} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.shopReplayStartTime!=null and param.shopReplayStartTime!=''"> |
| | | AND tms.shop_replay_time >= #{param.shopReplayStartTime} |
| | | </if> |
| | | <if test="param.shopReplayEndTime!=null and param.shopReplayEndTime!=''"> |
| | | AND tms.shop_replay_time <= #{param.shopReplayEndTime} |
| | | </if> |
| | | <if test="param.replayStartTime!=null and param.replayStartTime!=''"> |
| | | AND tms.replay_time >= #{param.replayStartTime} |
| | | </if> |
| | | <if test="param.replayEndTime!=null and param.replayEndTime!=''"> |
| | | AND tms.replay_time <= #{param.replayEndTime} |
| | | </if> |
| | | <if test="param.suggestType!=null and param.suggestType!=''"> |
| | | AND tms.suggest_type = #{param.suggestType} |
| | | </if> |
| | | <if test="param.shopIds!=null and param.shopIds!=''"> |
| | | AND tms.shop_id IN CONCAT('(',#{param.shopIds},')') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopProportionPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopTagVo; |
| | | import com.ruoyi.shop.domain.vo.*; |
| | | import com.ruoyi.shop.service.shop.ShopProportionService; |
| | | import com.ruoyi.shop.service.shop.ShopRelTagService; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.shop.service.shop.ShopSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | @Resource |
| | | private ShopProportionService shopProportionService; |
| | | |
| | | @Resource |
| | | private ShopSuggestService shopSuggestService; |
| | | |
| | | @RequestMapping(value = "/pageMgtShop", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户列表") |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageMgtShopSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取商户建议列表") |
| | | public R<Page<MgtShopSuggestPageVo>> pageMgtShopSuggest(@RequestBody MgtShopSuggestPageDto mgtShopSuggestPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtShopSuggestPageDto.setUserId(userId); |
| | | Page<MgtShopSuggestPageVo> page = new Page<>(); |
| | | page.setSize(mgtShopSuggestPageDto.getPageSize()); |
| | | page.setCurrent(mgtShopSuggestPageDto.getPageNum()); |
| | | List<MgtShopSuggestPageVo> mgtShopSuggestPageVoList = shopSuggestService.pageMgtShopSuggest(page,mgtShopSuggestPageDto); |
| | | return R.ok(page.setRecords(mgtShopSuggestPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtReplayShopSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台回复会员建议") |
| | | public R mgtReplayShopSuggest(@RequestBody MgtReplayShopSuggestDto mgtReplayShopSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtReplayShopSuggestDto.setUserId(userId); |
| | | shopSuggestService.mgtReplayShopSuggest(mgtReplayShopSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listMgtShopSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取商户建议标签") |
| | | public R<List<MgtShopSuggestTagVo>> listMgtShopSuggestTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | List<MgtShopSuggestTagVo> mgtShopSuggestTagVoList = shopSuggestService.listMgtShopSuggestTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(mgtShopSuggestTagVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtEditShopSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台编辑会员建议标签") |
| | | public R mgtEditShopSuggestTag(@RequestBody MgtTagShopSuggestDto mgtTagShopSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtTagShopSuggestDto.setUserId(userId); |
| | | shopSuggestService.mgtEditShopSuggestTag(mgtTagShopSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.dto.MgtFollowShopTaskDto; |
| | | import com.ruoyi.shop.domain.dto.MgtMemberTaskPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopTaskPageDto; |
| | | import com.ruoyi.shop.domain.vo.MgtAgencyTaskRecordPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtMemberFollowPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopTaskRecordPageVo; |
| | | import com.ruoyi.shop.service.task.AgencyTaskRecordService; |
| | | import com.ruoyi.shop.service.task.MemberTaskRecordService; |
| | | import com.ruoyi.shop.service.task.ShopTaskRecordService; |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Resource |
| | | private ShopTaskRecordService shopTaskRecordService; |
| | | |
| | | @Resource |
| | | private MemberTaskRecordService memberTaskRecordService; |
| | | |
| | | @RequestMapping(value = "/followShopTask", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户跟进") |
| | |
| | | return R.ok(page.setRecords(mgtMemberFollowPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageMgtMemberFollow", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取用户跟进列表") |
| | | public R<Page<MgtMemberFollowPageVo>> pageMgtMemberFollow(@RequestBody MgtMemberTaskPageDto mgtMemberTaskPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtMemberTaskPageDto.setUserId(userId); |
| | | Page<MgtMemberFollowPageVo> page = new Page<>(); |
| | | page.setSize(mgtMemberTaskPageDto.getPageSize()); |
| | | page.setCurrent(mgtMemberTaskPageDto.getPageNum()); |
| | | List<MgtMemberFollowPageVo> mgtMemberFollowPageVoList = memberTaskRecordService.pageMgtMemberFollow(page, mgtMemberTaskPageDto); |
| | | return R.ok(page.setRecords(mgtMemberFollowPageVoList)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtReplayMemberSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:04 |
| | | */ |
| | | @Data |
| | | public class MgtReplayShopSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "平台回复内容") |
| | | private String replayContent; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtPageDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtShopSuggestPageDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:47 |
| | | */ |
| | | @Data |
| | | public class MgtShopSuggestPageDto extends MgtPageDto { |
| | | |
| | | |
| | | @ApiModelProperty(value = "搜索关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty(value = "提交开始时间") |
| | | private Date createStartTime; |
| | | |
| | | @ApiModelProperty(value = "提交结束时间") |
| | | private Date createEndTime; |
| | | |
| | | @ApiModelProperty(value = "建议状态0未回复1已回复") |
| | | private Integer suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "标签 多个,隔开") |
| | | private String tags; |
| | | |
| | | @ApiModelProperty(value = "复开始时间") |
| | | private Date replayStartTime; |
| | | |
| | | @ApiModelProperty(value = "回复结束时间") |
| | | private Date replayEndTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtTagShopSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:26 |
| | | */ |
| | | @Data |
| | | public class MgtTagShopSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "标签 多个,隔开") |
| | | private String suggestTags; |
| | | } |
| | |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("Shop_id") |
| | | @TableField("shop_id") |
| | | private Long shopId; |
| | | /** |
| | | * 建议内容 |
| | |
| | | */ |
| | | @TableField("replay_user_id") |
| | | private Long replayUserId; |
| | | |
| | | /** |
| | | * 回复人姓名 |
| | | */ |
| | | @TableField("replay_user_name") |
| | | private String replayUserName; |
| | | /** |
| | | * 回复时间 |
| | | */ |
| | |
| | | private Date replayTime; |
| | | |
| | | /** |
| | | * 响应时间 |
| | | */ |
| | | @TableField("response_time") |
| | | private String responseTime; |
| | | |
| | | /** |
| | | * 商品标签 |
| | | */ |
| | | @TableField("suggest_tags") |
| | | private String suggestTags; |
| | | |
| | | /** |
| | | * 回复标记 |
| | | */ |
| | | @TableField("replay_flag") |
| | | private Integer replayFlag; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.suggestId; |
New file |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtShopSuggestPageVo |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:48 |
| | | */ |
| | | @Data |
| | | public class MgtShopSuggestPageVo { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String shopName; |
| | | |
| | | @ApiModelProperty(value = "商户类型1.经销商2.代理商") |
| | | private String shopType; |
| | | |
| | | @ApiModelProperty("店主姓名") |
| | | private String shopownerName; |
| | | |
| | | @ApiModelProperty("店主联系方式") |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty(value = "建议内容") |
| | | private String suggestContent; |
| | | |
| | | @ApiModelProperty(value = "回复内容") |
| | | private String replayContent; |
| | | |
| | | @ApiModelProperty(value = "建议状态") |
| | | private String suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "回复人姓名") |
| | | private String replayUserName; |
| | | |
| | | @ApiModelProperty(value = "回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date replayTime; |
| | | |
| | | @ApiModelProperty(value = "平台响应时间") |
| | | private String responseTime; |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MgtShopSuggestTagVo |
| | | * @description: TODO |
| | | * @date 2023年04月21日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MgtShopSuggestTagVo { |
| | | |
| | | @ApiModelProperty(value = "标签id") |
| | | private Long tagId; |
| | | |
| | | @ApiModelProperty(value = "标签名称") |
| | | private String tagName; |
| | | |
| | | @ApiModelProperty(value = "是否选择0否1是") |
| | | private Integer selectFlag; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.shop.domain.dto.MgtShopSuggestPageDto; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopSuggest; |
| | | import com.ruoyi.shop.domain.vo.MerShopSuggestVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopSuggestPageVo; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | */ |
| | | void deleteShopSuggestTag(String suggestTag); |
| | | |
| | | |
| | | /** |
| | | * @description 平台获取商户建议列表 |
| | | * @param page |
| | | * @param mgtShopSuggestPageDto |
| | | * @return List<MgtShopSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:56 |
| | | */ |
| | | List<MgtShopSuggestPageVo> pageMgtShopSuggest(Page page, @Param("param")MgtShopSuggestPageDto mgtShopSuggestPageDto); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopRelTag; |
| | | import com.ruoyi.shop.domain.vo.MgtShopTagVo; |
| | | import com.ruoyi.shop.mapper.shop.ShopRelTagMapper; |
| | | import com.ruoyi.shop.service.shop.ShopRelTagService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | }else{ |
| | | mgtShopTagVo.setSelectFlag(0); |
| | | } |
| | | mgtShopTagVoList.add(mgtShopTagVo); |
| | | } |
| | | return mgtShopTagVoList; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.shop.domain.dto.MerShopSuggestDto; |
| | | import com.ruoyi.shop.domain.dto.MgtReplayShopSuggestDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopSuggestPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtTagShopSuggestDto; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopSuggest; |
| | | import com.ruoyi.shop.domain.vo.MerShopSuggestVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopSuggestPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopSuggestTagVo; |
| | | import com.ruoyi.shop.mapper.shop.ShopSuggestMapper; |
| | | import com.ruoyi.shop.service.shop.ShopSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.service.RemoteConfigService; |
| | | import com.ruoyi.system.api.service.RemoteUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private ShopSuggestMapper shopSuggestMapper; |
| | | |
| | | @Resource |
| | | private RemoteUserService remoteUserService; |
| | | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | |
| | | /** |
| | | * |
| | |
| | | shopSuggest.setShopId(merShopSuggestDto.getShopId()); |
| | | shopSuggest.setSuggestContent(merShopSuggestDto.getSuggestContent()); |
| | | shopSuggest.setCreateTime(new Date()); |
| | | shopSuggest.setReplayFlag(0); |
| | | this.save(shopSuggest); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void deleteShopSuggestTag(String suggestTag){ |
| | | shopSuggestMapper.deleteShopSuggestTag(suggestTag); |
| | | } |
| | | |
| | | /** |
| | | * @description 平台获取商户建议列表 |
| | | * @param page |
| | | * @param mgtShopSuggestPageDto |
| | | * @return List<MgtShopSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:56 |
| | | */ |
| | | @Override |
| | | public List<MgtShopSuggestPageVo> pageMgtShopSuggest(Page page, MgtShopSuggestPageDto mgtShopSuggestPageDto){ |
| | | //处理标签为正则方便sql判断 |
| | | if(StringUtils.isNotBlank(mgtShopSuggestPageDto.getTags())){ |
| | | mgtShopSuggestPageDto.setTags(mgtShopSuggestPageDto.getTags().replace(",","|")); |
| | | } |
| | | if(mgtShopSuggestPageDto.getSuggestStatus()!=null&&mgtShopSuggestPageDto.getSuggestStatus()!=1){ |
| | | mgtShopSuggestPageDto.setSuggestStatus(0); |
| | | } |
| | | //获取返回结果 |
| | | List<MgtShopSuggestPageVo> mgtShopSuggestPageVoList = shopSuggestMapper.pageMgtShopSuggest(page, mgtShopSuggestPageDto); |
| | | return mgtShopSuggestPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayShopSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:09 |
| | | */ |
| | | @Override |
| | | public void mgtReplayShopSuggest(MgtReplayShopSuggestDto mgtReplayShopSuggestDto){ |
| | | Long userId = mgtReplayShopSuggestDto.getUserId(); |
| | | SysUser sysUser = remoteUserService.getSysUser(userId).getData(); |
| | | ShopSuggest shopSuggest = this.getById(mgtReplayShopSuggestDto.getSuggestId()); |
| | | shopSuggest.setReplayContent(mgtReplayShopSuggestDto.getReplayContent()); |
| | | shopSuggest.setReplayTime(new Date()); |
| | | shopSuggest.setReplayUserId(userId); |
| | | shopSuggest.setReplayUserName(sysUser.getNickName()); |
| | | shopSuggest.setReplayFlag(1); |
| | | String responseTime = DateUtils.formatDuration(shopSuggest.getCreateTime(), shopSuggest.getReplayTime()); |
| | | shopSuggest.setResponseTime(responseTime); |
| | | this.saveOrUpdate(shopSuggest); |
| | | } |
| | | |
| | | /** |
| | | * @description listMgtShopSuggestTag |
| | | * @param suggestId |
| | | * @return List<MgtShopSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:29 |
| | | */ |
| | | @Override |
| | | public List<MgtShopSuggestTagVo> listMgtShopSuggestTag(Long suggestId){ |
| | | ShopSuggest shopSuggest = this.getById(suggestId); |
| | | String suggestTags = shopSuggest.getSuggestTags(); |
| | | Long[] tagIdLongArr = null; |
| | | if(StringUtils.isNotBlank(suggestTags)){ |
| | | String[] tagIdArr = suggestTags.split(","); |
| | | tagIdLongArr = new Long[tagIdArr.length]; |
| | | for (int i = 0; i < tagIdArr.length; i++) { |
| | | try { |
| | | tagIdLongArr[i] = Long.parseLong(tagIdArr[i]); |
| | | } catch (NumberFormatException e) { |
| | | tagIdLongArr[i] = null; |
| | | } |
| | | } |
| | | } |
| | | List<SysTag> sysTagsList = remoteConfigService.listSysTag(4).getData(); |
| | | //生成返回结果 |
| | | List<MgtShopSuggestTagVo> mgtShopSuggestTagVoList = new ArrayList<>(); |
| | | for(SysTag sysTag : sysTagsList){ |
| | | MgtShopSuggestTagVo mgtShopSuggestTagVo = new MgtShopSuggestTagVo(); |
| | | mgtShopSuggestTagVo.setTagId(sysTag.getTagId()); |
| | | mgtShopSuggestTagVo.setTagName(sysTag.getTagName()); |
| | | //判断是否选择 |
| | | if(tagIdLongArr!=null && tagIdLongArr.length>0){ |
| | | for(Long tagId : tagIdLongArr){ |
| | | if(tagId!=null && tagId.equals(sysTag.getTagId())){ |
| | | mgtShopSuggestTagVo.setSelectFlag(1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | mgtShopSuggestTagVoList.add(mgtShopSuggestTagVo); |
| | | } |
| | | return mgtShopSuggestTagVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagShopSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:34 |
| | | */ |
| | | @Override |
| | | public void mgtEditShopSuggestTag(MgtTagShopSuggestDto mgtTagShopSuggestDto){ |
| | | ShopSuggest shopSuggest = this.getById(mgtTagShopSuggestDto.getSuggestId()); |
| | | shopSuggest.setSuggestTags(mgtTagShopSuggestDto.getSuggestTags()); |
| | | this.saveOrUpdate(shopSuggest); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.shop.domain.dto.MerShopSuggestDto; |
| | | import com.ruoyi.shop.domain.dto.MgtReplayShopSuggestDto; |
| | | import com.ruoyi.shop.domain.dto.MgtShopSuggestPageDto; |
| | | import com.ruoyi.shop.domain.dto.MgtTagShopSuggestDto; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopSuggest; |
| | | import com.ruoyi.shop.domain.vo.MerShopSuggestVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopSuggestPageVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopSuggestTagVo; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return void |
| | | */ |
| | | void deleteShopSuggestTag(String suggestTag); |
| | | |
| | | /** |
| | | * @description 平台获取商户建议列表 |
| | | * @param page |
| | | * @param mgtShopSuggestPageDto |
| | | * @return List<MgtShopSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 16:56 |
| | | */ |
| | | List<MgtShopSuggestPageVo> pageMgtShopSuggest (Page page, MgtShopSuggestPageDto mgtShopSuggestPageDto); |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayShopSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:09 |
| | | */ |
| | | void mgtReplayShopSuggest(MgtReplayShopSuggestDto mgtReplayShopSuggestDto); |
| | | |
| | | /** |
| | | * @description 获取商户建议标签 |
| | | * @param suggestId |
| | | * @return List<MgtShopSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:31 |
| | | */ |
| | | List<MgtShopSuggestTagVo> listMgtShopSuggestTag(Long suggestId); |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagShopSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 17:34 |
| | | */ |
| | | void mgtEditShopSuggestTag(MgtTagShopSuggestDto mgtTagShopSuggestDto); |
| | | } |
| | |
| | | shop_id |
| | | FROM t_shop |
| | | WHERE del_flag = 0 |
| | | <if test="param.shopName!=null and param.shopName!=''"> |
| | | AND ts.shop_name LIKE CONCAT('%',#{param.shopName},'%') |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | </if> |
| | |
| | | UPDATE t_shop_suggest SET suggest_tags = TRIM(BOTH ',' FROM REPLACE(CONCAT(',', suggest_tags, ','), CONCAT(',',#{suggestTag},','), ',')) |
| | | WHERE FIND_IN_SET(#{suggestTag}, suggest_tags) > 0 |
| | | </update> |
| | | |
| | | <select id="pageMgtShopSuggest" resultType="com.ruoyi.shop.domain.vo.MgtShopSuggestPageVo"> |
| | | SELECT |
| | | tss.suggest_id suggestId, |
| | | ts.shop_name shopName, |
| | | ts.shop_type shopType, |
| | | ts.shopowner_name shopownerName, |
| | | ts.shopowner_phone shopownerPhone, |
| | | tss.suggest_content suggestContent, |
| | | tss.replay_content replayContent, |
| | | CASE tss.replay_flag WHEN 1 THEN "已回复" ELSE "未回复" END suggestStatus, |
| | | tss.create_time createTime, |
| | | tss.replay_user_name replayUserName, |
| | | tss.replay_time replayTime, |
| | | tss.response_time responseTime, |
| | | tss.suggest_tags suggestTags |
| | | FROM |
| | | t_shop_suggest tss |
| | | INNER JOIN t_shop ts ON tss.shop_id = ts.shop_id |
| | | WHERE del_flag = 0 |
| | | <if test="param.keyword!=null and param.keyword !=''"> |
| | | AND (ts.shop_name LIKE CONCAT('%',#{param.keyword},'%') OR ts.shopowner_name LIKE CONCAT('%',#{param.keyword},'%') OR ts.shopowner_phone LIKE CONCAT('%',#{param.keyword},'%') OR tss.replay_user_name LIKE CONCAT('%',#{param.keyword},'%')) |
| | | </if> |
| | | <if test="param.createStartTime!=null and param.createStartTime!=''"> |
| | | AND tss.create_time >= #{param.createStartTime} |
| | | </if> |
| | | <if test="param.createEndTime!=null and param.createEndTime!=''"> |
| | | AND tss.create_time <= #{param.createEndTime} |
| | | </if> |
| | | <if test="param.suggestStatus!=null"> |
| | | AND tss.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.replayStartTime!=null and param.replayStartTime!=''"> |
| | | AND tss.replay_time >= #{param.replayStartTime} |
| | | </if> |
| | | <if test="param.replayEndTime!=null and param.replayEndTime!=''"> |
| | | AND tss.replay_time <= #{param.replayEndTime} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | @Resource |
| | | private ArticleService articleService; |
| | | |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取单个配置") |
| | | public R<MgtCustomConfigVo> getCustomConfig(@RequestBody MgtCustomConfigDto mgtCustomConfigDto) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.controller.management; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.domain.dto.MgtReplayStaffSuggestDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffSuggestPageDto; |
| | | import com.ruoyi.system.domain.dto.MgtTagStaffSuggestDto; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestPageVo; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestTagVo; |
| | | import com.ruoyi.system.service.config.StaffSuggestService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtStaffController |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 18:36 |
| | | */ |
| | | @Api(value = "平台端员工相关接口", tags = "平台端员工相关接口", description = "平台端员工相关接口") |
| | | @RestController |
| | | @RequestMapping("/mgt/staff") |
| | | public class MgtStaffController { |
| | | |
| | | |
| | | @Resource |
| | | private StaffSuggestService staffSuggestService; |
| | | |
| | | @RequestMapping(value = "/pageMgtStaffSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取员工建议列表") |
| | | public R<Page<MgtStaffSuggestPageVo>> pageMgtStaffSuggest(@RequestBody MgtStaffSuggestPageDto mgtStaffSuggestPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtStaffSuggestPageDto.setUserId(userId); |
| | | Page<MgtStaffSuggestPageVo> page = new Page<>(); |
| | | page.setSize(mgtStaffSuggestPageDto.getPageSize()); |
| | | page.setCurrent(mgtStaffSuggestPageDto.getPageNum()); |
| | | List<MgtStaffSuggestPageVo> mgtShopSuggestPageVoList = staffSuggestService.pageMgtStaffSuggest(page,mgtStaffSuggestPageDto); |
| | | return R.ok(page.setRecords(mgtShopSuggestPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtReplayStaffSuggest", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台回复会员建议") |
| | | public R mgtReplayStaffSuggest(@RequestBody MgtReplayStaffSuggestDto mgtReplayStaffSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtReplayStaffSuggestDto.setUserId(userId); |
| | | staffSuggestService.mgtReplayStaffSuggest(mgtReplayStaffSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listMgtStaffSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取员工建议标签") |
| | | public R<List<MgtStaffSuggestTagVo>> listMgtStaffSuggestTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | List<MgtStaffSuggestTagVo> mgtStaffSuggestTagVoList= staffSuggestService.listMgtStaffSuggestTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(mgtStaffSuggestTagVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mgtEditStaffSuggestTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台编辑会员建议标签") |
| | | public R mgtEditStaffSuggestTag(@RequestBody MgtTagStaffSuggestDto mgtTagStaffSuggestDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtTagStaffSuggestDto.setUserId(userId); |
| | | staffSuggestService.mgtEditStaffSuggestTag(mgtTagStaffSuggestDto); |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtReplayStaffSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:04 |
| | | */ |
| | | @Data |
| | | public class MgtReplayStaffSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "平台回复内容") |
| | | private String replayContent; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtPageDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtStaffSuggestPageDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 18:09 |
| | | */ |
| | | @Data |
| | | public class MgtStaffSuggestPageDto extends MgtPageDto { |
| | | |
| | | |
| | | @ApiModelProperty(value = "搜索关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | private Long deptId; |
| | | |
| | | @ApiModelProperty(value = "提交开始时间") |
| | | private Date createStartTime; |
| | | |
| | | @ApiModelProperty(value = "提交结束时间") |
| | | private Date createEndTime; |
| | | |
| | | @ApiModelProperty(value = "建议状态0未回复1已回复") |
| | | private Integer suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "标签 多个,隔开") |
| | | private String tags; |
| | | |
| | | @ApiModelProperty(value = "回复开始时间") |
| | | private Date replayStartTime; |
| | | |
| | | @ApiModelProperty(value = "回复结束时间") |
| | | private Date replayEndTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtTagStaffSuggestDto |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:26 |
| | | */ |
| | | @Data |
| | | public class MgtTagStaffSuggestDto extends MgtBaseDto { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "标签 多个,隔开") |
| | | private String suggestTags; |
| | | } |
| | |
| | | * 回复用户id |
| | | */ |
| | | @TableField("replay_user_id") |
| | | private Integer replayUserId; |
| | | private Long replayUserId; |
| | | /** |
| | | * 回复人姓名 |
| | | */ |
| | | @TableField("replay_user_name") |
| | | private String replayUserName; |
| | | |
| | | /** |
| | | * 回复时间 |
| | | */ |
| | | @TableField("replay_time") |
| | | private Date replayTime; |
| | | /** |
| | | * 响应时间 |
| | | */ |
| | | @TableField("response_time") |
| | | private String responseTime; |
| | | /** |
| | | * 商户id |
| | | */ |
| | | @TableField("shop_id") |
| | | private Integer shopId; |
| | | private Long shopId; |
| | | |
| | | /** |
| | | * 商品标签 |
| | |
| | | @TableField("suggest_tags") |
| | | private String suggestTags; |
| | | |
| | | /** |
| | | * 回复标记 |
| | | */ |
| | | @TableField("replay_flag") |
| | | private Integer replayFlag; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.suggestId; |
New file |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname MgtStaffSuggestPageVo |
| | | * @description: TODO |
| | | * @date 2023 2023/6/11 16:48 |
| | | */ |
| | | @Data |
| | | public class MgtStaffSuggestPageVo { |
| | | |
| | | @ApiModelProperty(value = "建议id") |
| | | private Long suggestId; |
| | | |
| | | @ApiModelProperty(value = "员工姓名") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty(value = "建议内容") |
| | | private String suggestContent; |
| | | |
| | | @ApiModelProperty(value = "回复内容") |
| | | private String replayContent; |
| | | |
| | | @ApiModelProperty(value = "建议状态") |
| | | private String suggestStatus; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "回复人姓名") |
| | | private String replayUserName; |
| | | |
| | | @ApiModelProperty(value = "回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date replayTime; |
| | | |
| | | @ApiModelProperty(value = "平台响应时间") |
| | | private String responseTime; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MgtStaffSuggestTagVo |
| | | * @description: TODO |
| | | * @date 2023年04月21日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MgtStaffSuggestTagVo { |
| | | |
| | | @ApiModelProperty(value = "标签id") |
| | | private Long tagId; |
| | | |
| | | @ApiModelProperty(value = "标签名称") |
| | | private String tagName; |
| | | |
| | | @ApiModelProperty(value = "是否选择0否1是") |
| | | private Integer selectFlag; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.domain.dto.MgtStaffSuggestPageDto; |
| | | import com.ruoyi.system.domain.pojo.config.StaffSuggest; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestPageVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return void |
| | | */ |
| | | void deleteStaffSuggestTag(String suggestTag); |
| | | |
| | | /** |
| | | * @description 平台获取员工建议列表 |
| | | * @param page |
| | | * @param mgtStaffSuggestPageDto |
| | | * @return List<MgtStaffSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:26 |
| | | */ |
| | | List<MgtStaffSuggestPageVo> pageMgtStaffSuggest(Page page, MgtStaffSuggestPageDto mgtStaffSuggestPageDto); |
| | | } |
| | |
| | | package com.ruoyi.system.service.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.domain.dto.MgtReplayStaffSuggestDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffSuggestPageDto; |
| | | import com.ruoyi.system.domain.dto.MgtTagStaffSuggestDto; |
| | | import com.ruoyi.system.domain.pojo.config.StaffSuggest; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestPageVo; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestTagVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return void |
| | | */ |
| | | void deleteStaffSuggestTag(String suggestTag); |
| | | |
| | | /** |
| | | * @description 平台获取员工建议列表 |
| | | * @param page |
| | | * @param mgtStaffSuggestPageDto |
| | | * @return List<MgtStaffSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:26 |
| | | */ |
| | | List<MgtStaffSuggestPageVo> pageMgtStaffSuggest(Page page, MgtStaffSuggestPageDto mgtStaffSuggestPageDto); |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayStaffSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:40 |
| | | */ |
| | | void mgtReplayStaffSuggest(MgtReplayStaffSuggestDto mgtReplayStaffSuggestDto); |
| | | |
| | | /** |
| | | * @description 获取员工建议标签 |
| | | * @param suggestId |
| | | * @return List<MgtStaffSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:45 |
| | | */ |
| | | List<MgtStaffSuggestTagVo> listMgtStaffSuggestTag(Long suggestId); |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagStaffSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:49 |
| | | */ |
| | | void mgtEditStaffSuggestTag(MgtTagStaffSuggestDto mgtTagStaffSuggestDto); |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.domain.dto.MgtReplayStaffSuggestDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffSuggestPageDto; |
| | | import com.ruoyi.system.domain.dto.MgtTagStaffSuggestDto; |
| | | import com.ruoyi.system.domain.pojo.config.StaffSuggest; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestPageVo; |
| | | import com.ruoyi.system.domain.vo.MgtStaffSuggestTagVo; |
| | | import com.ruoyi.system.mapper.config.StaffSuggestMapper; |
| | | import com.ruoyi.system.service.config.StaffSuggestService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.service.config.SysTagService; |
| | | import com.ruoyi.system.service.sys.ISysUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Resource |
| | | private StaffSuggestMapper staffSuggestMapper; |
| | | |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Resource |
| | | private SysTagService sysTagService; |
| | | |
| | | /** |
| | | * @description 删除员工建议标签 |
| | | * @author jqs |
| | |
| | | */ |
| | | @Override |
| | | public void deleteStaffSuggestTag(String suggestTag){ |
| | | staffSuggestMapper.deleteStaffSuggestTag(suggestTag); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description 平台获取员工建议列表 |
| | | * @param page |
| | | * @param mgtStaffSuggestPageDto |
| | | * @return List<MgtStaffSuggestPageVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:26 |
| | | */ |
| | | @Override |
| | | public List<MgtStaffSuggestPageVo> pageMgtStaffSuggest(Page page, MgtStaffSuggestPageDto mgtStaffSuggestPageDto){ |
| | | //处理标签为正则方便sql判断 |
| | | if(StringUtils.isNotBlank(mgtStaffSuggestPageDto.getTags())){ |
| | | mgtStaffSuggestPageDto.setTags(mgtStaffSuggestPageDto.getTags().replace(",","|")); |
| | | } |
| | | if(mgtStaffSuggestPageDto.getSuggestStatus()!=null&&mgtStaffSuggestPageDto.getSuggestStatus()!=1){ |
| | | mgtStaffSuggestPageDto.setSuggestStatus(0); |
| | | } |
| | | //获取返回结果 |
| | | List<MgtStaffSuggestPageVo> mgtStaffSuggestPageVoList = staffSuggestMapper.pageMgtStaffSuggest(page, mgtStaffSuggestPageDto); |
| | | return mgtStaffSuggestPageVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台回复会员建议 |
| | | * @param mgtReplayStaffSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:39 |
| | | */ |
| | | @Override |
| | | public void mgtReplayStaffSuggest(MgtReplayStaffSuggestDto mgtReplayStaffSuggestDto){ |
| | | Long userId = mgtReplayStaffSuggestDto.getUserId(); |
| | | SysUser sysUser = sysUserService.getById(userId); |
| | | StaffSuggest staffSuggest = this.getById(mgtReplayStaffSuggestDto.getSuggestId()); |
| | | staffSuggest.setReplayContent(mgtReplayStaffSuggestDto.getReplayContent()); |
| | | staffSuggest.setReplayTime(new Date()); |
| | | staffSuggest.setReplayUserId(userId); |
| | | staffSuggest.setReplayUserName(sysUser.getNickName()); |
| | | staffSuggest.setReplayFlag(1); |
| | | String responseTime = DateUtils.formatDuration(staffSuggest.getCreateTime(), staffSuggest.getReplayTime()); |
| | | staffSuggest.setResponseTime(responseTime); |
| | | this.saveOrUpdate(staffSuggest); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取员工建议标签 |
| | | * @param suggestId |
| | | * @return List<MgtStaffSuggestTagVo> |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:44 |
| | | */ |
| | | @Override |
| | | public List<MgtStaffSuggestTagVo> listMgtStaffSuggestTag(Long suggestId){ |
| | | StaffSuggest staffSuggest = this.getById(suggestId); |
| | | String suggestTags = staffSuggest.getSuggestTags(); |
| | | Long[] tagIdLongArr = null; |
| | | if(StringUtils.isNotBlank(suggestTags)){ |
| | | String[] tagIdArr = suggestTags.split(","); |
| | | tagIdLongArr = new Long[tagIdArr.length]; |
| | | for (int i = 0; i < tagIdArr.length; i++) { |
| | | try { |
| | | tagIdLongArr[i] = Long.parseLong(tagIdArr[i]); |
| | | } catch (NumberFormatException e) { |
| | | tagIdLongArr[i] = null; |
| | | } |
| | | } |
| | | } |
| | | List<SysTag> sysTagsList = sysTagService.listByType(4); |
| | | //生成返回结果 |
| | | List<MgtStaffSuggestTagVo> mgtStaffSuggestTagVoList = new ArrayList<>(); |
| | | for(SysTag sysTag : sysTagsList){ |
| | | MgtStaffSuggestTagVo mgtStaffSuggestTagVo = new MgtStaffSuggestTagVo(); |
| | | mgtStaffSuggestTagVo.setTagId(sysTag.getTagId()); |
| | | mgtStaffSuggestTagVo.setTagName(sysTag.getTagName()); |
| | | //判断是否选择 |
| | | if(tagIdLongArr!=null && tagIdLongArr.length>0){ |
| | | for(Long tagId : tagIdLongArr){ |
| | | if(tagId!=null && tagId.equals(sysTag.getTagId())){ |
| | | mgtStaffSuggestTagVo.setSelectFlag(1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | mgtStaffSuggestTagVoList.add(mgtStaffSuggestTagVo); |
| | | } |
| | | return mgtStaffSuggestTagVoList; |
| | | } |
| | | |
| | | /** |
| | | * @description 平台编辑会员建议标签 |
| | | * @param mgtTagStaffSuggestDto |
| | | * @return void |
| | | * @author jqs34 |
| | | * @date 2023/6/11 18:47 |
| | | */ |
| | | @Override |
| | | public void mgtEditStaffSuggestTag(MgtTagStaffSuggestDto mgtTagStaffSuggestDto){ |
| | | StaffSuggest staffSuggest = this.getById(mgtTagStaffSuggestDto.getSuggestId()); |
| | | staffSuggest.setSuggestTags(mgtTagStaffSuggestDto.getSuggestTags()); |
| | | this.saveOrUpdate(staffSuggest); |
| | | } |
| | | } |
| | |
| | | WHERE FIND_IN_SET(#{suggestTag}, suggest_tags) > 0 |
| | | </update> |
| | | |
| | | |
| | | <select id="pageMgtStaffSuggest" resultType="com.ruoyi.system.domain.vo.MgtStaffSuggestPageVo"> |
| | | SELECT |
| | | tss.suggest_id suggestId, |
| | | su.nick_name staffName, |
| | | sd.dept_name deptName, |
| | | su.phonenumber mobile, |
| | | tss.suggest_content suggestContent, |
| | | tss.replay_content replayContent, |
| | | CASE tss.replay_flag WHEN 1 THEN "已回复" ELSE "未回复" END suggestStatus, |
| | | tss.create_time createTime, |
| | | tss.replay_user_name replayUserName, |
| | | tss.replay_time replayTime, |
| | | tss.response_time responseTime, |
| | | tss.suggest_tags suggestTags |
| | | FROM |
| | | t_staff_suggest tss |
| | | INNER JOIN sys_user su ON su.user_id = tss.create_user_id |
| | | LEFT JOIN sys_dept sd ON sd.dept_id = su.dept_id |
| | | WHERE del_flag = 0 |
| | | <if test="param.keyword!=null and param.keyword !=''"> |
| | | AND (su.nick_name LIKE CONCAT('%',#{param.keyword},'%') OR su.phonenumber LIKE CONCAT('%',#{param.keyword},'%') OR tss.replay_user_name LIKE CONCAT('%',#{param.keyword},'%')) |
| | | </if> |
| | | <if test="param.deptId!=null and param.deptId!=''"> |
| | | AND su.dept_id = #{param.deptId} |
| | | </if> |
| | | <if test="param.createStartTime!=null and param.createStartTime!=''"> |
| | | AND tss.create_time >= #{param.createStartTime} |
| | | </if> |
| | | <if test="param.createEndTime!=null and param.createEndTime!=''"> |
| | | AND tss.create_time <= #{param.createEndTime} |
| | | </if> |
| | | <if test="param.suggestStatus!=null"> |
| | | AND tss.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.replayStartTime!=null and param.replayStartTime!=''"> |
| | | AND tss.replay_time >= #{param.replayStartTime} |
| | | </if> |
| | | <if test="param.replayEndTime!=null and param.replayEndTime!=''"> |
| | | AND tss.replay_time <= #{param.replayEndTime} |
| | | </if> |
| | | </select> |
| | | </mapper> |