package org.jeecg.modules.api.yaoduapi;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.service.YaoDuApiService;
import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication;
import org.jeecg.modules.cityTrends.entity.CityTrends;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="铝材交易接口 - 带token")
@RestController
@RequestMapping("/token")
@Slf4j
public class YaoDuApiTokenController {

    @Resource
    private YaoDuApiService yaoDuApiService;


    //点击查看联系方式 类型 0帖子 1租房 2工作 3门店
    @PostMapping(value = "/checkGivePhone")
    @ApiOperation(value="点击查看联系方式 类型 0帖子 1租房 2工作 3门店")
    public Result<?> checkGivePhone(String token,String type, String id) {
        return yaoDuApiService.checkGivePhone(token,type,id);
    }


    //点击查看地图  类型 0帖子 1租房 2工作 3门店
    @PostMapping(value = "/checkMap")
    @ApiOperation(value="点击查看地图 类型 0帖子 1租房 2工作 3门店")
    public Result<?> checkMap(String token,String type, String id) {
        return yaoDuApiService.checkMap(token,type,id);
    }

    //申请职位
    @PostMapping(value = "/applyJob")
    @ApiOperation(value="申请职位")
    public Result<?> applyJob(String token,String jobId,String name,String phone) {
        return yaoDuApiService.applyJob(token,jobId,name,phone);
    }

    //发布帖子
    @PostMapping(value = "/publishPost")
    @ApiOperation(value="发布帖子")
    public Result<?> publishPost(String token, CityTrends cityTrends) {
        return yaoDuApiService.publishPost(token,cityTrends);
    }

    //评论
    @PostMapping(value = "/comment")
    @ApiOperation(value="评论")
    public Result<?> comment(String token,String postId,String content) {
        return yaoDuApiService.comment(token,postId,content);
    }

    //个人认证
    @PostMapping(value = "/personalAuthentication")
    @ApiOperation(value="个人认证")
    public Result<?> personalAuthentication(String token, CitiyUserAuthentication citiyUserAuthentication) {
        return yaoDuApiService.personalAuthentication(token,citiyUserAuthentication);
    }




}
