Browse Source

Merge remote-tracking branch 'origin/dev_personal_center' into dev_temp

dev_shibei_match
liushaowen 5 years ago
parent
commit
547fa1688c
  1. 33
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyElementTreeResultDTO.java
  2. 55
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceDTO.java
  3. 33
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OperAdviceListFormDTO.java
  4. 27
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ReplyAdviceFormDTO.java
  5. 55
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AdviceDetailResultDTO.java
  6. 44
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OperAdviceListResultDTO.java
  7. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java
  8. 12
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceDao.java
  9. 56
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceEntity.java
  10. 37
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceExcel.java
  11. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceRedis.java
  12. 29
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceService.java
  13. 19
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java
  14. 25
      epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml

33
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyElementTreeResultDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/6 13:54
*/
@Data
public class AgencyElementTreeResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Set<String> defaultKeys;
private List<Agency> list;
@Data
public static class Agency{
private String id;
private String label;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<AgencyElementTreeResultDTO.Agency> children;
}
}

55
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceDTO.java

@ -23,10 +23,10 @@ import lombok.Data;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Data
public class UserAdviceDTO implements Serializable {
@ -43,18 +43,53 @@ public class UserAdviceDTO implements Serializable {
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名
*/
private String agencyName;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名
*/
private String gridName;
/**
* userid
*/
private String userId;
/**
* 用户姓名
*/
private String userName;
/**
* 用户注册手机号
*/
private String regPhone;
/**
* 建议描述
*/
private String adviceContent;
/**
* 手机号
* 填写手机号
*/
private String phone;
@ -69,15 +104,25 @@ public class UserAdviceDTO implements Serializable {
private String replyContent;
/**
* 回复人
* 回复人id
*/
private String replyUser;
private String replyUserId;
/**
* 回复人姓名
*/
private String replyUserName;
/**
* 回复时间
*/
private Date replyTime;
/**
* 政府存证文字
*/
private String govContent;
/**
* 删除标志
*/

33
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OperAdviceListFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:25
*/
@Data
public class OperAdviceListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String customerId;
private String isReply;
private String adviceType;
private String startTime;
private String endTime;
@Min(1)
private Integer pageNo;
@Min(1)
private Integer pageSize;
}

27
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ReplyAdviceFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @description:回复建议FormDTO
* @author: liushaowen
* @date: 2020/11/6 10:37
*/
@Data
public class ReplyAdviceFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "adviceId不能为空")
private String adviceId;
@NotBlank(message = "回复内容不能为空")
private String replyContent;
private List<String> govImgList;
private String govContent;
}

55
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AdviceDetailResultDTO.java

@ -0,0 +1,55 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:37
*/
@Data
public class AdviceDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建议id
*/
private String adviceId;
/**
* 建议内容
*/
private String adviceContent;
/**
* 电话
*/
private String phone;
/**
* 建议时间
*/
private String adviceTime;
/**
* 回复内容
*/
private String replyContent;
/**
* 回复时间
*/
private String replyTime;
/**
* 回复人
*/
private String replyUser;
/**
* 建议图片列表
*/
private List<String> imgList;
}

44
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OperAdviceListResultDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:26
*/
@Data
public class OperAdviceListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户名
*/
private String customerName;
/**
* 建议id
*/
private String adviceId;
/**
* 是否回复 0否1是
*/
private String isReply;
/**
* 回复内容
*/
private String adviceContent;
/**
* 手机 空为*
*/
private String phone;
/**
* 建议类型 空为*
*/
private String adviceType;
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java

@ -26,6 +26,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.excel.UserAdviceExcel;
import com.epmet.service.UserAdviceService;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,15 +38,15 @@ import java.util.Map;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@RestController
@RequestMapping("useradvice")
public class UserAdviceController {
@Autowired
private UserAdviceService userAdviceService;
@ -91,4 +92,10 @@ public class UserAdviceController {
ExcelUtils.exportExcelToTarget(response, null, list, UserAdviceExcel.class);
}
}
@PostMapping("replyadvice")
public Result replyAdvice(ReplyAdviceFormDTO dto){
ValidatorUtils.validateEntity(dto);
userAdviceService.replyAdvice(dto,loginUserUtil.getLoginUserId());
return new Result();
}
}

12
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceDao.java

@ -20,14 +20,18 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.UserAdviceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Mapper
public interface UserAdviceDao extends BaseDao<UserAdviceEntity> {
}
void replyAdvice(@Param("adviceId") String adviceId,
@Param("replyContent") String replyContent,
@Param("govContent") String govContent,
@Param("replyUserId") String loginUserId);
}

56
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceEntity.java

