master
parent
35432de1b5
commit
26260ec1c5
@ -0,0 +1,39 @@
|
||||
package com.gszc.controller;
|
||||
|
||||
import com.gszc.build.Result;
|
||||
import com.gszc.build.ResultBuilder;
|
||||
import com.gszc.entity.MiniUser;
|
||||
import com.gszc.entity.PcUser;
|
||||
import com.gszc.service.impl.MiniUserServiceImpl;
|
||||
import com.gszc.service.impl.PcUserServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Api(value = "工商注册 API", tags = {"小程序用户api"})
|
||||
@RestController
|
||||
@RequestMapping("/mini/user")
|
||||
public class MiniUserController {
|
||||
|
||||
@Autowired
|
||||
MiniUserServiceImpl miniUserService;
|
||||
|
||||
@PostMapping("/queryMiniUser")
|
||||
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
|
||||
@ApiOperation(value = "查询小程序用户信息", notes = "查询小程序用户信息")
|
||||
public Result queryMiniUser(String miniUserId) {
|
||||
MiniUser miniUser = miniUserService.queryMiniUser(miniUserId);
|
||||
return ResultBuilder.withPayload(miniUser).build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.gszc.service;
|
||||
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.gszc.entity.MiniUser;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author ky
|
||||
* @since 2020-04-27
|
||||
*/
|
||||
public interface IMiniUserService extends IService<MiniUser> {
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.gszc.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.gszc.entity.MiniUser;
|
||||
import com.gszc.mapper.MiniUserMapper;
|
||||
import com.gszc.service.IMiniUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author ky
|
||||
* @since 2020-04-27
|
||||
*/
|
||||
@Service
|
||||
public class MiniUserServiceImpl extends ServiceImpl<MiniUserMapper, MiniUser> implements IMiniUserService {
|
||||
|
||||
@Autowired
|
||||
MiniUserMapper miniUserMapper;
|
||||
|
||||
public MiniUser queryMiniUser(String miniUserId){
|
||||
|
||||
MiniUser miniUser = miniUserMapper.selectById(miniUserId);
|
||||
miniUser.setOpenId(null);
|
||||
return miniUser;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue