Merge branch 'master' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management
This commit is contained in:
commit
33471799e3
@ -63,11 +63,12 @@ public class DataScopeInterceptor extends AbstractSqlParserHandler implements In
|
||||
String originalSql = boundSql.getSql();
|
||||
Object parameterObject = boundSql.getParameterObject();
|
||||
MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");
|
||||
String sqlCommandTypePre = "SELECT SQL = ";
|
||||
String mapperdId = getMapperId(mappedStatement);
|
||||
String sqlCommandTypePre = "SELECT SQL = " + mapperdId + " ";
|
||||
if(SqlCommandType.INSERT.equals(mappedStatement.getSqlCommandType())){
|
||||
sqlCommandTypePre = "INSERT SQL = ";
|
||||
sqlCommandTypePre = "INSERT SQL = " + mapperdId + " ";
|
||||
}else if (SqlCommandType.UPDATE.equals(mappedStatement.getSqlCommandType())){
|
||||
sqlCommandTypePre = "UPDATE SQL = ";
|
||||
sqlCommandTypePre = "UPDATE SQL = " + mapperdId + " ";
|
||||
}
|
||||
|
||||
Configuration configuration = mappedStatement.getConfiguration();
|
||||
@ -170,6 +171,26 @@ public class DataScopeInterceptor extends AbstractSqlParserHandler implements In
|
||||
|
||||
}
|
||||
|
||||
public static String getMapperId(MappedStatement mappedStatement) {
|
||||
try {
|
||||
String id = mappedStatement.getId();
|
||||
if(id.contains(".")){
|
||||
String ids []= id.split("\\.");
|
||||
return ids[ids.length -2 ] +"."+ ids[ids.length -1 ];
|
||||
}
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查找参数是否包括DataScope对象
|
||||
*
|
||||
|
||||
@ -63,6 +63,8 @@ public class ShiroConfig {
|
||||
filterMap.put("/swagger-resources/**", "anon");
|
||||
filterMap.put("/captcha.jpg", "anon");
|
||||
filterMap.put("/aaa.txt", "anon");
|
||||
filterMap.put("/oneCode/update/prints", "anon");
|
||||
filterMap.put("/oneCode/no/prints", "anon");
|
||||
filterMap.put("/dtlg/login", "anon");
|
||||
filterMap.put("/dtlg/luck", "anon");
|
||||
filterMap.put("/dtlg/look", "anon");
|
||||
|
||||
@ -109,4 +109,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsFlowProcess(@Param("recordIds") List<Long> recordIds, @Param("flowProcess") Long flowProcess);
|
||||
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsStatus(@Param("recordIds") List<Long> recordIds, @Param("status") int status);
|
||||
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsFlowProcessAndStatus(List<Long> recordIds, Long flowProcess, int status);
|
||||
}
|
||||
@ -105,4 +105,6 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsFlowProcess(List<Long> recordIds, Long flowProcess);
|
||||
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsStatus(List<Long> recordIds, int status);
|
||||
|
||||
List<FlowRecord> selectFlowRecordByRecordIdsFlowProcessAndStatus(List<Long> recordIds, Long flowProcess, int status);
|
||||
}
|
||||
@ -276,4 +276,9 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
||||
return flowRecordMapper.selectFlowRecordByRecordIdsStatus(recordIds,status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowRecord> selectFlowRecordByRecordIdsFlowProcessAndStatus(List<Long> recordIds, Long flowProcess, int status){
|
||||
return flowRecordMapper.selectFlowRecordByRecordIdsFlowProcessAndStatus(recordIds, flowProcess, status);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ public class AssessManagerController extends AbstractController{
|
||||
log.info("催当前节点的人员,数量{}", flowRecords.size());
|
||||
}else{
|
||||
flowRecords =
|
||||
flowRecordService.selectFlowRecordByRecordIdsFlowProcess(recordIds, flowProcess);
|
||||
flowRecordService.selectFlowRecordByRecordIdsFlowProcessAndStatus(recordIds, flowProcess, 2);
|
||||
log.info("催指定节点的人员,数量{}", flowRecords.size());
|
||||
}
|
||||
|
||||
|
||||
@ -384,5 +384,15 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectFlowRecordByRecordIdsFlowProcessAndStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||
select * from lz_flow_record where is_delete = 0
|
||||
and record_id in
|
||||
<foreach item="recordId" collection="recordIds" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
and flow_process = #{flowProcess} and status=#{status}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user