| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入jingdan") |
| | | public R submit(@Valid @RequestBody Jingdan jingdan) { |
| | | return R.status(jingdanService.saveOrUpdate(jingdan)); |
| | | //return R.status(jingdanService.saveOrUpdate(jingdan)); |
| | | return R.status(jingdanService.save(jingdan)); |
| | | } |
| | | |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- <insert id="insert"> |
| | | insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type, |
| | | handleP,handleTime,handName,level,coordinate,jd,wd,addvcd) |
| | | values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime} |
| | | ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime}, |
| | | #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd}) |
| | | </insert>--> |
| | | <!-- <insert id="insert">--> |
| | | <!-- insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type,--> |
| | | <!-- handleP,handleTime,handName,level,coordinate,jd,wd,addvcd)--> |
| | | <!-- values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime}--> |
| | | <!-- ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime},--> |
| | | <!-- #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd})--> |
| | | <!-- </insert>--> |
| | | |
| | | |
| | | <sql id="key"> |
| | |
| | | <if test="level!=null and level!=''"> |
| | | #{level}, |
| | | </if> |
| | | <if test="coordinate=null and coordinate=''"> |
| | | coordinate, |
| | | </if> |
| | | <if test="jd!=null and wd!=null"> |
| | | POINT(#{jd},#{wd}), |
| | | </if> |
| | |
| | | import io.netty.channel.socket.ServerSocketChannel; |
| | | import io.netty.channel.socket.SocketChannel; |
| | | import io.netty.channel.socket.nio.NioServerSocketChannel; |
| | | import io.netty.handler.codec.LengthFieldBasedFrameDecoder; |
| | | |
| | | |
| | | public class Server { |
| | |
| | | // 绑定处理group |
| | | bootstrap.group(boss, worker).channel(NioServerSocketChannel.class) |
| | | //保持连接数 |
| | | .option(ChannelOption.SO_BACKLOG, 300) |
| | | .option(ChannelOption.SO_BACKLOG, 1024) |
| | | //有数据立即发送 |
| | | .option(ChannelOption.TCP_NODELAY, true) |
| | | //保持连接 |
| | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id;// bigint(20) NOT NULL COMMENT '主键', |
| | | |
| | | private Integer method;// int(1) NOT NULL COMMENT '方法名: 0 表示 infrared_aiom_picture 图片数据, 1 表示 engine_echo 心跳包 ', |
| | | //private Integer method;// int(1) NOT NULL COMMENT '方法名: 0 表示 infrared_aiom_picture 图片数据, 1 表示 engine_echo 心跳包 ', |
| | | |
| | | private String ip;// varchar(63) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备IP地址', |
| | | |
| | |
| | | byte[] req = new byte[buf.readableBytes()]; |
| | | buf.readBytes(req); |
| | | String body = new String(req, CharsetUtil.UTF_8); |
| | | System.out.println("【NOTE】>>>>>> 收到客户端的数据:"+body); |
| | | System.out.println("【UDP】>>>>>> 收到客户端的数据:"+body); |
| | | |
| | | // 回复一条信息给客户端 |
| | | // channelHandlerContext.writeAndFlush(new DatagramPacket( |