This commit is contained in:
2025-01-13 10:26:18 +08:00
parent 9c1d979bd8
commit 02548a3028
33 changed files with 399 additions and 222 deletions

View File

@ -4,12 +4,15 @@ package com.ycwl.basic.controller.mobile;
import com.alibaba.fastjson.JSONObject;
import com.ycwl.basic.annotation.IgnoreToken;
import com.ycwl.basic.model.wx.WechatMessageSubscribeForm;
import com.ycwl.basic.repository.ScenicRepository;
import com.ycwl.basic.service.mobile.WxNotifyService;
import com.ycwl.basic.utils.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -30,20 +33,43 @@ import java.util.List;
public class AppWxNotifyController {
@Autowired
private WxNotifyService wxNotifyService;
@Autowired
private ScenicRepository scenicRepository;
//
// @ApiOperation(value = "通知", notes = "通知")
// @PostMapping("/pushMessage")
// @IgnoreToken
// public ApiResponse<?> pushMessage(@RequestBody WechatMessageSubscribeForm req) {
// JSONObject resJson = wxNotifyService.pushMessage(req);
// return ApiResponse.success(resJson);
// }
@ApiOperation(value = "通知", notes = "通知")
@PostMapping("/pushMessage")
@IgnoreToken
public ApiResponse<?> pushMessage(@RequestBody WechatMessageSubscribeForm req) {
JSONObject resJson = wxNotifyService.pushMessage(req);
return ApiResponse.success(resJson);
}
@GetMapping("/getIds")
@GetMapping({"/getIds", "/"})
@IgnoreToken
public ApiResponse<List<String>> getIds() {
return ApiResponse.success(new ArrayList<String>() {{
add("5b8vTm7kvwYubqDxb3dxBqFIhc3Swt5l7QHSK5r-ZRI");
add("5b8vTm7kvwYubqDxb3dxBs0BqxMsgVgGw573aahTEd8");
add("vPIzbkA0x4mMj-vdbWx6_45e8juWXzs3FGYnDsIPv3A");
add("HB1vp-0BXc2WyYeoYN3a3GuZV9HtPLXUTT7blCBq9eY");
}});
}
@GetMapping("/{scenicId}")
@IgnoreToken
public ApiResponse<List<String>> getIds(@PathVariable("scenicId") Long scenicId) {
return ApiResponse.success(new ArrayList<String>() {{
String videoGeneratedTemplateId = scenicRepository.getVideoGeneratedTemplateId(scenicId);
if (StringUtils.isNotBlank(videoGeneratedTemplateId)) {
add(videoGeneratedTemplateId);
}
String videoDownloadTemplateId = scenicRepository.getVideoDownloadTemplateId(scenicId);
if (StringUtils.isNotBlank(videoDownloadTemplateId)) {
add(videoDownloadTemplateId);
}
String videoPreExpireTemplateId = scenicRepository.getVideoPreExpireTemplateId(scenicId);
if (StringUtils.isNotBlank(videoPreExpireTemplateId)) {
add(videoPreExpireTemplateId);
}
}});
}

View File

@ -54,11 +54,6 @@ public class FaceController {
public ApiResponse<Integer> deleteByIds(@RequestBody List<Long> ids) {
return faceService.deleteByIds(ids);
}
@ApiOperation("修改用户人脸信息")
@PostMapping("/update")
public ApiResponse<Integer> update(@RequestBody FaceEntity face) {
return faceService.update(face);
}
}

View File

@ -129,7 +129,7 @@ public class ViidController {
// log.info("已经解析过的心跳信息:{}", keepaliveObject);
return new VIIDBaseResp(
new ResponseStatusObject(deviceId, "/VIID/System/UnRegister", "0", "注销成功", sdfTime.format(new Date()))
new ResponseStatusObject(deviceId, "/VIID/System/Keepalive", "0", "保活", sdfTime.format(new Date()))
);
}
@ -186,8 +186,8 @@ public class ViidController {
* 批量新增人脸
*/
@RequestMapping(value = "/Faces", method = RequestMethod.POST)
@IgnoreLogReq
public VIIDBaseResp faces(@RequestBody FaceUploadReq req) {
log.info("收到的人脸上报信息:{}",req);
FaceListObject faceListObject = req.getFaceListObject();
List<FaceObject> faceObject = faceListObject.getFaceObject();
String faceId = null;

View File

@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "WVP对接接口")
@RequestMapping("/wvp/v1/")
public class WvpController {
@IgnoreLogReq
@PostMapping("/sync")
public ApiResponse sync() {