master
liuxinxin 5 years ago
parent 2d3e1709a1
commit 14d0ec1b5f

@ -137,6 +137,10 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
FilesAuthEnum.PASS_OPR.getAfterStatus(),
FilesAuthEnum.PASS_OPR.getBeforeStatus(),
FilesAuthEnum.PASS_OPR.getAuthType("kyc"));
String[] unrepeatFiles = {"client_bank_file","client_id_file"};
for(String fileName : unrepeatFiles){
clientFilesMapper.updateRepeatFilesAfterCommit(clientId,fileName);
}
}
@Override

@ -58,4 +58,5 @@ public interface ClientFilesMapper {
void updateFilesAuthStatus(@Param("client_id") int client_id,@Param("status") int status,@Param("original_status_type") int[] original_status_type,@Param("file_names") String[] file_names);
void updateRepeatFilesAfterCommit(@Param("client_id") int client_id, @Param("file_name") String fileName);
}

@ -81,4 +81,33 @@
</if>
</update>
<update id="updateRepeatFilesAfterCommit">
UPDATE sys_files
SET is_valid = 0
WHERE
client_id = #{client_id}
AND file_name = #{file_name}
AND file_id NOT IN (
SELECT
a.file_id
FROM
(
SELECT
file_id
FROM
sys_files a
WHERE
client_id = #{client_id}
AND a.is_valid = 1
AND `status` = 1
AND a.file_name = #{file_name}
ORDER BY
last_update_date DESC
LIMIT 1
) a
)
</update>
</mapper>

Loading…
Cancel
Save