package com.pj.tb_people;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.pj.utils.sg.AjaxJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Controller: tb_people -- 边民(app接口)
 * @Author Mechrevo
 * @Date 2023 07 24 14 56
 **/
@RestController
@RequestMapping("/app/TbPeople/")
public class TbPeopleAppController {

    @Autowired
    private TbPeopleService tbPeopleService;

    /** 查个人信息 - 根据id */
    @RequestMapping("getById")
    public AjaxJson getById(String id){
        TbPeople t = tbPeopleService.getById(id);
        return AjaxJson.getSuccessData(t);
    }

    /** 改个人信息 */
    @RequestMapping("update")
    public AjaxJson update(TbPeople t){
        tbPeopleService.update(t);
        return AjaxJson.getSuccess();
    }


//
//    /** 边民确认订单 */
//    @RequestMapping("confirmOrder")
//    public AjaxJson confirmOrder(@RequestParam("orderId")Long orderId){
//        tbPeopleService.confirmOrder(orderId);
//        return AjaxJson.getSuccess();
//    }



}
