|
@@ -0,0 +1,39 @@
|
|
|
+package com.ozs.web.controller.app;
|
|
|
+
|
|
|
+import com.ozs.common.core.controller.BaseController;
|
|
|
+import com.ozs.common.core.domain.AjaxResult;
|
|
|
+import com.ozs.common.utils.StringUtils;
|
|
|
+import com.ozs.service.entity.UserRegistrationid;
|
|
|
+import com.ozs.service.service.UserRegistrationidService;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author : sunhh
|
|
|
+ * @create 2023/3/14 16:36
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequestMapping("/jPushApp")
|
|
|
+public class JPushAppController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private UserRegistrationidService userRegistrationidService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 存储RegistrationID
|
|
|
+ */
|
|
|
+ @PostMapping("/addRegistrationID")
|
|
|
+ @ApiOperation("存储RegistrationID")
|
|
|
+ public AjaxResult addRegistrationID(@RequestBody UserRegistrationid userRegistrationid) {
|
|
|
+ if (StringUtils.isBlank(userRegistrationid.getUserId()) || StringUtils.isBlank(userRegistrationid.getRegistrationId())) {
|
|
|
+ return AjaxResult.error("userId,RegistrationID 不能为空!");
|
|
|
+ }
|
|
|
+ return toAjax(userRegistrationidService.addRegistrationID(userRegistrationid));
|
|
|
+ }
|
|
|
+}
|