@ -19,7 +19,6 @@ package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -27,10 +26,10 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -44,18 +43,53 @@ public class UserAdviceEntity extends BaseEpmetEntity {
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名
*/
private String agencyName;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名
*/
private String gridName;
/**
* userid
*/
private String userId;
/**
* 用户姓名
*/
private String userName;
/**
* 用户注册手机号
*/
private String regPhone;
/**
* 建议描述
*/
private String adviceContent;
/**
* 手机号
* 填写手机号
*/
private String phone;
@ -70,13 +104,23 @@ public class UserAdviceEntity extends BaseEpmetEntity {
private String replyContent;
/**
* 回复人
* 回复人id
*/
private String replyUserId;
/**
* 回复人姓名
*/
private String replyUser;
private String replyUserName;
/**
* 回复时间
*/
private Date replyTime;
/**
* 政府存证文字
*/
private String govContent;
}

37
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceExcel.java

@ -23,10 +23,10 @@ import lombok.Data;
import java.util.Date;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Data
public class UserAdviceExcel {
@ -37,13 +37,34 @@ public class UserAdviceExcel {
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "客户名")
private String customerName;
@Excel(name = "组织ID")
private String agencyId;
@Excel(name = "组织名")
private String agencyName;
@Excel(name = "网格ID")
private String gridId;
@Excel(name = "网格名")
private String gridName;
@Excel(name = "userid")
private String userId;
@Excel(name = "用户姓名")
private String userName;
@Excel(name = "用户注册手机号")
private String regPhone;
@Excel(name = "建议描述")
private String adviceContent;
@Excel(name = "手机号")
@Excel(name = "填写手机号")
private String phone;
@Excel(name = "问题分类(gov政府software软件,逗号分隔)")
@ -52,12 +73,18 @@ public class UserAdviceExcel {
@Excel(name = "回复内容")
private String replyContent;
@Excel(name = "回复人")
private String replyUser;
@Excel(name = "回复人id")
private String replyUserId;
@Excel(name = "回复人姓名")
private String replyUserName;
@Excel(name = "回复时间")
private Date replyTime;
@Excel(name = "政府存证文字")
private String govContent;
@Excel(name = "删除标志")
private String delFlag;

4
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceRedis.java

@ -22,10 +22,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Component
public class UserAdviceRedis {

29
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceService.java

@ -20,16 +20,17 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.entity.UserAdviceEntity;
import java.util.List;
import java.util.Map;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
public interface UserAdviceService extends BaseService<UserAdviceEntity> {
@ -39,7 +40,7 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param params
* @return PageData<UserAdviceDTO>
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
PageData<UserAdviceDTO> page(Map<String, Object> params);
@ -49,7 +50,7 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param params
* @return java.util.List<UserAdviceDTO>
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
List<UserAdviceDTO> list(Map<String, Object> params);
@ -59,7 +60,7 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param id
* @return UserAdviceDTO
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
UserAdviceDTO get(String id);
@ -69,7 +70,7 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param dto
* @return void
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
void save(UserAdviceDTO dto);
@ -79,7 +80,7 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param dto
* @return void
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
void update(UserAdviceDTO dto);
@ -89,7 +90,17 @@ public interface UserAdviceService extends BaseService<UserAdviceEntity> {
* @param ids
* @return void
* @author generator
* @date 2020-11-04
* @date 2020-11-06
*/
void delete(String[] ids);
}
/**
* @Description 回复建议
* @param dto
* @param loginUserId
* @return void
* @Author liushaowen
* @Date 2020/11/6 16:44
*/
void replyAdvice(ReplyAdviceFormDTO dto, String loginUserId);
}

19
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserAdviceServiceImpl.java

@ -25,6 +25,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.UserAdviceDao;
import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.entity.UserAdviceEntity;
import com.epmet.redis.UserAdviceRedis;
import com.epmet.service.UserAdviceService;
@ -38,10 +39,10 @@ import java.util.List;
import java.util.Map;
/**
* 用户建议
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
* @since v1.0.0 2020-11-06
*/
@Service
public class UserAdviceServiceImpl extends BaseServiceImpl<UserAdviceDao, UserAdviceEntity> implements UserAdviceService {
@ -101,4 +102,16 @@ public class UserAdviceServiceImpl extends BaseServiceImpl<UserAdviceDao, UserAd
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}
/**
* @param dto
* @param loginUserId
* @return void
* @Description 回复建议
* @Author liushaowen
* @Date 2020/11/6 16:44
*/
@Override
public void replyAdvice(ReplyAdviceFormDTO dto, String loginUserId) {
baseDao.replyAdvice(dto.getAdviceId(),dto.getReplyContent(),dto.getGovContent(),loginUserId);
}
}

25
epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml

@ -6,13 +6,22 @@
<resultMap type="com.epmet.entity.UserAdviceEntity" id="userAdviceMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="customerName" column="CUSTOMER_NAME"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="agencyName" column="AGENCY_NAME"/>
<result property="gridId" column="GRID_ID"/>
<result property="gridName" column="GRID_NAME"/>
<result property="userId" column="USER_ID"/>
<result property="userName" column="USER_NAME"/>
<result property="regPhone" column="REG_PHONE"/>
<result property="adviceContent" column="ADVICE_CONTENT"/>
<result property="phone" column="PHONE"/>
<result property="adviceType" column="ADVICE_TYPE"/>
<result property="replyContent" column="REPLY_CONTENT"/>
<result property="replyUser" column="REPLY_USER"/>
<result property="replyUserId" column="REPLY_USER_ID"/>
<result property="replyUserName" column="REPLY_USER_NAME"/>
<result property="replyTime" column="REPLY_TIME"/>
<result property="govContent" column="GOV_CONTENT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
@ -21,5 +30,17 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<update id="replyAdvice" >
update user_advice
set
reply_content = #{replyContent},
reply_user_id = #{replyUserId},
reply_time = now(),
gov_content = #{govContent},
reply_user_name = (select real_name from oper_user where user_id = #{replyUserId} and del_flag = 0),
updated_by = #{replyUserId},
updated_time = now()
where id = #{adviceId}
</update>
</mapper>
</mapper>

Loading…
Cancel
Save