Blame view

AdministerController.java 2.09 KB
涂亚平 committed
1 2 3
package com.subsidy.controller;


涂亚平 committed
4 5 6 7 8 9 10 11 12 13 14
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.ChangeServiceDTO;
import com.subsidy.model.AdministerDO;
import com.subsidy.service.AdministerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
涂亚平 committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 管理平台用户 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2024-07-18
 */
@RestController
@Api(tags = "管理平台用户")
涂亚平 committed
30
@RequestMapping("/administer")
涂亚平 committed
31 32
public class AdministerController {

涂亚平 committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    @Autowired
    private AdministerService administerService;

    @PostMapping("/login")
    @ApiOperation("登录接口(非中心端登录入口) accountName password")
    public ResponseVO login(@RequestBody AdministerDO administerDO) {
        return ResponseData.generateCreatedResponse(0, administerService.login(administerDO));
    }

    @PostMapping("/getPermissions")
    @ApiOperation("权限查询")
    @LoginRequired
    public ResponseVO getPermissions() {
        return ResponseData.generateCreatedResponse(0, administerService.getPermissions());
    }

    @PostMapping("auth")
    @ApiOperation("授权到应用端免密登录  accountName 用户名  id ")
    public ResponseVO qxy(@RequestBody AdministerDO administerDO){
        return ResponseData.generateCreatedResponse(0,administerService.auth(administerDO));
    }

    @PostMapping("changeService")
    @ApiOperation("查看账号下的所有伙伴  id 账号id  laborServiceName pagSize pageNum")
    public ResponseVO changeService(@RequestBody ChangeServiceDTO changeServiceDTO){
        return ResponseData.generateCreatedResponse(0,administerService.changeService(changeServiceDTO));
    }




涂亚平 committed
64
}