| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.MemberQueryDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.MemberService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @date 2024/01/15 15:07 |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "用工信息表") |
| | | @RestController |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(memberService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("数据列表") |
| | | @PostMapping("/findListByDTO") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<List<Member>> findListByDTO (@RequestBody MemberQueryDTO memberQueryDTO) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo.getType().equals(Constants.ONE)){ |
| | | memberQueryDTO.setCompanyId(loginUserInfo.getCompanyId()); |
| | | } |
| | | return ApiResponse.success(memberService.findListByDTO(memberQueryDTO)); |
| | | } |
| | | } |