|
|
@@ -217,6 +217,19 @@ public class users extends Controller {
|
|
|
sqllist.addAll(createUserFactory.getSQL());
|
|
|
sqllist.add(DataContrlLog.createLog(this, "sys_users", createUserFactory.getUserid(), "新建", "新建账号【" + accountno + "】").getSQL());
|
|
|
content.put("userid", createUserFactory.getUserid());
|
|
|
+ if (usertype == 1) {
|
|
|
+ Rows rows = dbConnect.runSqlQuery("SELECT * from sys_usersite WHERE siteid='" + siteid + "' and usertype=0");
|
|
|
+ for (Row row : rows) {
|
|
|
+ Long tempuserid = row.getLong("userid");
|
|
|
+ InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_userteam");
|
|
|
+ insertSQL.setSiteid(siteid);
|
|
|
+ insertSQL.setUniqueid(createTableID("sys_userteam"));
|
|
|
+ insertSQL.setValue("userid", tempuserid);
|
|
|
+ insertSQL.setValue("createuserid", createUserFactory.getUserid());
|
|
|
+ insertSQL.setValue("isproxy", 1);
|
|
|
+ insertSQL.insert();
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
if (accountno.isEmpty()) {
|
|
|
return getReturnObject().setCode("0629", new String[0]).toString();//账号不能为空
|