공유데이터 비식별화 - 마스킹
This commit is contained in:
parent
3cd62e2b8d
commit
093d74bd21
@ -80,4 +80,6 @@ public interface ComtrlsdataMapper {
|
||||
int deleteComtrlsData(Map<String, Object> param) throws Exception;
|
||||
|
||||
|
||||
|
||||
void deIdentificationMasking(ComtrlsColVO vo) throws Exception;
|
||||
}
|
||||
|
||||
@ -63,4 +63,5 @@ public interface ComtrlsdataService {
|
||||
|
||||
ComtrlsSrcdataDTO selectComtrlsSrcData(ComtrlsSrcdataVO vo) throws Exception;
|
||||
|
||||
void deIdentificationMasking(ComtrlsColVO vo) throws Exception;
|
||||
}
|
||||
|
||||
@ -75,4 +75,9 @@ public class ComtrlsdataServiceImpl extends EgovAbstractServiceImpl implements C
|
||||
.data(dataList)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deIdentificationMasking(ComtrlsColVO vo) throws Exception{
|
||||
comtrlsdataMapper.deIdentificationMasking(vo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,4 +163,23 @@ public class ComtrlsdataController {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 공유데이터 비식별화 - 마스킹
|
||||
*
|
||||
* @param comtrlsColVO
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@GetMapping(value="/deIdendtify/masking.do")
|
||||
public ResponseEntity<?> deIdendtifyMasking(ComtrlsColVO comtrlsColVO) {
|
||||
try{
|
||||
comtrlsdataService.deIdentificationMasking(comtrlsColVO);
|
||||
return ResponseEntity.ok().build();
|
||||
} catch(Exception e){
|
||||
log.error("Exception", e);
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,4 +107,17 @@
|
||||
WHERE RLS_DATA_ID = #{rlsDataId}
|
||||
</select>
|
||||
|
||||
<update id="deIdentificationMasking" parameterType="ComtrlsColVO" >
|
||||
<bind name="path" value="'{' + rlsDataColNm + '}'" />
|
||||
UPDATE comtrlsdata
|
||||
SET rls_data_vl = jsonb_set(
|
||||
rls_data_vl,
|
||||
${path},
|
||||
to_jsonb(
|
||||
LEFT(rls_data_vl ->> #{rlsDataColNm}, 1) || REPEAT('*', LENGTH(rls_data_vl ->> #{rlsDataColNm}) - 1)
|
||||
)
|
||||
)
|
||||
WHERE rls_data_id = #{rlsDataId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user