1、对外接口开放
parent
e1f24bef0a
commit
3e1dcd6c84
@ -0,0 +1,46 @@
|
||||
package com.ibeetl.jlw.web;
|
||||
|
||||
|
||||
import com.ibeetl.admin.core.entity.CoreUser;
|
||||
import com.ibeetl.admin.core.service.CoreUserService;
|
||||
import com.ibeetl.admin.core.web.JsonResult;
|
||||
import com.ibeetl.jlw.entity.ResourcesApplication;
|
||||
import com.ibeetl.jlw.service.ResourcesApplicationService;
|
||||
import com.ibeetl.jlw.web.query.ResourcesApplicationQuery;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "对外开放接口")
|
||||
@RestController
|
||||
@RequestMapping("account")
|
||||
public class AccountController {
|
||||
|
||||
@Autowired
|
||||
private ResourcesApplicationService resourcesApplicationService;
|
||||
@Autowired
|
||||
private CoreUserService userService;
|
||||
|
||||
@ApiOperation("查询应用信息")
|
||||
@GetMapping("findApplications")
|
||||
public JsonResult<ResourcesApplication> findApplications() {
|
||||
ResourcesApplication info = resourcesApplicationService.getInfo(new ResourcesApplicationQuery());
|
||||
resourcesApplicationService.makeApplicationLinkRealUrl(new ResourcesApplicationQuery(), new CoreUser(), info);
|
||||
resourcesApplicationService.hiddenKey(new ResourcesApplicationQuery(), info);
|
||||
// sysLogService.applicationLogPoint(info.getRealUrl());
|
||||
return JsonResult.success(info);
|
||||
}
|
||||
|
||||
@ApiOperation("对外提供接口--根据账号密码查询用户")
|
||||
@PostMapping("findByUsernameAndPwd.json")
|
||||
public JsonResult<Map<String, Object>> findByUsernameAndPwd(String username, String password) {
|
||||
Map<String, Object> objectMap = userService.getUserByUsernameAndPwd(username, password);
|
||||
return JsonResult.success(objectMap);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue