Bx06Controller.java 1.29 KB
Newer Older
zhangjianqian's avatar
zhangjianqian committed
1 2 3 4
package com.zehong.web.controller.system;

import com.zehong.common.core.domain.AjaxResult;
import com.zehong.system.domain.vo.Bx06Vo;
5
import com.zehong.system.service.ITEntranceGuardPersonInfoService;
zhangjianqian's avatar
zhangjianqian committed
6 7 8
import com.zehong.system.service.impl.LedserviceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
9 10
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
zhangjianqian's avatar
zhangjianqian committed
11 12 13 14 15

@Api("大屏推送")
@RestController
@RequestMapping("bx")
public class Bx06Controller {
16 17
    @Autowired
    private ITEntranceGuardPersonInfoService tEntranceGuardPersonInfoService;
zhangjianqian's avatar
zhangjianqian committed
18
    @ApiOperation("测试推送")
19 20
    @PostMapping("/send")
    public AjaxResult send (@RequestBody Bx06Vo bx06Vo)throws Exception
zhangjianqian's avatar
zhangjianqian committed
21
    {
22 23 24 25 26 27
        if(bx06Vo.getContents()==null||bx06Vo.getContents().length<1){
            return AjaxResult.error("请至少发送一行数据");
        }
        if(bx06Vo.getContents().length>6){
            return AjaxResult.error("最多一次发送6行数据");
        }
zhangjianqian's avatar
zhangjianqian committed
28 29 30
        LedserviceImpl.SendProgram(bx06Vo);
        return AjaxResult.success();
    }
31 32 33 34 35 36 37 38

//    @ApiOperation("测试推送2")
//    @PostMapping("/testsend")
//    public void testsend ()throws Exception
//    {
//        tEntranceGuardPersonInfoService.send2Led();
//    }

zhangjianqian's avatar
zhangjianqian committed
39
}