package com.dgtly.api.controller;


import com.alibaba.fastjson.JSONObject;
import com.dgtly.common.annotation.ApiNoCheckSign;
import com.dgtly.common.annotation.ApiPassToken;
import com.dgtly.common.core.controller.ApiBaseController;
import com.dgtly.common.core.controller.BaseController;
import com.dgtly.common.core.domain.AjaxResult;
import com.dgtly.common.core.domain.ParameterObject;
import com.dgtly.goods.domain.GoodsColor;
import com.dgtly.system.domain.SysPost;
import com.dgtly.system.domain.SysUser;
import com.dgtly.system.service.ISysModelLayoutService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@ApiPassToken
@ApiNoCheckSign
public class HellowController extends ApiBaseController {


    @GetMapping("getTest")
    public Object getTest(String param){
        return AjaxResult.success().putKV("param",param);
    }


    @PostMapping("/post/json")
    public Object j(){
        ParameterObject obj = getParameterObject();obj.checkParameterNotNull("id,aa");
        SysUser su = obj.parseBean(SysUser.class);
        return AjaxResult.success();
    }

    @PostMapping("/post/form")
    public Object f(String param ){
        return AjaxResult.success().putKV("param",param);
    }


}
