|
@@ -35,131 +35,5 @@ import java.util.*;
|
|
|
@Slf4j
|
|
|
@RequestMapping("/ucenter/test")
|
|
|
public class TestController extends BaseController {
|
|
|
- @Autowired
|
|
|
- private IFolderSceneService folderSceneService;
|
|
|
- @Autowired
|
|
|
- RedisUtil redisUtil;
|
|
|
- @Autowired
|
|
|
- ISceneProService sceneProService;
|
|
|
- @Autowired
|
|
|
- IScenePlusService scenePlusService;
|
|
|
- @Autowired
|
|
|
- IScenePlusExtService scenePlusExtService;
|
|
|
- @Autowired
|
|
|
- ISceneProReService sceneProReService;
|
|
|
- @Autowired
|
|
|
- IUserIncrementService userIncrementService;
|
|
|
-
|
|
|
- @RequestMapping("/_updateViewCount_test")
|
|
|
- public Result updateViewCount() throws Exception {
|
|
|
- List<SceneProRe> sceneProRes = sceneProReService.getV4Num();
|
|
|
- for (SceneProRe sceneProRe : sceneProRes) {
|
|
|
- ScenePlus scenePlus = scenePlusService.getByNum(sceneProRe.getNum());
|
|
|
- if(scenePlus != null){
|
|
|
- ScenePlusExt ext = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
- if(ext!= null && sceneProRe.getViewCount() != null){
|
|
|
- LambdaUpdateWrapper<ScenePlusExt> wrapper = new LambdaUpdateWrapper<>();
|
|
|
- wrapper.eq(ScenePlusExt::getId,ext.getId());
|
|
|
- wrapper.set(ScenePlusExt::getViewCount,sceneProRe.getViewCount());
|
|
|
- scenePlusExtService.update(wrapper);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("checkIncrement")
|
|
|
- public Result checkIncrement() throws Exception {
|
|
|
- List<UserIncrement> list = userIncrementService.list();
|
|
|
- userIncrementService.lockScene(list);
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @RequestMapping("/sendMail")
|
|
|
- public Result sendMail() throws Exception {
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
- @Autowired
|
|
|
- IMailTemplateService mailTemplateService;
|
|
|
-
|
|
|
- @GetMapping("/sendMail1")
|
|
|
- public Result sendMail1(@RequestParam(required = false)String userName) throws Exception {
|
|
|
- //luomin@cgaii.com
|
|
|
- Integer[] days ={-1,0,30};
|
|
|
- for (Integer day : days) {
|
|
|
- if(day == null || day<0){
|
|
|
- mailTemplateService.sendPeExMail(userName,"");
|
|
|
- continue;
|
|
|
- }
|
|
|
- if(day > 0){
|
|
|
- mailTemplateService.sendPeNoExMail(userName,day,"");
|
|
|
- continue;
|
|
|
- }
|
|
|
- mailTemplateService.sendPeTodayExMail(userName,"");
|
|
|
- }
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/sendMail2")
|
|
|
- public Result sendMail2(@RequestParam(required = false)String userName) throws Exception {
|
|
|
- //luomin@cgaii.com
|
|
|
- mailTemplateService.sendCodeMail(userName,"123456","en");
|
|
|
- mailTemplateService.sendCodeMail(userName,"123456","zh");
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
- @Autowired
|
|
|
- SmsService smsService;
|
|
|
- @GetMapping("/sendMail3")
|
|
|
- public Result sendMail3(@RequestParam(required = false)String userName,
|
|
|
- @RequestParam(required = false)String templateParam,
|
|
|
- @RequestParam(required = false)String templateCode) throws Exception {
|
|
|
- //luomin@cgaii.com
|
|
|
- smsService.sendSms(userName, templateParam, templateCode);
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
- @GetMapping("/test1")
|
|
|
- public Result test1(@RequestParam(required = false)String userName) throws Exception {
|
|
|
- //luomin@cgaii.com
|
|
|
- String path = "/mnt/4Dkankan/scene/images/imagest-eur-09XfNdBCB";
|
|
|
- if(path.contains("images")){
|
|
|
- String panPath = path +"/panorama";
|
|
|
- File file = new File(panPath);
|
|
|
- if(file.exists()){
|
|
|
- File[] files = file.listFiles();
|
|
|
- if(files == null || files.length == 0){
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
- for (File file1 : files) {
|
|
|
- String linkPath =file1.getPath() + "/capture";
|
|
|
- log.info("delLink--filePath:{},exists:{}",linkPath,new File(linkPath).exists());
|
|
|
- org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
|
|
|
- //FileUtil.del(linkPath);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return Result.success( );
|
|
|
- }
|
|
|
-
|
|
|
- @Autowired
|
|
|
- ICameraDetailService cameraDetailService;
|
|
|
- @Autowired
|
|
|
- IIncrementTypeService incrementTypeService;
|
|
|
-
|
|
|
- @GetMapping("/checkSsCamera")
|
|
|
- public Result checkSsCamera() throws Exception {
|
|
|
- LambdaQueryWrapper<CameraDetail> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.in(CameraDetail::getType,Arrays.asList(10,11));
|
|
|
- List<CameraDetail> list = cameraDetailService.list(wrapper);
|
|
|
- for (CameraDetail cameraDetail : list) {
|
|
|
- Long cameraId = cameraDetail.getCameraId();
|
|
|
- sceneProService.lockOrUnLockBySpace(cameraId);
|
|
|
- }
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- System.out.println(SecurityUtil.MD5(" \u0011\u0007"));
|
|
|
- }
|
|
|
|
|
|
}
|