|
|
@@ -8,6 +8,7 @@ import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.param.ConfirmPatientAndAddressParam;
|
|
|
import com.fs.app.param.FsDoctorRegisterParam;
|
|
|
import com.fs.app.param.FsUserEditParam;
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.exception.CustomException;
|
|
|
@@ -21,6 +22,7 @@ import com.fs.his.domain.FsDoctor;
|
|
|
import com.fs.his.domain.FsPackage;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.dto.FindUsersByDTO;
|
|
|
+import com.fs.his.dto.UserBehaviorReportDTO;
|
|
|
import com.fs.his.param.FindUserByParam;
|
|
|
import com.fs.his.param.FsUserCouponUParam;
|
|
|
import com.fs.his.param.FsUserEditPushParam;
|
|
|
@@ -89,6 +91,9 @@ public class UserController extends AppBaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ICompanyUserService companyUserService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IUserBehaviorService userBehaviorService;
|
|
|
@Login
|
|
|
@ApiOperation("获取用户信息")
|
|
|
@PostMapping("/friendsSearch")
|
|
|
@@ -434,4 +439,23 @@ public class UserController extends AppBaseController {
|
|
|
userService.confirmPatientAndAddress(Long.parseLong(getUserId()), param.getPatientId(), param.getUserAddressId());
|
|
|
return R.ok();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单条埋点上报
|
|
|
+ * 前端在APP启动或切后台时调用此接口
|
|
|
+ *
|
|
|
+ * @param dto 埋点数据
|
|
|
+ * - userId: 用户ID(必填)
|
|
|
+ * - sessionId: 会话ID,每次启动生成一个唯一ID(必填)
|
|
|
+ * - eventType: 事件类型,1=启动,2=切后台(必填)
|
|
|
+ * - eventTime: 事件发生时间(必填)
|
|
|
+ * - duration: 使用时长,单位秒(切后台时必填)
|
|
|
+ * @return 操作结果
|
|
|
+ */
|
|
|
+ @ApiOperation("单条埋点上报")
|
|
|
+ @PostMapping("/report")
|
|
|
+ public AjaxResult report(@RequestBody UserBehaviorReportDTO dto) {
|
|
|
+ userBehaviorService.reportBehavior(dto);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
}
|