package com.yunzhi.marketing.controller;

import com.yunzhi.marketing.base.BaseController;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.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);
    }
}
