| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.web; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.web.reqeust.AuditApproveDTO; |
| | | import com.doumee.dao.web.reqeust.VisitMemberDTO; |
| | | import com.doumee.dao.web.reqeust.VisitRecordDTO; |
| | | import com.doumee.dao.web.response.*; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.VisitsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/28 14:31 |
| | | */ |
| | | |
| | | @Api(tags = "ãå
¬ä¼å·ãå
é¨äººå") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/member") |
| | | @Slf4j |
| | | @LoginNoRequired |
| | | public class InternalWebController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | @Autowired |
| | | private VisitsService visitsService; |
| | | |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | |
| | | // @ApiOperation(value = "å
é¨äººåé¦é¡µ", notes = "H5") |
| | | // @GetMapping("/internalHome") |
| | | // public ApiResponse<InternalHomeVO> internalHome(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | // return ApiResponse.success("æ¥è¯¢æå",approveService.getHomeData(getLoginUser(token).getMemberId())); |
| | | // } |
| | | |
| | | @ApiOperation("ä»»å¡ä¸å¿") |
| | | @PostMapping("/taskCenter") |
| | | public ApiResponse<PageData<VisitRecordVO>> taskCenter (@RequestBody PageWrap<VisitRecordDTO> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setMemberId(getLoginUser(token).getMemberId()); |
| | | return ApiResponse.success(visitsService.taskCenter(pageWrap)); |
| | | } |
| | | |
| | | // @ApiOperation("访客记å½è¯¦æ
") |
| | | // @GetMapping("/visitDetail") |
| | | // @ApiImplicitParams({ |
| | | // @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | // @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "è®°å½ä¸»é®", required = true) |
| | | // }) |
| | | // public ApiResponse<VisitDetailVO> visitDetail (@RequestParam Integer id) { |
| | | // return ApiResponse.success(visitsService.getVisitDetail(id)); |
| | | // } |
| | | |
| | | |
| | | @ApiOperation(value = "人åå页",notes = "å¯æè®¿å
é¨äººå") |
| | | @PostMapping("/memberList") |
| | | public ApiResponse<PageData<MemberVO>> memberList (@RequestBody PageWrap<VisitMemberDTO> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(memberService.getVisitedMemberList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation(value = "è®¿å®¢è®°å½æäº¤", notes = "å
é¨äººåæäº¤") |
| | | @PostMapping("/createVisit") |
| | | public ApiResponse createVisit(@RequestBody Visits visits,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | visits.setCreateMemberId(getLoginUser(token).getMemberId()); |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.createFk(visits,false,Constants.ZERO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å®¡æ¹æµè®°å½å®¡æ¹", notes = "å
é¨äººå") |
| | | @PostMapping("/auditApprove") |
| | | public ApiResponse auditApprove(@RequestBody AuditApproveDTO auditApproveDTO,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | visitsService.auditApprove(auditApproveDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | } |