|
@@ -17,6 +17,7 @@ import com.sxtvs.open.api.clue.dto.WxReply;
|
|
|
import com.sxtvs.open.api.clue.entity.*;
|
|
|
import com.sxtvs.open.api.clue.mapper.ClueMapper;
|
|
|
import com.sxtvs.open.api.clue.service.IClueService;
|
|
|
+import com.sxtvs.open.api.h5template.service.impl.OSSService;
|
|
|
import com.sxtvs.open.core.advice.BizException;
|
|
|
import com.sxtvs.open.core.sls.AliyunLogger;
|
|
|
import jakarta.annotation.Resource;
|
|
@@ -58,6 +59,9 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements IC
|
|
|
@Resource
|
|
|
private AliyunLogger logger;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private OSSService ossService;
|
|
|
+
|
|
|
public IPage<Clue> cluePage(ClueDTO clueDTO){
|
|
|
|
|
|
LambdaQueryWrapper<Clue> wrapper = Wrappers.lambdaQuery();
|
|
@@ -188,8 +192,16 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements IC
|
|
|
info1.setAddUser(wxMessage.getFromUserName());
|
|
|
info1.setAddTime(addTime);
|
|
|
info1.setRelaId(last.getId());
|
|
|
- info1.setMaterialUrl(wxMessage.getContent());
|
|
|
info1.setType(getMediaType(wxMessage.getMsgType()));
|
|
|
+ if(wxMessage.getMsgType().equals("text")){
|
|
|
+ info1.setMaterialUrl(wxMessage.getContent());
|
|
|
+ }else {
|
|
|
+ String url = ossService.urlPut(wxMessage.getPicUrl(), "jpg");
|
|
|
+ info1.setMaterialUrl(wxMessage.getPicUrl());
|
|
|
+ info1.setLocalUrl(url);
|
|
|
+ info1.setWechatMaterialId(wxMessage.getMediaId());
|
|
|
+ }
|
|
|
+
|
|
|
clueInfoService.save(info1);
|
|
|
|
|
|
}else if(wxMessage.getMsgType().equals("text")){
|