package com.huiju.estateagents.controller;

import com.huiju.estateagents.base.BaseController;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.common.JWTUtils;
import com.huiju.estateagents.service.ITaMiniFormidsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/wx")
public class TaMiniFormidsController extends BaseController {

    @Autowired
    ITaMiniFormidsService taMiniFormidsService;

    @PostMapping("/formid")
    public ResponseBean save(@RequestBody String paramStr, HttpServletRequest request) {
        String openid = getOpenId(request);

        return taMiniFormidsService.saveFormidBy(openid, paramStr);
    }
}
