| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.erp.model.openapi.request.erp.OrgListRequest; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserListRequest; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "ERPæ°æ®åæ¥æ¥å£") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/erpsync") |
| | | public class ERPSyncCloudController extends BaseController { |
| | | @Autowired |
| | | private ERPSyncService erpSyncService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("ãERPãå
¨é忥ERPç»ç»æ¥å£") |
| | | @PostMapping("/getCompanies") |
| | | @CloudRequiredPermission("business:erpsync:company") |
| | | public ApiResponse getCompanies(@RequestBody OrgListRequest param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String result = erpSyncService.syncCompany(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("ãERPãå
¨é忥ERPäººåæ¥å£") |
| | | @PostMapping("/getUsers") |
| | | @CloudRequiredPermission("business:erpsync:users") |
| | | public ApiResponse getUsers(@RequestBody UserListRequest param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String result = erpSyncService.syncUsers(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | } |