Commit 8f16b596 by 阳浪

登录添加埋点

parent 19d686ae
......@@ -20,20 +20,19 @@ import java.util.List;
* @create 2025-01-14 10:57:55
*/
@RestController
@RequestMapping("/api/eventTrack")
public class EventTrackController {
@Autowired
private EventTrackService eventTrackService;
@GetMapping("/addEvent")
@GetMapping("/api/eventTrack/addEvent")
public void addEvent(@RequestParam("type") String type, @RequestParam("businessId") Long businessId){
eventTrackService.addEvent(type,businessId);
}
@GetMapping("/getTodayNum")
@GetMapping("/api/eventTrack/getTodayNum")
public EventTrackDayNumVo getTodayNum(@RequestParam(value = "date",required = false) String date){
return eventTrackService.getTodayNum(date);
}
......
......@@ -67,9 +67,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
eventTrack.setDeptName(authzUserGroupVo.getName());
}
String key = "event_track_type";
Response<List<Dictionary>> response = dictionaryFeignClients.listChildDictionary(key,false,1);
if(response!=null&&response.getData()!=null){
List<Dictionary> dictionaryList = (List<Dictionary>)response.getData();
List<Dictionary> dictionaryList = dictionaryFeignClients.listChildDictionary(key,false,1);
if(CollUtil.isNotEmpty(dictionaryList)){
Optional<Dictionary> optional = dictionaryList.stream().filter(d-> Objects.equals(d.getCode(),key+"_"+type)).findFirst();
if(optional!=null&&optional.isPresent()){
......@@ -78,7 +76,6 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
eventTrack.setType(Integer.valueOf(dictionary.getDescription()));
}
}
}
eventTrack.setId(idGenerator.generate());
this.insert(eventTrack);
}
......
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