fix: dashboard 적용중

dev
minuk926 3 years ago
parent 54432028c7
commit 4410a0d0c7

@ -165,7 +165,7 @@ public class ResidentAndDisabledController {
return RestResponse.of(service.findJudgeResults(dto));
}
//@Secured(policy = SecurityPolicy.TOKEN)
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "관리자 심사기준 적용 심사 처리" , description = "관리자 심사기준 적용 심사 처리")
@PostMapping(value="/admin/judge", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> saveJudgeStds(
@ -176,6 +176,12 @@ public class ResidentAndDisabledController {
return RestResponse.of(HttpStatus.OK);
}
@Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "dashboard" , description = "dashboard")
@GetMapping(value="/admin/dashboard", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> getDashboard() {
return RestResponse.of(service.findDashboard());
}
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------

@ -80,6 +80,8 @@ public interface IResidentAndDisabledService {
void saveJudgeStds(final JudgeStdDto dto);
Map<String,Object> findDashboard();
//---------------------------------------------------------------------------------
// 심사자
//---------------------------------------------------------------------------------

@ -10,6 +10,7 @@ import com.xit.biz.ctgy.dto.struct.GnRecallScMapstruct;
import com.xit.biz.ctgy.entity.*;
import com.xit.biz.ctgy.mapper.IResidentAndDisabledMapper;
import com.xit.biz.ctgy.repository.*;
import com.xit.biz.ctgy.service.IPublicBoardService;
import com.xit.biz.ctgy.service.IResidentAndDisabledService;
import com.xit.core.constant.ErrorCode;
import com.xit.core.exception.CustomBaseException;
@ -63,6 +64,8 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
private final IParkingRepository parkingRepository;
private final ICmmFileService fileService;
private final IPublicBoardService pBoardService;
private final EntityManager entityManager;
//---------------------------------------------------------------------------------
@ -343,6 +346,13 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService {
});
}
@Transactional(readOnly = true)
public Map<String,Object> findDashboard(){
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("pBoardList", pBoardService.findAll(MinInfoBoard680.builder().build(), PageRequest.of(0, 6)));
return resultMap;
}
private void setFileInfoAndFileUpload(GnRecallScDto dto, MultipartFile[] mfs, String setMethodName) {
String makePath = fileService.uploadFiles(mfs, rootPath, CtgyConstants.Judge.DATAGB_RESIDENT.getCode().equals(dto.getScDatagb())? uploadPath[0] : uploadPath[1]);
//makePath = makePath + File.separator;

@ -74,7 +74,7 @@ public class UserController {
@Operation(summary = "사용자 정보 조회" , description = "등록된 사용자 정보 조회")
//@Secured(policy = SecurityPolicy.TOKEN)
@Secured(policy = SecurityPolicy.TOKEN)
@GetMapping("/me")
public ResponseEntity<? extends IRestResponse> getMyMemberInfo() {
return RestResponse.of(userService.getMyInfo());

Loading…
Cancel
Save