//package com.gree.mall.manager.controller.admin.ew;
//
//import com.gree.mall.manager.config.aop.annotation.IsAdmin;
//import com.gree.mall.manager.helper.ResponseHelper;
//import com.gree.mall.manager.logic.admin.EnterpriseWechatWithUserLogic;
//import com.gree.mall.manager.plus.entity.AdminUser;
//import com.gree.mall.manager.plus.entity.AdminWebsit;
//import com.gree.mall.manager.plus.entity.EnterpriseWechat;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@Api("企业微信用户管理api")
//@RestController
//@RequestMapping("/wechat/adminUser")
//public class EnterpriseWechatWithUserController {
//
//
//    @Autowired
//    EnterpriseWechatWithUserLogic enterpriseWechatWithUserLogic;
//
//    @IsAdmin
//    @ApiOperation("获取所有企业微信")
//    @GetMapping("/getAllEnterpriseWechat")
//    public ResponseHelper<List<EnterpriseWechat>> getAllEnterpriseWechat(
//            @ApiParam(value = "企业微信id",required = false)@RequestParam(required = false) String enterpriseWechatId,
//            @ApiParam(value = "企业微信名称",required = false)@RequestParam(required = false) String enterpriseWechatName
//    ){
//
//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllEnterpriseWechat(enterpriseWechatId,enterpriseWechatName));
//    }
//
//    @IsAdmin
//    @ApiOperation("查询所有用户")
//    @GetMapping("/getAllAdminUser")
//    public ResponseHelper<List<AdminUser>> getAllAdminUser(
//            @ApiParam(value = "用户id",required = false)@RequestParam(required = false) String userId,
//            @ApiParam(value = "账号",required = false)@RequestParam(required = false) String username){
//
//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllAdminUser(userId,username));
//    }
//
//    @IsAdmin
//    @ApiOperation("通过用户id查寻其绑定的企业微信")
//    @GetMapping("/getWebsitIdsByAdminUserId")
//    public ResponseHelper<List<AdminWebsit>> getWebsitIdsByAdminUserId(
//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId){
//
//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getEnterpriseWechatIdsByAdminUserId(adminUserId));
//    }
//
//    @IsAdmin
//    @ApiOperation("变更用户与企业绑定关系")
//    @PostMapping("/updateAdminUserWebsit")
//    public ResponseHelper<Void> updateAdminUserWebsit(
//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId,
//            @ApiParam(value = "新的企业id 格式 enterpriseWechat1,格式enterpriseWechat2  固定清除旧的关联 添加新的关联",required = false)
//            @RequestParam(required = false) String newEnterpriseWechats){
//        enterpriseWechatWithUserLogic.updateEnterpriseWechatWithUser(adminUserId,newEnterpriseWechats);
//        return ResponseHelper.success();
//    }
//}
