package org.linlinjava.jz.hm.restapi;

import javax.validation.Valid;

import org.linlinjava.jz.core.util.ResponseUtil;
import org.linlinjava.jz.hm.dto.UserRelationDto;
import org.linlinjava.jz.hm.service.HmAppUserSerevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(value = "三者关系生成", description = "三者关系生成")
@RestController
@RequestMapping("threeRelationship")
public class ThreeRelationshipController {

	@Autowired
	HmAppUserSerevice hmAppUserSerevice;
	
	@ApiOperation(value = "生成三者关系", notes = "生成三者关系")
	@PostMapping(value = "generate")
	public Object generate(@RequestBody @Valid UserRelationDto dto) {
		hmAppUserSerevice.insetUserRelation(dto);
		
		
		return ResponseUtil.ok();
	}
}
