diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysServiceQuestionController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysServiceQuestionController.java deleted file mode 100644 index 4f7cf6fb7..000000000 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysServiceQuestionController.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.stdiet.web.controller.custom; - -import com.stdiet.common.core.controller.BaseController; -import com.stdiet.common.core.domain.AjaxResult; -import com.stdiet.common.core.page.TableDataInfo; -import com.stdiet.common.utils.StringUtils; -import com.stdiet.custom.domain.SysServicesQuestion; -import com.stdiet.custom.service.ISysServicesQuestionService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -@RestController -@RequestMapping("/services/question") -public class SysServiceQuestionController extends BaseController { - - @Autowired - private ISysServicesQuestionService sysServicesQuestionService; - - @GetMapping("/list") - public TableDataInfo list(SysServicesQuestion sysServicesQuestion) { - startPage(); - return getDataTable(sysServicesQuestionService.selectSysServicesQuestionByUserIdAndRole(sysServicesQuestion)); - } - -// @PutMapping("/update/status") -// public AjaxResult status(@RequestBody SysServicesQuestion sysServicesQuestion) { -// return toAjax(sysServicesQuestionService.updateSysServicesQuestionStatus(sysServicesQuestion)); -// } - - @PostMapping("/reply") - public AjaxResult reply(@RequestBody SysServicesQuestion servicesQuestion) { - int row = sysServicesQuestionService.inserSysServicesQuestionReply(servicesQuestion); - if (row > 0) { - // 更新customer未读,id不能有值 - servicesQuestion.setRead(0); - sysServicesQuestionService.updateSysServicesQuestionStatus(servicesQuestion); - } - return toAjax(row); - } - - @GetMapping("/detail") - public AjaxResult detail(@RequestParam String queId, @RequestParam Long id) { - List questions = sysServicesQuestionService.selectSysServicesQuestionSessionByQueId(queId); - if (StringUtils.isNotNull(questions)) { - // 更新问题对应角色的状态 - SysServicesQuestion servicesQuestion = new SysServicesQuestion(); - servicesQuestion.setRead(1); - servicesQuestion.setId(id); - sysServicesQuestionService.updateSysServicesQuestionStatus(servicesQuestion); - } - return AjaxResult.success(questions); - } -} diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java index f012f7582..6a3add4a0 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java @@ -69,8 +69,6 @@ public class WechatAppletController extends BaseController { @Autowired private IWechatAppletService iWechatAppletService; @Autowired - private ISysServicesQuestionService iSysServicesQuestionService; - @Autowired private ISysServicesTopicService iSysServicesTopicService; /** @@ -594,17 +592,33 @@ public class WechatAppletController extends BaseController { return AjaxResult.success(sysRecipesPlanService.updateSysRecipesPlan(info)); } - @GetMapping("/services/list") + + /** + * 主题列表 + * + * @param customerId + * @param pageNum + * @param pageSize + * @return + */ + @GetMapping("/services/topic/list") public TableDataInfo fetchServiceQuestion(@RequestParam String customerId, @RequestParam Integer pageNum, @RequestParam Integer pageSize) { startPage(); - Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L; + String cusId = StringUtils.isNotEmpty(customerId) ? AesUtils.decrypt(customerId) : "0"; - SysServicesQuestion servicesQuestion = new SysServicesQuestion(); - servicesQuestion.setRole("customer"); - servicesQuestion.setUserId(cusId); + SysServicesTopic topic = new SysServicesTopic(); + topic.setRole("customer"); + topic.setUid(cusId); - return getDataTable(iSysServicesQuestionService.selectSysServicesQuestionByUserIdAndRole(servicesQuestion)); + List list = iSysServicesTopicService.selectSysServicesTopicByUserIdAndRole(topic); + if (StringUtils.isNotNull(list)) { + for (SysServicesTopic tTopic : list) { + tTopic.setUid(AesUtils.encrypt(tTopic.getUid())); + } + } + + return getDataTable(list); } /** @@ -616,8 +630,8 @@ public class WechatAppletController extends BaseController { */ @PostMapping("/services/topic/post") public AjaxResult postServiceTopic(@RequestBody SysServicesTopic topic, @RequestParam String customerId) { - Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L; - if (cusId == 0L) { + String cusId = StringUtils.isNotEmpty(customerId) ? AesUtils.decrypt(customerId) : "0"; + if (StringUtils.isEmpty(cusId)) { return toAjax(0); } topic.setUid(cusId); @@ -625,48 +639,22 @@ public class WechatAppletController extends BaseController { return AjaxResult.success(iSysServicesTopicService.insertSysServicesTopic(topic)); } - /** - * 客户添加问题 - * - * @param servicesQuestion - * @param customerId - * @return - */ - @PostMapping("/services/post") - public AjaxResult postServiceQuestion(@RequestBody SysServicesQuestion servicesQuestion, @RequestParam String customerId) { - Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L; - if (cusId == 0L) { - return toAjax(0); - } - servicesQuestion.setCusId(cusId); - - return AjaxResult.success(iSysServicesQuestionService.insertSysServicesQuestion(servicesQuestion)); - } /** * 回答问题 * - * @param servicesQuestion - * @param customerId + * @param topic * @return */ - @PostMapping("/services/post/reply") - public AjaxResult replyServiceQuestion(@RequestBody SysServicesQuestion servicesQuestion, @RequestParam String customerId) { - Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L; - if (cusId == 0L) { - return toAjax(0); - } - servicesQuestion.setRole("customer"); - servicesQuestion.setUserId(cusId); + @PostMapping("/services/topic/reply") + public AjaxResult replyServiceTopic(@RequestBody SysServicesTopic topic, @RequestParam Integer type) { - int row = iSysServicesQuestionService.inserSysServicesQuestionReply(servicesQuestion); - if (row > 0) { - // 更新三个觉得未读,id不能有值 - servicesQuestion.setRead(0); - iSysServicesQuestionService.updateSysServicesQuestionStatus(servicesQuestion); - } + topic.setFromUid(AesUtils.decrypt(topic.getFromUid())); + topic.setToUid(AesUtils.decrypt(topic.getToUid())); - return toAjax(row); + SysServicesTopic servicesTopic = type == 0 ? iSysServicesTopicService.inserSysServicesTopicComment(topic) : iSysServicesTopicService.inserSysServicesTopicReply(topic); + + return AjaxResult.success(servicesTopic); } /** @@ -675,16 +663,32 @@ public class WechatAppletController extends BaseController { * @param id * @return */ - @GetMapping("/services/detail") - public AjaxResult serviceQuestionDetail(@RequestParam String queId, @RequestParam Long id) { - List questions = iSysServicesQuestionService.selectSysServicesQuestionSessionByQueId(queId); - if (StringUtils.isNotNull(questions)) { - SysServicesQuestion status = new SysServicesQuestion(); + @GetMapping("/services/topic/detail") + public AjaxResult serviceTopicDetail(@RequestParam String topicId, @RequestParam String id) { + List topics = iSysServicesTopicService.selectSysServicesTopicSessionByTopicId(topicId); + if (StringUtils.isNotNull(topics)) { + SysServicesTopic status = new SysServicesTopic(); status.setId(id); status.setRead(1); - iSysServicesQuestionService.updateSysServicesQuestionStatus(status); + iSysServicesTopicService.updateSysServicesTopicStatus(status); + + for (SysServicesTopic topic : topics) { + topic.setUid(AesUtils.encrypt(topic.getUid())); + if (StringUtils.isNotNull(topic.getComments())) { + for (SysServicesTopic cTopic : topic.getComments()) { + cTopic.setFromUid(AesUtils.encrypt(cTopic.getFromUid())); + cTopic.setToUid(AesUtils.encrypt(cTopic.getToUid())); + if (StringUtils.isNotNull(cTopic.getReplys())) { + for (SysServicesTopic rTopic : cTopic.getReplys()) { + rTopic.setFromUid(AesUtils.encrypt(rTopic.getFromUid())); + rTopic.setToUid(AesUtils.encrypt(rTopic.getToUid())); + } + } + } + } + } } - return AjaxResult.success(questions); + return AjaxResult.success(topics); } diff --git a/stdiet-common/src/main/java/com/stdiet/common/core/controller/BaseController.java b/stdiet-common/src/main/java/com/stdiet/common/core/controller/BaseController.java index 250614f38..7a4643171 100644 --- a/stdiet-common/src/main/java/com/stdiet/common/core/controller/BaseController.java +++ b/stdiet-common/src/main/java/com/stdiet/common/core/controller/BaseController.java @@ -64,13 +64,18 @@ public class BaseController { PageDomain pageDomain = TableSupport.buildPageRequest(); Integer pageNum = pageDomain.getPageNum(); Integer pageSize = pageDomain.getPageSize(); - long total = new PageInfo(list).getTotal(); + List rows; + if (StringUtils.isNull(pageNum) || StringUtils.isNull(pageSize)) { + rows = list; + } else { + rows = total > pageSize * (pageNum - 1) ? list : new ArrayList<>(); + } TableDataInfo rspData = new TableDataInfo(); rspData.setCode(HttpStatus.SUCCESS); rspData.setMsg("查询成功"); - rspData.setRows(total > pageSize * (pageNum - 1) ? list : new ArrayList<>()); + rspData.setRows(rows); rspData.setTotal(total); return rspData; } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesQuestion.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesQuestion.java deleted file mode 100644 index 5e94155ef..000000000 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesQuestion.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.stdiet.custom.domain; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; - -import java.util.Date; - -@Data -public class SysServicesQuestion { - /** - * 问题状态id - */ - Long id; - - /** - * 问题id(搜索用) - */ - String queId; - - /** - * 客户id - */ - Long cusId; - - /** - * 问题内容 - */ - String content; - - - /** - * 图片地址 - */ - JSONArray img; - - /** - * 问题类型 - */ - Integer type; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - Date createTime; - - /** - * 0-未读 1-已读 - */ - Integer read; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - Date updateTime; - - /** - * 角色 - */ - String role; - - // 非持久化字段 - /** - * 角色名字 - */ - String name; - - /** - * 角色id - */ - Long userId; - -} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java index d76cf691a..f465d7522 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java @@ -35,11 +35,11 @@ public class SysServicesTopic { /** * 角色 */ - Long uid; + String uid; - Long fromUid; + String fromUid; - Long toUid; + String toUid; /** * 问题内容 diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesQuestionMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesQuestionMapper.java deleted file mode 100644 index f38e1d949..000000000 --- a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesQuestionMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.stdiet.custom.mapper; - -import com.stdiet.custom.domain.SysServicesQuestion; - -import java.util.List; - -public interface SysServicesQuestionMapper { - List selectSysServicesQuestionByUserIdAndRole(SysServicesQuestion servicesQuestion); - - int insertSysServicesQuestion(SysServicesQuestion servicesQuestion); - - int insertSysServicesQuestionStatus(List servicesQuestion); - - int updateSysServicesQuestionStatus(SysServicesQuestion servicesQuestion); - - int inserSysServicesQuestionReply(SysServicesQuestion servicesQuestion); - - List selectSysServicesQuestionSessionByQueId(String queId); -} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java index 29ecaadaa..333417f81 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysServicesTopicMapper.java @@ -1,6 +1,5 @@ package com.stdiet.custom.mapper; -import com.stdiet.custom.domain.SysServicesQuestion; import com.stdiet.custom.domain.SysServicesTopic; import java.util.List; diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesQuestionService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesQuestionService.java deleted file mode 100644 index f671b9268..000000000 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesQuestionService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.stdiet.custom.service; - -import com.stdiet.custom.domain.SysServicesQuestion; - -import java.util.List; - -public interface ISysServicesQuestionService { - - List selectSysServicesQuestionByUserIdAndRole(SysServicesQuestion servicesQuestion); - - SysServicesQuestion insertSysServicesQuestion(SysServicesQuestion servicesQuestion); - - int updateSysServicesQuestionStatus(SysServicesQuestion sysServicesQuestion); - - int inserSysServicesQuestionReply(SysServicesQuestion sysServicesQuestion); - - List selectSysServicesQuestionSessionByQueId(String queId); -} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java index dedfe3873..1b9b14291 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysServicesTopicService.java @@ -1,6 +1,5 @@ package com.stdiet.custom.service; -import com.stdiet.custom.domain.SysServicesQuestion; import com.stdiet.custom.domain.SysServicesTopic; import java.util.List; diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesQuestionServiceImp.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesQuestionServiceImp.java deleted file mode 100644 index fbaca72b1..000000000 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesQuestionServiceImp.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.stdiet.custom.service.impl; - -import com.stdiet.common.utils.DateUtils; -import com.stdiet.common.utils.uuid.UUID; -import com.stdiet.custom.domain.SysCustomer; -import com.stdiet.custom.domain.SysServicesQuestion; -import com.stdiet.custom.mapper.SysCustomerMapper; -import com.stdiet.custom.mapper.SysServicesQuestionMapper; -import com.stdiet.custom.service.ISysServicesQuestionService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -@Service -public class SysServicesQuestionServiceImp implements ISysServicesQuestionService { - @Autowired - SysServicesQuestionMapper servicesQuestionMapper; - - @Autowired - SysCustomerMapper sysCustomerMapper; - - @Override - public List selectSysServicesQuestionByUserIdAndRole(SysServicesQuestion servicesQuestion) { - return servicesQuestionMapper.selectSysServicesQuestionByUserIdAndRole(servicesQuestion); - } - - @Override - public SysServicesQuestion insertSysServicesQuestion(SysServicesQuestion servicesQuestion) { - // 生成uuid - servicesQuestion.setQueId(UUID.randomUUID().toString().replaceAll("-", "")); - servicesQuestion.setRead(1); - servicesQuestion.setCreateTime(DateUtils.getNowDate()); - - servicesQuestionMapper.insertSysServicesQuestion(servicesQuestion); - - SysCustomer customer = sysCustomerMapper.selectSysCustomerById(servicesQuestion.getCusId()); - - List statusList = new ArrayList<>(); - SysServicesQuestion customerStatus = new SysServicesQuestion(); - customerStatus.setUserId(customer.getId()); - customerStatus.setRole("customer"); - customerStatus.setRead(1); - customerStatus.setQueId(servicesQuestion.getQueId()); - statusList.add(customerStatus); - - SysServicesQuestion dieticianStatus = new SysServicesQuestion(); - dieticianStatus.setUserId(customer.getMainDietitian()); - dieticianStatus.setRole("dietician"); - dieticianStatus.setRead(0); - dieticianStatus.setQueId(servicesQuestion.getQueId()); - statusList.add(dieticianStatus); - - SysServicesQuestion afterSaleStatus = new SysServicesQuestion(); - afterSaleStatus.setUserId(customer.getAfterDietitian()); - afterSaleStatus.setRole("after_sale"); - afterSaleStatus.setRead(0); - afterSaleStatus.setQueId(servicesQuestion.getQueId()); - statusList.add(afterSaleStatus); - - SysServicesQuestion dieticianAssistantStatus = new SysServicesQuestion(); - dieticianAssistantStatus.setUserId(customer.getAssistantDietitian()); - dieticianAssistantStatus.setRole("dietician_assistant"); - dieticianAssistantStatus.setRead(0); - dieticianAssistantStatus.setQueId(servicesQuestion.getQueId()); - - statusList.add(dieticianAssistantStatus); - - servicesQuestionMapper.insertSysServicesQuestionStatus(statusList); - - servicesQuestion.setId(customerStatus.getId()); - servicesQuestion.setCusId(null); - - return servicesQuestion; - } - - - @Override - public int updateSysServicesQuestionStatus(SysServicesQuestion sysServicesQuestion) { - return servicesQuestionMapper.updateSysServicesQuestionStatus(sysServicesQuestion); - } - - @Override - public int inserSysServicesQuestionReply(SysServicesQuestion sysServicesQuestion) { - int row = servicesQuestionMapper.inserSysServicesQuestionReply(sysServicesQuestion); - if (row > 0) { - // 设置未读 - SysServicesQuestion status = new SysServicesQuestion(); - status.setRead(0); - status.setQueId(sysServicesQuestion.getQueId()); - status.setRole(sysServicesQuestion.getRole()); - servicesQuestionMapper.updateSysServicesQuestionStatus(status); - } - return row; - } - - @Override - public List selectSysServicesQuestionSessionByQueId(String queId) { - return servicesQuestionMapper.selectSysServicesQuestionSessionByQueId(queId); - } -} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java index a66a0b3dd..dcecfdd49 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysServicesTopicServiceImp.java @@ -36,33 +36,33 @@ public class SysServicesTopicServiceImp implements ISysServicesTopicService { servicesTopicMapper.insertSysServicesTopic(topic); - SysCustomer customer = sysCustomerMapper.selectSysCustomerById(topic.getUid()); + SysCustomer customer = sysCustomerMapper.selectSysCustomerById(Long.parseLong(topic.getUid())); List statusList = new ArrayList<>(); SysServicesTopic customerStatus = new SysServicesTopic(); - customerStatus.setUid(customer.getId()); + customerStatus.setUid(String.valueOf(customer.getId())); customerStatus.setRole("customer"); customerStatus.setRead(1); customerStatus.setTopicId(topic.getTopicId()); statusList.add(customerStatus); SysServicesTopic dieticianStatus = new SysServicesTopic(); - dieticianStatus.setUid(customer.getMainDietitian()); + dieticianStatus.setUid(String.valueOf(customer.getMainDietitian())); dieticianStatus.setRole("dietician"); dieticianStatus.setRead(0); dieticianStatus.setTopicId(topic.getTopicId()); statusList.add(dieticianStatus); SysServicesTopic afterSaleStatus = new SysServicesTopic(); - afterSaleStatus.setUid(customer.getAfterDietitian()); + afterSaleStatus.setUid(String.valueOf(customer.getAfterDietitian())); afterSaleStatus.setRole("after_sale"); afterSaleStatus.setRead(0); afterSaleStatus.setTopicId(topic.getTopicId()); statusList.add(afterSaleStatus); SysServicesTopic dieticianAssistantStatus = new SysServicesTopic(); - dieticianAssistantStatus.setUid(customer.getAssistantDietitian()); + dieticianAssistantStatus.setUid(String.valueOf(customer.getAssistantDietitian())); dieticianAssistantStatus.setRole("dietician_assistant"); dieticianAssistantStatus.setRead(0); dieticianAssistantStatus.setTopicId(topic.getTopicId()); diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysServicesQuestionMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysServicesQuestionMapper.xml deleted file mode 100644 index 964e6d196..000000000 --- a/stdiet-custom/src/main/resources/mapper/custom/SysServicesQuestionMapper.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert into sys_services_question - - que_id, - cus_id, - content, - type, - create_time, - img, - - - #{queId}, - #{cusId}, - #{content}, - #{type}, - #{createTime}, - - #{img, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, - - - - - - - insert into sys_services_question_status (que_id, user_id, role, `read`, create_time, update_time) values - - (#{status.queId}, #{status.userId}, #{status.role}, #{status.read}, now(), now()) - - - - - - update sys_services_question_status - - `read` = #{read}, - update_time = now(), - - - - - id = ${id} - - - - role != #{role} and - - - role = 'customer' and - - que_id = #{queId} - - - - - - - - insert into sys_services_question_session - - que_id, - user_id, - content, - `read`, - role, - img, - create_time, - update_time, - - - - #{queId}, - #{userId}, - #{content}, - #{read}, - #{role}, - - #{img, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, - - now(), - now(), - - - - - \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml index d309926c4..947d75729 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml @@ -40,7 +40,6 @@ - @@ -50,7 +49,7 @@ - + @@ -65,25 +64,27 @@ - + + + - + - - @@ -202,7 +199,7 @@ - insert into sys_services_topic_reply diff --git a/stdiet-framework/src/main/java/com/stdiet/framework/config/properties/DruidProperties.java b/stdiet-framework/src/main/java/com/stdiet/framework/config/properties/DruidProperties.java index cbe94f040..07aaf2739 100644 --- a/stdiet-framework/src/main/java/com/stdiet/framework/config/properties/DruidProperties.java +++ b/stdiet-framework/src/main/java/com/stdiet/framework/config/properties/DruidProperties.java @@ -73,8 +73,8 @@ public class DruidProperties /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ datasource.setTestOnReturn(testOnReturn); - datasource.setRemoveAbandoned(true); - datasource.setRemoveAbandonedTimeout(180); +// datasource.setRemoveAbandoned(true); +// datasource.setRemoveAbandonedTimeout(180); return datasource; } }