|
@@ -1,6 +1,8 @@
|
|
|
package cn.com.qmth.dp.examcloud.oe.modules.init_user_data_rule;
|
|
|
|
|
|
-import lombok.Data;
|
|
|
+import cn.com.qmth.dp.examcloud.oe.modules.init_user_data_rule.vo.DataRuleType;
|
|
|
+import cn.com.qmth.dp.examcloud.oe.modules.init_user_data_rule.vo.UserDataRuleInfo;
|
|
|
+import cn.com.qmth.dp.examcloud.oe.modules.init_user_data_rule.vo.UserInfo;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -11,7 +13,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
import java.sql.PreparedStatement;
|
|
|
import java.sql.SQLException;
|
|
|
import java.text.SimpleDateFormat;
|
|
@@ -32,6 +33,7 @@ public class InitUserDataRule {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
public void start() {
|
|
|
+
|
|
|
StringBuilder querySql = new StringBuilder()
|
|
|
.append("select id,root_org_id,org_id from ec_b_user ")
|
|
|
.append("where id > %s ")
|
|
@@ -169,44 +171,4 @@ public class InitUserDataRule {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- @Data
|
|
|
- static class UserInfo implements Serializable {
|
|
|
-
|
|
|
- private static final long serialVersionUID = 1L;
|
|
|
-
|
|
|
- private Long id;
|
|
|
-
|
|
|
- private Long rootOrgId;
|
|
|
-
|
|
|
- private Long orgId;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Data
|
|
|
- static class UserDataRuleInfo implements Serializable {
|
|
|
-
|
|
|
- private static final long serialVersionUID = 1L;
|
|
|
-
|
|
|
- private Long rootOrgId;
|
|
|
-
|
|
|
- private Long userId;
|
|
|
-
|
|
|
- private DataRuleType type;
|
|
|
-
|
|
|
- private Long refId;
|
|
|
-
|
|
|
- private Boolean enabled;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- enum DataRuleType {
|
|
|
-
|
|
|
- ORG,
|
|
|
-
|
|
|
- EXAM,
|
|
|
-
|
|
|
- COURSE;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
}
|