package com.ygj.yuemum.controller.wxmini; import com.ygj.yuemum.domain.wxmini.WXUser; import com.ygj.yuemum.service.wxmini.WXUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController public class WXUserController { @Autowired private WXUserService wxUserService; @GetMapping("/getWXUser") public WXUser getWXUser(@RequestParam("xu_openid") String xu_openid) { WXUser wxUser = wxUserService.getWXUser(xu_openid); return wxUser; } @GetMapping("/getWXUserType") public int getWXUserType(@RequestParam("xu_openid") String xu_openid) { return wxUserService.getWXUserType(xu_openid); } @PostMapping("/insertWXUser") public int insertWXUser(@ModelAttribute WXUser wxUser) { return wxUserService.insertWXUser(wxUser); } @PostMapping("/updateWXUser") public int updateWXUser(@ModelAttribute WXUser wxUser) { return wxUserService.updateWXUser(wxUser); } }