Commit 102460ad by zhiwj

代码规范

parent b0a262fe
......@@ -79,16 +79,6 @@ public class EvaluateOrderConfigDTO implements Serializable {
private Integer review;
/**
* 追评提醒 X天
*/
// private Integer reviewRemind;
/**
* 追评期限
*/
// private Integer reviewLimitday;
/**
* 是否支持用户隐藏追评
*/
private Integer reviewUserHidden;
......
......@@ -69,16 +69,19 @@ public interface EvaluateConfigApiService {
/**
* 保存
* @Title: updateEvaluateMind
* @Description: 保存
* @author zhiwj
* @param enterpriseId
* @param mind
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse<Void> updateEvaluateMind(Integer enterpriseId, Integer mind);
/**
* 查询评价
* @Title: getEvaluateMind
* @Description: 查询评价
* @author zhiwj
......
......@@ -34,6 +34,7 @@ public interface EvaluateManageApiService {
* @Description:
* @author zhiwj
* @param evaluateId
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.evaluate.dto.EvaluateDTO>
* @throws
*/
......@@ -53,6 +54,7 @@ public interface EvaluateManageApiService {
ServiceResponse<Void> updateShowStatus(Integer enterpriseId, List<Integer> evaluateId, Integer showStatus);
/**
* 编辑回复是否展示状态
* @Title: updateReplyShowStatus
* @Description:
* @author zhiwj
......@@ -147,9 +149,11 @@ public interface EvaluateManageApiService {
ServiceResponse<Integer> countEvaluate(EvaluateQO evaluateQO);
/**
* 计算门店分数
* @Title: computeStoreScore
* @Description:
* @author zhiwj
* @author zhiwj
* @param msg
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
......
......@@ -12,6 +12,7 @@ public interface EvaluateMsgLogApiService {
/**
* 接收数据组的订单数据 发送数据
* @Title: sendNotice
* @Description: 接收数据组的订单数据 发送数据
* @author zhiwj
......
......@@ -42,11 +42,11 @@ public interface EvaluateOutApiService {
/**
* 查询门店下的所有评价(仅包含展示的)
* @Title: listEvaluateByStore
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.evaluate.dto.EvaluateDTO>>
* @throws
* @param enterpriseId
* @param storeId
* @param currentPage
* @param pageSize
* @return
*/
ServiceResponse<Page<EvaluateDTO>> listEvaluateByStore(Integer enterpriseId, Integer storeId, Integer currentPage, Integer pageSize);
......
......@@ -25,7 +25,8 @@ public interface EvaluateOverviewApiService {
* @param enterpriseId
* @param startTime
* @param endTime
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @param storeIdList
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.Long>>
* @throws
*/
ServiceResponse<Map<String, Long>> chart1(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList);
......
......@@ -60,6 +60,7 @@ public interface ProblemManageApiService {
ServiceResponse<Void> replyProblem(ProblemUserReplyDTO problemUserReplyDTO);
/**
* 回复
* @Title: replyProblem
* @Description:
* @author zhiwj
......
......@@ -25,7 +25,7 @@ public interface ProblemOutApiService {
ServiceResponse<Void> saveProblem(ProblemDTO problemDTO);
/**
*
* 保存回复
* @Title: saveProblem
* @Description:
* @author zhiwj
......@@ -58,7 +58,7 @@ public interface ProblemOutApiService {
ServiceResponse<ProblemDTO> getProblem(Integer problemId);
/**
*
* 结束回复
* @Title: endProblem
* @Description:
* @author zhiwj
......@@ -74,6 +74,7 @@ public interface ProblemOutApiService {
* @Description:
* @author zhiwj
* @param enterpriseId
* @param acuId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Boolean>
* @throws
*/
......
......@@ -2,6 +2,13 @@ package com.gic.evaluate.dao.mapper;
import com.gic.evaluate.entity.TabBadEvaluateConfig;
/**
*
* @ClassName: TabBadEvaluateConfigMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabBadEvaluateConfigMapper {
/**
* 根据主键删除
......@@ -51,5 +58,14 @@ public interface TabBadEvaluateConfigMapper {
*/
int updateByPrimaryKey(TabBadEvaluateConfig record);
/**
* 查询配置
* @Title: getBadEvaluateConfig
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.evaluate.entity.TabBadEvaluateConfig
* @throws
*/
TabBadEvaluateConfig getBadEvaluateConfig(Integer enterpriseId);
}
\ No newline at end of file
......@@ -5,6 +5,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* @ClassName: TabEvaluateImgMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabEvaluateImgMapper {
/**
* 根据主键删除
......@@ -54,8 +61,26 @@ public interface TabEvaluateImgMapper {
*/
int updateByPrimaryKey(TabEvaluateImg record);
/**
* listImageByEvaluateId
* @Title: listImageByEvaluateId
* @Description:
* @author zhiwj
* @param evaluateId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateImg>
* @throws
*/
List<TabEvaluateImg> listImageByEvaluateId(@Param("evaluateId") Integer evaluateId);
/**
* listImageByEvaluateReplyId
* @Title: listImageByEvaluateReplyId
* @Description:
* @author zhiwj
* @param evaluateReplyId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateImg>
* @throws
*/
List<TabEvaluateImg> listImageByEvaluateReplyId(@Param("evaluateReplyId") Integer evaluateReplyId);
}
\ No newline at end of file
......@@ -8,6 +8,13 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
/**
*
* @ClassName: TabEvaluateMsgLogMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabEvaluateMsgLogMapper {
/**
* 根据主键删除
......@@ -57,16 +64,80 @@ public interface TabEvaluateMsgLogMapper {
*/
int updateByPrimaryKey(TabEvaluateMsgLog record);
/**
* getByOrderId
* @Title: getByOrderId
* @Description:
* @author zhiwj
* @param orderId
* @return com.gic.evaluate.entity.TabEvaluateMsgLog
* @throws
*/
TabEvaluateMsgLog getByOrderId(Long orderId);
/**
* listFirstMsgLogs
* @Title: listFirstMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTimeOfDay
* @param endTimeOfDay
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listFirstMsgLogs(@Param("enterpriseId") Integer enterpriseId, @Param("startTimeOfDay") Date startTimeOfDay, @Param("endTimeOfDay") Date endTimeOfDay);
/**
* listSecondMsgLogs
* @Title: listSecondMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTimeOfDay
* @param endTimeOfDay
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listSecondMsgLogs(@Param("enterpriseId") Integer enterpriseId, @Param("startTimeOfDay") Date startTimeOfDay, @Param("endTimeOfDay") Date endTimeOfDay);
/**
* listReviewMsgLogs
* @Title: listReviewMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTimeOfDay
* @param endTimeOfDay
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listReviewMsgLogs(@Param("enterpriseId") Integer enterpriseId, @Param("startTimeOfDay") Date startTimeOfDay, @Param("endTimeOfDay") Date endTimeOfDay);
/**
* orderCountByStoreId
* @Title: orderCountByStoreId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param storeIdList
* @return java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
@MapKey("storeId")
Map<Integer,Map<String,Object>> orderCountByStoreId(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> storeIdList);
/**
* listTrendOrderCount
* @Title: listTrendOrderCount
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTime
* @param endTime
* @param storeIdList
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
List<Map<String, Object>> listTrendOrderCount(@Param("enterpriseId") Integer enterpriseId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> storeIdList);
}
\ No newline at end of file
......@@ -2,6 +2,13 @@ package com.gic.evaluate.dao.mapper;
import com.gic.evaluate.entity.TabEvaluateOrderConfig;
/**
*
* @ClassName: TabEvaluateOrderConfigMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabEvaluateOrderConfigMapper {
/**
* 根据主键删除
......@@ -51,5 +58,14 @@ public interface TabEvaluateOrderConfigMapper {
*/
int updateByPrimaryKey(TabEvaluateOrderConfig record);
/**
* getOrderConfig
* @Title: getOrderConfig
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.evaluate.entity.TabEvaluateOrderConfig
* @throws
*/
TabEvaluateOrderConfig getOrderConfig(Integer enterpriseId);
}
\ No newline at end of file
......@@ -55,13 +55,66 @@ public interface TabEvaluateQuickMapper {
*/
int updateByPrimaryKey(TabEvaluateQuick record);
/**
* delByEnterpriseId
* @Title: delByEnterpriseId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param quickReplyType
* @return void
* @throws
*/
void delByEnterpriseId(@Param("enterpriseId") Integer enterpriseId, @Param("quickReplyType") Integer quickReplyType);
/**
* insertSelectiveByNotExist
* @Title: insertSelectiveByNotExist
* @Description:
* @author zhiwj
* @param tabEvaluateQuick
* @return void
* @throws
*/
void insertSelectiveByNotExist(TabEvaluateQuick tabEvaluateQuick);
/**
* updateStatusByEvaluateQuicks
* @Title: updateStatusByEvaluateQuicks
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateQuick
* @param quickReplyType
* @return void
* @throws
*/
void updateStatusByEvaluateQuicks(@Param("enterpriseId") Integer enterpriseId, @Param("evaluateQuick") List<String> evaluateQuick, @Param("quickReplyType") Integer quickReplyType);
/**
* listEvaluateQuick
* @Title: listEvaluateQuick
* @Description:
* @author zhiwj
* @param enterpriseId
* @param quickReplyType
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateQuick>
* @throws
*/
List<TabEvaluateQuick> listEvaluateQuick(@Param("enterpriseId") Integer enterpriseId, @Param("quickReplyType") Integer quickReplyType);
/**
* evaluateQuickChart
* @Title: evaluateQuickChart
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTime
* @param endTime
* @param tagType
* @param storeIdList
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
List<Map<String, Object>> evaluateQuickChart(@Param("enterpriseId") Integer enterpriseId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("tagType") Integer tagType, @Param("ids") List<Integer> storeIdList);
}
\ No newline at end of file
......@@ -5,6 +5,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* @ClassName: TabEvaluateReplyMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabEvaluateReplyMapper {
/**
* 根据主键删除
......@@ -54,9 +61,41 @@ public interface TabEvaluateReplyMapper {
*/
int updateByPrimaryKey(TabEvaluateReply record);
/**
* listEvaluateReply
* @Title: listEvaluateReply
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param showStatus
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateReply>
* @throws
*/
List<TabEvaluateReply> listEvaluateReply(@Param("enterpriseId") Integer enterpriseId, @Param("evaluateId") Integer evaluateId, @Param("showStatus") Integer showStatus);
/**
* updateReplyShowStatus
* @Title: updateReplyShowStatus
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateReplyId
* @param showStatus
* @return void
* @throws
*/
void updateReplyShowStatus(@Param("enterpriseId") Integer enterpriseId, @Param("evaluateReplyId") Integer evaluateReplyId, @Param("showStatus") Integer showStatus);
/**
* countReviewReplyByMember
* @Title: countReviewReplyByMember
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @return java.lang.Integer
* @throws
*/
Integer countReviewReplyByMember(@Param("enterpriseId") Integer enterpriseId, @Param("evaluateId") Integer evaluateId);
}
\ No newline at end of file
......@@ -5,6 +5,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* @ClassName: TabEvaluateTagsMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabEvaluateTagsMapper {
/**
* 根据主键删除
......@@ -54,5 +61,16 @@ public interface TabEvaluateTagsMapper {
*/
int updateByPrimaryKey(TabEvaluateTags record);
/**
* listEvaluateTags
* @Title: listEvaluateTags
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param evaluateReplyId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateTags>
* @throws
*/
List<TabEvaluateTags> listEvaluateTags(@Param("enterpriseId") Integer enterpriseId, @Param("evaluateId") Integer evaluateId, @Param("evaluateReplyId") Integer evaluateReplyId);
}
\ No newline at end of file
......@@ -53,7 +53,25 @@ public interface TabProblemImgMapper {
*/
int updateByPrimaryKey(TabProblemImg record);
/**
* listImageByProblemId
* @Title: listImageByProblemId
* @Description:
* @author zhiwj
* @param problemId
* @return java.util.List<com.gic.evaluate.entity.TabProblemImg>
* @throws
*/
List<TabProblemImg> listImageByProblemId(Integer problemId);
/**
* listImageByProblemReplyId
* @Title: listImageByProblemReplyId
* @Description:
* @author zhiwj
* @param problemReplyId
* @return java.util.List<com.gic.evaluate.entity.TabProblemImg>
* @throws
*/
List<TabProblemImg> listImageByProblemReplyId(Integer problemReplyId);
}
\ No newline at end of file
......@@ -9,6 +9,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
*
* @ClassName: TabProblemMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabProblemMapper {
/**
* 根据主键删除
......@@ -58,10 +65,37 @@ public interface TabProblemMapper {
*/
int updateByPrimaryKey(TabProblem record);
/**
* listProblem
* @Title: listProblem
* @Description:
* @author zhiwj
* @param problemQO
* @return com.github.pagehelper.Page<com.gic.evaluate.entity.TabProblem>
* @throws
*/
Page<TabProblem> listProblem(ProblemQO problemQO);
/**
* countProblem
* @Title: countProblem
* @Description:
* @author zhiwj
* @param problemQO
* @return java.lang.Integer
* @throws
*/
Integer countProblem(ProblemQO problemQO);
/**
* listProblemByAcuId
* @Title: listProblemByAcuId
* @Description:
* @author zhiwj
* @param acuId
* @return java.util.List<com.gic.evaluate.dto.ProblemDTO>
* @throws
*/
List<ProblemDTO> listProblemByAcuId(@Param("acuId") Long acuId);
/**
......
......@@ -5,6 +5,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* @ClassName: TabProblemReplyMapper
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public interface TabProblemReplyMapper {
/**
* 根据主键删除
......@@ -54,7 +61,25 @@ public interface TabProblemReplyMapper {
*/
int updateByPrimaryKey(TabProblemReply record);
/**
* listReply
* @Title: listReply
* @Description:
* @author zhiwj
* @param problemId
* @return java.util.List<com.gic.evaluate.entity.TabProblemReply>
* @throws
*/
List<TabProblemReply> listReply(Integer problemId);
/**
* firstReplyByProblemId
* @Title: firstReplyByProblemId
* @Description:
* @author zhiwj
* @param problemIdList
* @return java.util.List<com.gic.evaluate.entity.TabProblemReply>
* @throws
*/
List<TabProblemReply> firstReplyByProblemId(@Param("ids") List<Integer> problemIdList);
}
\ No newline at end of file
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_bad_evaluate_config
*/
/**
*
* @ClassName: TabBadEvaluateConfig
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabBadEvaluateConfig {
/**
*
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate
*/
/**
*
* @ClassName: TabEvaluate
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluate {
/**
*
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate_img
*/
/**
*
* @ClassName: TabEvaluateImg
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateImg {
/**
*
......
......@@ -7,6 +7,13 @@ import java.util.Date;
/**
* tab_evaluate_msg_log
*/
/**
*
* @ClassName: TabEvaluateMsgLog
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateMsgLog {
/**
* 订单消息发送日志ID
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate_order_config
*/
/**
*
* @ClassName: TabEvaluateOrderConfig
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateOrderConfig {
/**
*
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate_quick
*/
/**
*
* @ClassName: TabEvaluateQuick
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateQuick {
/**
* 快捷标签id
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate_reply
*/
/**
*
* @ClassName: TabEvaluateReply
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateReply {
/**
*
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_evaluate_tags
*/
/**
*
* @ClassName: TabEvaluateTags
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabEvaluateTags {
/**
* 评价快捷标签统计表ID
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_problem
*/
/**
*
* @ClassName: TabProblem
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabProblem {
/**
* 投诉与建议
......
......@@ -4,7 +4,13 @@ import java.util.Date;
/**
* tab_problem_img
*/
*//**
*
* @ClassName: TabProblemImg
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabProblemImg {
/**
*
......
......@@ -5,6 +5,13 @@ import java.util.Date;
/**
* tab_problem_reply
*/
/**
*
* @ClassName: TabProblemReply
* @Description:
* @author zhiwj
* @date 2020-09-08 18:50
*/
public class TabProblemReply {
/**
*
......
......@@ -10,9 +10,39 @@ import com.gic.evaluate.entity.TabBadEvaluateConfig;
* @date 2019-12-25 17:47
*/
public interface BadEvaluateConfigService {
/**
* init
* @Title: init
* @Description:
* @author zhiwj
* @param enterpriseId
* @return void
* @throws
*/
void init(Integer enterpriseId);
/**
* updateBadEvaluateConfig
* @Title: updateBadEvaluateConfig
* @Description:
* @author zhiwj
* @param badEvaluateConfigDTO
* @return void
* @throws
*/
void updateBadEvaluateConfig(BadEvaluateConfigDTO badEvaluateConfigDTO);
/**
* getBadEvaluateConfig
* @Title: getBadEvaluateConfig
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.evaluate.entity.TabBadEvaluateConfig
* @throws
*/
TabBadEvaluateConfig getBadEvaluateConfig(Integer enterpriseId);
}
......@@ -10,11 +10,52 @@ import java.util.List;
* @date 2020-01-02 11:10
*/
public interface EvaluateImgService {
/**
* listImageByEvaluateId
* @Title: listImageByEvaluateId
* @Description:
* @author zhiwj
* @param evaluateId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateImg>
* @throws
*/
List<TabEvaluateImg> listImageByEvaluateId(Integer evaluateId);
/**
* listImageByEvaluateReplyId
* @Title: listImageByEvaluateReplyId
* @Description:
* @author zhiwj
* @param evaluateReplyId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateImg>
* @throws
*/
List<TabEvaluateImg> listImageByEvaluateReplyId(Integer evaluateReplyId);
/**
* saveList
* @Title: saveList
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param imgUrlList
* @return void
* @throws
*/
void saveList(Integer enterpriseId, Integer evaluateId, List<String> imgUrlList);
/**
* saveList
* @Title: saveList
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param evaluateReplyId
* @param imgUrlList
* @return void
* @throws
*/
void saveList(Integer enterpriseId, Integer evaluateId, Integer evaluateReplyId, List<String> imgUrlList);
}
......@@ -12,19 +12,95 @@ import java.util.Map;
* @date 2020/2/6 13:41
*/
public interface EvaluateMsgLogService {
/**
* save
* @Title: save
* @Description:
* @author zhiwj
* @param evaluateMsgLog
* @return void
* @throws
*/
void save(TabEvaluateMsgLog evaluateMsgLog);
/**
* getByOrderId
* @Title: getByOrderId
* @Description:
* @author zhiwj
* @param orderId
* @return com.gic.evaluate.entity.TabEvaluateMsgLog
* @throws
*/
TabEvaluateMsgLog getByOrderId(Long orderId);
/**
* listFirstMsgLogs
* @Title: listFirstMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listFirstMsgLogs(Integer enterpriseId);
/**
* listSecondMsgLogs
* @Title: listSecondMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listSecondMsgLogs(Integer enterpriseId);
/**
* listReviewMsgLogs
* @Title: listReviewMsgLogs
* @Description:
* @author zhiwj
* @param enterpriseId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateMsgLog>
* @throws
*/
List<TabEvaluateMsgLog> listReviewMsgLogs(Integer enterpriseId);
/**
* update
* @Title: update
* @Description:
* @author zhiwj
* @param log
* @return void
* @throws
*/
void update(TabEvaluateMsgLog log);
/**
* orderCountByStoreId
* @Title: orderCountByStoreId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param storeIdList
* @return java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
Map<Integer,Map<String,Object>> orderCountByStoreId(Integer enterpriseId, List<Integer> storeIdList);
/**
* listTrendOrderCount
* @Title: listTrendOrderCount
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTime
* @param endTime
* @param storeIdList
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
List<Map<String, Object>> listTrendOrderCount(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList);
}
......@@ -10,9 +10,36 @@ import com.gic.evaluate.entity.TabEvaluateOrderConfig;
* @date 2019-12-25 17:45
*/
public interface EvaluateOrderConfigService {
/**
* init
* @Title: init
* @Description:
* @author zhiwj
* @param enterpriseId
* @return void
* @throws
*/
void init(Integer enterpriseId);
/**
* updateOrderConfig
* @Title: updateOrderConfig
* @Description:
* @author zhiwj
* @param evaluateOrderConfigDTO
* @return void
* @throws
*/
void updateOrderConfig(EvaluateOrderConfigDTO evaluateOrderConfigDTO);
/**
* getEvaluateOrderConfig
* @Title: getEvaluateOrderConfig
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.evaluate.entity.TabEvaluateOrderConfig
* @throws
*/
TabEvaluateOrderConfig getEvaluateOrderConfig(Integer enterpriseId);
}
......@@ -13,13 +13,67 @@ import java.util.Map;
*/
public interface EvaluateQuickService {
/**
* saveEvaluateQuick
* @Title: saveEvaluateQuick
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateQuick
* @param quickReplyType
* @return void
* @throws
*/
void saveEvaluateQuick(Integer enterpriseId, List<String> evaluateQuick, Integer quickReplyType);
/**
* listEvaluateQuick
* @Title: listEvaluateQuick
* @Description:
* @author zhiwj
* @param enterpriseId
* @param quickReplyType
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateQuick>
* @throws
*/
List<TabEvaluateQuick> listEvaluateQuick(Integer enterpriseId, Integer quickReplyType);
/**
* getById
* @Title: getById
* @Description:
* @author zhiwj
* @param quickTagsId
* @return com.gic.evaluate.entity.TabEvaluateQuick
* @throws
*/
TabEvaluateQuick getById(Integer quickTagsId);
/**
* evaluateGoodQuickChart
* @Title: evaluateGoodQuickChart
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTime
* @param endTime
* @param storeIdList
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
List<Map<String, Object>> evaluateGoodQuickChart(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList);
/**
* evaluateBadQuickChart
* @Title: evaluateBadQuickChart
* @Description:
* @author zhiwj
* @param enterpriseId
* @param startTime
* @param endTime
* @param storeIdList
* @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
List<Map<String, Object>> evaluateBadQuickChart(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList);
}
......@@ -14,17 +14,85 @@ import java.util.List;
*/
public interface EvaluateReplyService {
/**
* listEvaluateReply
* @Title: listEvaluateReply
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param showStatus
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateReply>
* @throws
*/
List<TabEvaluateReply> listEvaluateReply(Integer enterpriseId, Integer evaluateId, Integer showStatus);
/**
* countReviewReplyByMember
* @Title: countReviewReplyByMember
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @return java.lang.Integer
* @throws
*/
Integer countReviewReplyByMember(Integer enterpriseId, Integer evaluateId);
/**
* saveUserReplyEvaluate
* @Title: saveUserReplyEvaluate
* @Description:
* @author zhiwj
* @param userReplyDTO
* @return java.lang.Integer
* @throws
*/
Integer saveUserReplyEvaluate(UserReplyDTO userReplyDTO);
/**
* saveMemberReplyEvaluate
* @Title: saveMemberReplyEvaluate
* @Description:
* @author zhiwj
* @param memberReplyDTO
* @return java.lang.Integer
* @throws
*/
Integer saveMemberReplyEvaluate(MemberReplyDTO memberReplyDTO);
/**
* delReply
* @Title: delReply
* @Description:
* @author zhiwj
* @param evaluateReplyId
* @return void
* @throws
*/
void delReply(Integer evaluateReplyId);
/**
* updateReplyShowStatus
* @Title: updateReplyShowStatus
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateReplyId
* @param showStatus
* @return void
* @throws
*/
void updateReplyShowStatus(Integer enterpriseId, Integer evaluateReplyId, Integer showStatus);
/**
* update
* @Title: update
* @Description:
* @author zhiwj
* @param userReplyDTO
* @return void
* @throws
*/
void update(UserReplyDTO userReplyDTO);
}
......@@ -10,12 +10,54 @@ import java.util.List;
* @date 2020-02-28 13:52
*/
public interface EvaluateTagsService {
/**
* @Title: saveQuick
* @Description:
* @author zhiwj
* @param quickTagsId
* @param enterpriseId
* @param evaluateId
* @param memberId
* @return void
* @throws
*/
void saveQuick(Integer quickTagsId, Integer enterpriseId, Integer evaluateId, Long memberId);
/**
* @Title: saveQuick
* @Description:
* @author zhiwj
* @param quickTagsId
* @param enterpriseId
* @param evaluateId
* @param evaluateReplyId
* @param memberId
* @return void
* @throws
*/
void saveQuick(Integer quickTagsId, Integer enterpriseId, Integer evaluateId, Integer evaluateReplyId, Long memberId);
/**
* @Title: listEvaluateTags
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateTags>
* @throws
*/
List<TabEvaluateTags> listEvaluateTags(Integer enterpriseId, Integer evaluateId);
/**
* @Title: listEvaluateTags
* @Description:
* @author zhiwj
* @param enterpriseId
* @param evaluateId
* @param evaluateReplyId
* @return java.util.List<com.gic.evaluate.entity.TabEvaluateTags>
* @throws
*/
List<TabEvaluateTags> listEvaluateTags(Integer enterpriseId, Integer evaluateId, Integer evaluateReplyId);
}
......@@ -10,11 +10,52 @@ import java.util.List;
* @date 2020-01-02 11:10
*/
public interface ProblemImgService {
/**
* listImageByProblemId
* @Title: listImageByProblemId
* @Description:
* @author zhiwj
* @param problemId
* @return java.util.List<com.gic.evaluate.entity.TabProblemImg>
* @throws
*/
List<TabProblemImg> listImageByProblemId(Integer problemId);
/**
* listImageByProblemReplyId
* @Title: listImageByProblemReplyId
* @Description:
* @author zhiwj
* @param problemReplyId
* @return java.util.List<com.gic.evaluate.entity.TabProblemImg>
* @throws
*/
List<TabProblemImg> listImageByProblemReplyId(Integer problemReplyId);
/**
* saveList
* @Title: saveList
* @Description:
* @author zhiwj
* @param enterpriseId
* @param problemId
* @param imgUrlList
* @return void
* @throws
*/
void saveList(Integer enterpriseId, Integer problemId, List<String> imgUrlList);
/**
* saveList
* @Title: saveList
* @Description:
* @author zhiwj
* @param enterpriseId
* @param problemId
* @param problemReplyId
* @param imgUrlList
* @return void
* @throws
*/
void saveList(Integer enterpriseId, Integer problemId, Integer problemReplyId, List<String> imgUrlList);
}
......@@ -13,13 +13,58 @@ import java.util.Map;
* @date 2020-01-02 11:10
*/
public interface ProblemReplyService {
/**
* listReply
* @Title: listReply
* @Description:
* @author zhiwj
* @param problemId
* @return java.util.List<com.gic.evaluate.dto.ProblemReplyDTO>
* @throws
*/
List<ProblemReplyDTO> listReply(Integer problemId);
/**
* save
* @Title: save
* @Description:
* @author zhiwj
* @param problemUserReplyDTO
* @return void
* @throws
*/
void save(ProblemUserReplyDTO problemUserReplyDTO);
/**
* save
* @Title: save
* @Description:
* @author zhiwj
* @param problemMemberReplyDTO
* @return int
* @throws
*/
int save(ProblemMemberReplyDTO problemMemberReplyDTO);
/**
* update
* @Title: update
* @Description:
* @author zhiwj
* @param problemReplyDTO
* @return void
* @throws
*/
void update(ProblemReplyDTO problemReplyDTO);
/**
* firstReplyByProblemId
* @Title: firstReplyByProblemId
* @Description:
* @author zhiwj
* @param problemIdList
* @return java.util.Map<java.lang.Integer,java.lang.String>
* @throws
*/
Map<Integer, String> firstReplyByProblemId(List<Integer> problemIdList);
}
......@@ -13,19 +13,92 @@ import java.util.List;
* @date 2020-01-02 11:10
*/
public interface ProblemService {
/**
* listProblem
* @Title: listProblem
* @Description:
* @author zhiwj
* @param problemQO
* @return com.github.pagehelper.Page<com.gic.evaluate.entity.TabProblem>
* @throws
*/
Page<TabProblem> listProblem(ProblemQO problemQO);
/**
* getProblem
* @Title: getProblem
* @Description:
* @author zhiwj
* @param problemId
* @return com.gic.evaluate.entity.TabProblem
* @throws
*/
TabProblem getProblem(Integer problemId);
/**
* updateProblem
* @Title: updateProblem
* @Description:
* @author zhiwj
* @param problemDTO
* @return void
* @throws
*/
void updateProblem(ProblemDTO problemDTO);
/**
* save
* @Title: save
* @Description:
* @author zhiwj
* @param problemDTO
* @return java.lang.Integer
* @throws
*/
Integer save(ProblemDTO problemDTO);
/**
* listProblem
* @Title: listProblem
* @Description:
* @author zhiwj
* @param acuId
* @return java.util.List<com.gic.evaluate.dto.ProblemDTO>
* @throws
*/
List<ProblemDTO> listProblem(Long acuId);
/**
* endProblem
* @Title: endProblem
* @Description:
* @author zhiwj
* @param problemId
* @return void
* @throws
*/
void endProblem(Integer problemId);
/**
* countProblem
* @Title: countProblem
* @Description:
* @author zhiwj
* @param problemQO
* @return java.lang.Integer
* @throws
*/
Integer countProblem(ProblemQO problemQO);
/**
* hasMaliciousStatusByAcuIdBeforeHours
* @Title: hasMaliciousStatusByAcuIdBeforeHours
* @Description:
* @author zhiwj
* @param acuId
* @param badSuggestionTagType
* @return boolean
* @throws
*/
boolean hasMaliciousStatusByAcuIdBeforeHours(Long acuId, Integer badSuggestionTagType);
}
......@@ -35,8 +35,6 @@ public class EvaluateOrderConfigServiceImpl implements EvaluateOrderConfigServic
evaluateOrderConfig.setEvaluateLimitday(30);
evaluateOrderConfig.setDefaultContent("默认好评!");
evaluateOrderConfig.setReview(Constants.OPEN);
// evaluateOrderConfig.setReviewRemind(10);
// evaluateOrderConfig.setReviewLimitday(90);
evaluateOrderConfig.setReviewUserHidden(Constants.OPEN);
evaluateOrderConfig.setReviewTimes(1);
evaluateOrderConfig.setCommentModule(1);
......
......@@ -82,11 +82,6 @@ public class EvaluateConfigApiServiceImpl implements EvaluateConfigApiService {
List<TabEvaluateQuick> badEvaluateQuickList = evaluateQuickService.listEvaluateQuick(enterpriseId, QuickReplyTypeEnum.BAD.getCode());
List<TabEvaluateQuick> goodEvaluateQuickList = evaluateQuickService.listEvaluateQuick(enterpriseId, QuickReplyTypeEnum.GOOD.getCode());
List<TabEvaluateQuick> manageEvaluateQuickList = evaluateQuickService.listEvaluateQuick(enterpriseId, QuickReplyTypeEnum.MANAGE.getCode());
// List<String> badEvaluateQuick = Optional.ofNullable(badEvaluateQuickList).orElse(Collections.emptyList()).stream().map(TabEvaluateQuick::getTagName).collect(Collectors.toList());
// List<String> goodEvaluateQuick = Optional.ofNullable(goodEvaluateQuickList).orElse(Collections.emptyList()).stream().map(TabEvaluateQuick::getTagName).collect(Collectors.toList());
// List<String> manageEvaluateQuick = Optional.ofNullable(manageEvaluateQuickList).orElse(Collections.emptyList()).stream().map(TabEvaluateQuick::getTagName).collect(Collectors.toList());
evaluateOrderConfigDTO.setBadEvaluateQuickDTOList(EntityUtil.changeEntityListByJSON(EvaluateQuickDTO.class, badEvaluateQuickList));
evaluateOrderConfigDTO.setGoodEvaluateQuickDTOList(EntityUtil.changeEntityListByJSON(EvaluateQuickDTO.class, goodEvaluateQuickList));
evaluateOrderConfigDTO.setReplyQuickDTOList(EntityUtil.changeEntityListByJSON(EvaluateQuickDTO.class, manageEvaluateQuickList));
......
......@@ -68,9 +68,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
private StoreApiService storeApiService;
@Autowired
private EvaluateTagsService evaluateTagsService;
// @Autowired
// private NoticeRouterApiService noticeRouterApiService;
@Override
public ServiceResponse<Void> saveEvaluate(EvaluateDTO evaluateDTO) {
logger.info("保存订单评价:{}", JSON.toJSONString(evaluateDTO));
......@@ -114,19 +111,13 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
// 如果评价指标没开,需要对数据做处理
if (Constants.CLOSE.equals(evaluateOrderConfig.getGoods())) {
evaluateDTO.setGoodsScore(null);
}/* else if (evaluateDTO.getGoodsScore() == null) {
evaluateDTO.setGoodsScore(0);
}*/
}
if (Constants.CLOSE.equals(evaluateOrderConfig.getStore())) {
evaluateDTO.setStoreScore(null);
} /*else if (evaluateDTO.getStoreScore() == null) {
evaluateDTO.setStoreScore(0);
}*/
}
if (Constants.CLOSE.equals(evaluateOrderConfig.getService())) {
evaluateDTO.setServiceScore(null);
} /*else if (evaluateDTO.getServiceScore() == null) {
evaluateDTO.setServiceScore(0);
}*/
}
TabBadEvaluateConfig badEvaluateConfig = badEvaluateConfigService.getBadEvaluateConfig(evaluateDTO.getEnterpriseId());
Integer badEvaluate = isBadEvaluate(evaluateOrderConfig, badEvaluateConfig, evaluateDTO.getGoodsScore(), evaluateDTO.getStoreScore(), evaluateDTO.getServiceScore());
Integer goodEvaluate = isGoodEvaluate(evaluateOrderConfig, badEvaluateConfig, evaluateDTO.getGoodsScore(), evaluateDTO.getStoreScore(), evaluateDTO.getServiceScore());
......@@ -179,11 +170,7 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
}
}
// 是否超过期限
// TabEvaluate evaluate = this.evaluateService.getEvaluate(memberReplyDTO.getEnterpriseId(), memberReplyDTO.getEvaluateId());
// if (DateUtil.compareDate(new Date(), DateUtil.addDay(evaluate.getReceiptsDate(), evaluateOrderConfig.getReviewLimitday()))) {
// return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已超越评价期限,无法评价");
// }
TabEvaluate evaluate = this.evaluateService.getEvaluate(memberReplyDTO.getEnterpriseId(), memberReplyDTO.getEvaluateId());
if (overLimitTime(evaluateOrderConfig, evaluate.getReceiptsDate())) {
return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已超越评价期限,无法评价");
......@@ -229,7 +216,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
public ServiceResponse<Page<EvaluateDTO>> listEvaluateByStore(Integer enterpriseId, Integer storeId, Integer currentPage, Integer pageSize) {
EvaluateQO evaluateQO = new EvaluateQO();
evaluateQO.setEnterpriseId(enterpriseId);
// evaluateQO.setMemberId(evaluateOutQO.getMemberId());
evaluateQO.setStoreIdList(Collections.singletonList(storeId));
evaluateQO.setShowStatus(Constants.OPEN);
evaluateQO.setMaliciousStatus(Constants.CLOSE);
......@@ -237,10 +223,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
evaluateQO.setPageSize(pageSize);
evaluateQO.setApplet(1);
// TabEvaluateOrderConfig evaluateOrderConfig = this.evaluateOrderConfigService.getEvaluateOrderConfig(enterpriseId);
// Integer orderType = evaluateOrderConfig.getOrderType();
// evaluateQO.setOrderByField(orderType);
com.github.pagehelper.Page<TabEvaluate> topHotEvaluate = evaluateService.listEvaluateNearByStore(evaluateQO);
if (CollectionUtils.isEmpty(topHotEvaluate)) {
topHotEvaluate = new com.github.pagehelper.Page<>();
......@@ -280,9 +262,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
calendar.setTime(receiptsDate);
calendar.add(Calendar.DAY_OF_MONTH, evaluateOrderConfig.getEvaluateLimitday());
// if (Constants.OPEN.equals(evaluateOrderConfig.getReview())) {
// calendar.add(Calendar.DAY_OF_MONTH, evaluateOrderConfig.getReviewLimitday());
// }
return DateUtil.compareDate(new Date(), calendar.getTime());
}
......@@ -326,7 +305,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
@Override
public ServiceResponse<Map<Long, Integer>> queryRelayStatusByOrderId(Integer enterpriseId, List<OrderStatusQO> orderIdList) {
// logger.info("查询订单状态:{}", JSON.toJSONString(orderIdList));
Map<Long, Integer> resultMap = new HashMap<>();
TabEvaluateOrderConfig evaluateOrderConfig = evaluateOrderConfigService.getEvaluateOrderConfig(enterpriseId);
......
......@@ -39,8 +39,6 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
@Autowired
private EvaluateService evaluateService;
// @Autowired
// private EvaluateMsgLogService evaluateMsgLogService;
@Autowired
private EvaluateQuickService evaluateQuickService;
@Autowired
......@@ -92,8 +90,6 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
public ServiceResponse<Map<String, List<Map<String, Object>>>> chart4(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList) {
List<Map<String, Object>> goodChart = this.evaluateQuickService.evaluateGoodQuickChart(enterpriseId, startTime, endTime, storeIdList);
List<Map<String, Object>> badChart = this.evaluateQuickService.evaluateBadQuickChart(enterpriseId, startTime, endTime, storeIdList);
// List<Map<String, Object>> goodChart = this.evaluateService.evaluateGoodQuickChart(enterpriseId, startTime, endTime, storeIdList);
// List<Map<String, Object>> badChart = this.evaluateService.evaluateBadQuickChart(enterpriseId, startTime, endTime, storeIdList);
Map<String, List<Map<String, Object>>> map = new HashMap<>(4);
map.put("goodChart", goodChart);
......@@ -142,15 +138,11 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
).collect(Collectors.toList());
// 这里要取数据组的数据
Map<Integer, StoreOrderEvaluateDTO> orderCountMap = storeEvaluateApiService.getStoreOrderEvaluateByStoreId(storeTrendQO.getEnterpriseId(), storeIdList).getResult();
// Map<Integer, Map<String, Object>> orderCountMap = evaluateMsgLogService.orderCountByStoreId(storeTrendQO.getEnterpriseId(), storeIdList);
for (Map<String, Object> e : trendList) {
// e.put("evaluateRate", 0);
Object storeId = e.get("storeId");
if (storeId != null) {
StoreOrderEvaluateDTO storeOrderEvaluateDTO = orderCountMap.get(Integer.valueOf(storeId.toString()));
if (storeOrderEvaluateDTO != null) {
// Long totalCount = (Long) e.get("totalCount");
// Long goodCount = (Long) e.get("goodCount");
BigDecimal goodRate = (BigDecimal) e.get("goodRate");
e.put("evaluateRate", storeOrderEvaluateDTO.getEvaluateRate());
......@@ -228,19 +220,15 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
long between_days = (time2 - time1) / 86400000L;
int days = Integer.parseInt(String.valueOf(between_days));
int step = days/5;
// System.out.println(step/5);
cal1.add(Calendar.DAY_OF_MONTH, step);
Date date2 = cal1.getTime();
// System.out.println(DateUtil.dateToStr(date1, DateUtil.FORMAT_DATE_10));
cal1.add(Calendar.DAY_OF_MONTH, step);
Date date3 = cal1.getTime();
// System.out.println(DateUtil.dateToStr(date2, DateUtil.FORMAT_DATE_10));
cal1.add(Calendar.DAY_OF_MONTH, step);
Date date4 = cal1.getTime();
cal1.add(Calendar.DAY_OF_MONTH, step);
Date date5 = cal1.getTime();
// System.out.println(DateUtil.dateToStr(date3, DateUtil.FORMAT_DATE_10));
arr[0] = date1;
arr[1] = date2;
arr[2] = date3;
......
......@@ -66,13 +66,6 @@ public class ProblemOutApiServiceImpl implements ProblemOutApiService {
problemDTO.setHasOtherImage(imgList.size() > 1 ? Constants.OPEN : Constants.CLOSE);
}
// TabEvaluateOrderConfig evaluateOrderConfig = evaluateOrderConfigService.getEvaluateOrderConfig(problemDTO.getEnterpriseId());
// if (Constants.OPEN.equals(evaluateOrderConfig.getBadSuggestionTag())) {
// if (this.problemService.hasMaliciousStatusByEcuIdBeforeHours(problemDTO.getEcuId(), evaluateOrderConfig.getBadSuggestionTagType())) {
// return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "不能评论");
// }
// }
ServiceResponse<MemberUserDTO> memberUserDTOServiceResponse = memberUserApiService.getByMcuId(problemDTO.getMemberId(), problemDTO.getEnterpriseId());
if (memberUserDTOServiceResponse.isSuccess()) {
MemberUserDTO memberUserDTO = memberUserDTOServiceResponse.getResult();
......@@ -111,11 +104,6 @@ public class ProblemOutApiServiceImpl implements ProblemOutApiService {
if (problem == null) {
return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
}
// if (Constants.OPEN.equals(evaluateOrderConfig.getBadSuggestionTag())) {
// if (this.problemService.hasMaliciousStatusByEcuIdBeforeHours(problemMemberReplyDTO.getEcuId(), evaluateOrderConfig.getBadSuggestionTagType())) {
// return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "不能评论");
// }
// }
if (Constants.OPEN.equals(evaluateOrderConfig.getBadSuggestionTag())) {
if (Constants.OPEN.equals(problem.getMaliciousStatus())) {
Date date = DateUtil.addNumForHour(new Date(), -evaluateOrderConfig.getBadSuggestionTagType());
......@@ -159,8 +147,6 @@ public class ProblemOutApiServiceImpl implements ProblemOutApiService {
List<Integer> problemIdList = problemList.stream().map(ProblemDTO::getProblemId).collect(Collectors.toList());
Map<Integer, String> firstReply = problemReplyService.firstReplyByProblemId(problemIdList);
// ServiceResponse<Void> resp = this.ensure(problemList.get(0).getEnterpriseId(), ecuId);
for (ProblemDTO problemDTO : problemList) {
problemDTO.setProblemCount(problemDTO.getProblemCount() == null ? 1 : (problemDTO.getProblemCount() + 1));
problemDTO.setReplyContent(firstReply.get(problemDTO.getProblemId()));
......@@ -178,10 +164,6 @@ public class ProblemOutApiServiceImpl implements ProblemOutApiService {
.stream().map(TabProblemImg::getImgUrl).collect(Collectors.toList());
problemDTO.setImgList(imgList);
// if (!resp.isSuccess()) {
// 恶意评价 不能提交
// problemDTO.setStatus(2);
// }
}
}
return EnterpriseServiceResponse.success(problemList);
......
......@@ -71,10 +71,8 @@ public class EvaluateExportController extends DownloadUtils {
String fieldName = EvaluateFieldEnum.valueOf(fieldCode).getFieldName();
fieldNameList.add(fieldName);
}
// 开始下载
String dataContent = DataContentUtils.getDataContent();
// 生成入参数据
DownloadReport report = new DownloadReport();
//申请人ID
......@@ -100,7 +98,6 @@ public class EvaluateExportController extends DownloadUtils {
}
//调用生成方法,获取reportId
Integer reportId = DataDownloadUtils.createDownloadReport(report);
String path = request.getSession().getServletContext().getRealPath("/excel/csv/collaborator/file/");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DateUtil.FORMAT_DATETIME_19);
ExecutorPoolSingleton.getInstance().executeTask(() -> {
......@@ -116,51 +113,7 @@ public class EvaluateExportController extends DownloadUtils {
boolean hasReplyMemberContent = fieldCodeList.contains("replyMemberContent");
boolean hasReplyUserContent = fieldCodeList.contains("replyUserContent");
if (CollectionUtils.isNotEmpty(result.getResult().getResult())) {
for(EvaluateDTO resultDTO : result.getResult().getResult()) {
EvaluateDTO evaluateDTO = null;
if (hasReplyTime || hasReplyMemberContent || hasReplyUserContent) {
evaluateDTO = evaluateManageApiService.getEvaluate(resultDTO.getEnterpriseId(), resultDTO.getEvaluateId()).getResult();
}
// 追评时间
if (hasReplyTime) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyDateList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.MEMBER.getCode().equals(e.getReplyerType()))
.map(e -> simpleDateFormat.format(e.getReplyDate()))
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyDateList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyDateList.get(i)).append("\r\n");
}
resultDTO.setReplyTime(sb.toString());
}
// 追评内容
if (hasReplyMemberContent) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyMemberContentList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.MEMBER.getCode().equals(e.getReplyerType()))
.map(EvaluateReplyDTO::getReplyContent)
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyMemberContentList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyMemberContentList.get(i)).append("\r\n");
}
resultDTO.setReplyMemberContent(sb.toString());
}
// 商家回复
if (hasReplyUserContent) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyUserContentList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.USER.getCode().equals(e.getReplyerType()))
.map(EvaluateReplyDTO::getReplyContent)
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyUserContentList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyUserContentList.get(i)).append("\r\n");
}
resultDTO.setReplyUserContent(sb.toString());
}
}
parse(result, hasReplyTime, hasReplyMemberContent, hasReplyUserContent, simpleDateFormat);
}
return result.getResult().getResult();
......@@ -176,6 +129,54 @@ public class EvaluateExportController extends DownloadUtils {
return RestResponse.success(reportId);
}
private void parse(ServiceResponse<Page<EvaluateDTO>> result, boolean hasReplyTime, boolean hasReplyMemberContent, boolean hasReplyUserContent, SimpleDateFormat simpleDateFormat) {
for(EvaluateDTO resultDTO : result.getResult().getResult()) {
EvaluateDTO evaluateDTO = null;
if (hasReplyTime || hasReplyMemberContent || hasReplyUserContent) {
evaluateDTO = evaluateManageApiService.getEvaluate(resultDTO.getEnterpriseId(), resultDTO.getEvaluateId()).getResult();
}
// 追评时间
if (hasReplyTime) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyDateList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.MEMBER.getCode().equals(e.getReplyerType()))
.map(e -> simpleDateFormat.format(e.getReplyDate()))
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyDateList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyDateList.get(i)).append("\r\n");
}
resultDTO.setReplyTime(sb.toString());
}
// 追评内容
if (hasReplyMemberContent) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyMemberContentList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.MEMBER.getCode().equals(e.getReplyerType()))
.map(EvaluateReplyDTO::getReplyContent)
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyMemberContentList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyMemberContentList.get(i)).append("\r\n");
}
resultDTO.setReplyMemberContent(sb.toString());
}
// 商家回复
if (hasReplyUserContent) {
List<EvaluateReplyDTO> replyList = evaluateDTO.getReplyList();
List<String> replyUserContentList = Optional.ofNullable(replyList).orElse(Collections.emptyList()).stream()
.filter(e -> ReplyerTypeEnum.USER.getCode().equals(e.getReplyerType()))
.map(EvaluateReplyDTO::getReplyContent)
.collect(Collectors.toList());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < replyUserContentList.size(); i++) {
sb.append("(").append(i + 1).append(")").append(replyUserContentList.get(i)).append("\r\n");
}
resultDTO.setReplyUserContent(sb.toString());
}
}
}
private enum EvaluateFieldEnum{
/**
* 首次评价时间
......
......@@ -166,9 +166,6 @@ public class EvaluateOverviewController {
storeScoreQO.setEndTime(storeScoreQO.getEndTime() + " 23:59:59");
}
ServiceResponse<Page<Map<String, Object>>> serviceResponse = evaluateOverviewApiService.listStoreScore(storeScoreQO);
// ServiceResponse<Map<String, Object>> totalStoreScore = evaluateOverviewApiService.getTotalStoreScore(storeScoreQO);
// List<Map<String, Object>> result = serviceResponse.getResult().getResult();
// result.add(0, totalStoreScore.getResult());
return ResultControllerUtils.commonResult(serviceResponse);
}
......
......@@ -139,7 +139,10 @@ public class ProblemExportController extends DownloadUtils {
};
try {
//参数说明:excelExtensionCode,Excel后缀名code ,枚举类:ExcelExtensionEnum, Arrays.asList("phone")这个phone是需要加密的字段
/*
//参数说明:excelExtensionCode,Excel后缀名code ,枚举类:ExcelExtensionEnum,
// Arrays.asList("phone")这个phone是需要加密的字段
*/
download(path, reportId, exportQO.getFileName(), exportQO.getExcelExtension(), fieldNameList, fieldCodeList, loader, Arrays.asList("memberPhone"), null);
} catch (Exception e) {
logger.warn("下载错误", e);
......
......@@ -137,33 +137,37 @@ public class ExcelUtils {
// 让列宽随着导出的列长自动适应
for (int colNum = 0; colNum < columnNum; colNum++) {
int columnWidth = sheet.getColumnWidth(colNum) / 256;
for (int rowNum = 0; rowNum < sheet.getLastRowNum(); rowNum++) {
XSSFRow currentRow;
// 当前行未被使用过
if (sheet.getRow(rowNum) == null) {
currentRow = sheet.createRow(rowNum);
} else {
currentRow = sheet.getRow(rowNum);
}
if (currentRow.getCell(colNum) != null) {
XSSFCell currentCell = currentRow.getCell(colNum);
if (currentCell.getCellType() == XSSFCell.CELL_TYPE_STRING) {
int length = currentCell.getStringCellValue()
.getBytes().length;
if (columnWidth < length) {
columnWidth = length;
}
rowHeightAdaptive(sheet, colNum);
}
return workbook;
}
private static void rowHeightAdaptive(XSSFSheet sheet, int colNum) {
int columnWidth = sheet.getColumnWidth(colNum) / 256;
for (int rowNum = 0; rowNum < sheet.getLastRowNum(); rowNum++) {
XSSFRow currentRow;
// 当前行未被使用过
if (sheet.getRow(rowNum) == null) {
currentRow = sheet.createRow(rowNum);
} else {
currentRow = sheet.getRow(rowNum);
}
if (currentRow.getCell(colNum) != null) {
XSSFCell currentCell = currentRow.getCell(colNum);
if (currentCell.getCellType() == XSSFCell.CELL_TYPE_STRING) {
int length = currentCell.getStringCellValue()
.getBytes().length;
if (columnWidth < length) {
columnWidth = length;
}
}
}
if (colNum == 0) {
sheet.setColumnWidth(colNum, (columnWidth - 2) * 256);
} else {
sheet.setColumnWidth(colNum, (columnWidth + 4) * 256);
}
}
return workbook;
if (colNum == 0) {
sheet.setColumnWidth(colNum, (columnWidth - 2) * 256);
} else {
sheet.setColumnWidth(colNum, (columnWidth + 4) * 256);
}
}
private static XSSFCellStyle getTitleStyle(XSSFWorkbook workbook) {
......@@ -191,19 +195,15 @@ public class ExcelUtils {
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style.setFont(font);
// 设置自动换行;
......@@ -225,9 +225,7 @@ public class ExcelUtils {
// 设置字体
XSSFFont font = workbook.createFont();
// 设置字体大小
// font.setFontHeightInPoints((short)10);
// 字体加粗
// font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font.setFontName("Courier New");
font.setColor(IndexedColors.RED.index);
......@@ -236,19 +234,15 @@ public class ExcelUtils {
// 设置底边框;
style.setBorderBottom(XSSFCellStyle.BORDER_THIN);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style.setBorderLeft(XSSFCellStyle.BORDER_THIN);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style.setBorderRight(XSSFCellStyle.BORDER_THIN);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style.setBorderTop(XSSFCellStyle.BORDER_THIN);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style.setFont(font);
// 设置自动换行;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment