package com.yx.face.controller;

import com.github.pagehelper.PageInfo;
import com.yx.face.boot.restful.RestDTO;
import com.yx.face.boot.restful.RestResponse;
import com.yx.face.boot.restful.RestResult;
import com.yx.face.model.entity.HealthCode;
import com.yx.face.service.HealthCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: (HealthCode)表控制层 <br>
 * @author: PWB <br>
 * @since: 1.0 <br>
 * @date: 2021-06-07 06:26:52 <br>
 */

@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@Api(tags = "D 健康码推送 API")
@RestController
@RequestMapping("healthCode")
public class HealthCodeController {

    /**
     * 服务对象
     */
    private final HealthCodeService healthCodeService;


    @ApiOperation("推送数据")
    @PostMapping("doAddData")
    public RestResult<Boolean> doAddData(@RequestParam String param) {
        return RestResponse.ok(healthCodeService.addMessage(param));
    }


}

