|
@@ -1,6 +1,7 @@
|
|
|
package com.citu.module.menduner.system.service.hunt;
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.map.MapUtil;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.common.util.object.BeanUtils;
|
|
@@ -11,6 +12,8 @@ import com.citu.module.menduner.system.controller.base.hunt.HuntSubmitReqVO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.hunt.HuntDO;
|
|
|
import com.citu.module.menduner.system.dal.mysql.hunt.HuntMapper;
|
|
|
import com.citu.module.menduner.system.enums.hunt.HuntStatusEnum;
|
|
|
+import com.citu.module.menduner.system.util.MessageUtils;
|
|
|
+import com.citu.module.system.api.notify.dto.NotifySendSingleToUserReqDTO;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
@@ -19,6 +22,7 @@ import java.util.List;
|
|
|
|
|
|
import static com.citu.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
import static com.citu.framework.common.util.servlet.ServletUtils.getClientIP;
|
|
|
+import static com.citu.module.menduner.common.CommonConstants.NOTIFY_SYS_HUNTER_SERVICE;
|
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.HUNT_NOT_EXISTS;
|
|
|
import static com.citu.module.menduner.system.enums.ErrorCodeConstants.HUNT_PHONE_FREQUENT;
|
|
|
|
|
@@ -34,6 +38,9 @@ public class HuntServiceImpl implements HuntService {
|
|
|
@Resource
|
|
|
private HuntMapper huntMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private MessageUtils messageUtils;
|
|
|
+
|
|
|
@Override
|
|
|
public Long createHunt(HuntSaveReqVO createReqVO) {
|
|
|
// 插入
|
|
@@ -99,5 +106,15 @@ public class HuntServiceImpl implements HuntService {
|
|
|
hunt.setStatus(HuntStatusEnum.WAIT_PROCESSED.getStatus());
|
|
|
hunt.setIp(ip);
|
|
|
huntMapper.insert(hunt);
|
|
|
+ // 发送系统通知
|
|
|
+ messageUtils.sendPlatformSystemNotifyMessage(
|
|
|
+ new NotifySendSingleToUserReqDTO()
|
|
|
+ .setTemplateCode(NOTIFY_SYS_HUNTER_SERVICE)
|
|
|
+ .setTemplateParams(
|
|
|
+ MapUtil.<String, Object>builder()
|
|
|
+ .put("1", reqVO.getName())
|
|
|
+ .build()
|
|
|
+ ));
|
|
|
+
|
|
|
}
|
|
|
}
|