kgdxpr 1 year ago
commit be9ad9f7d4

@ -1,14 +1,7 @@
package com.dsideal.QingLong.DataShare.Model;
import com.dsideal.QingLong.Interceptor.EmptyInterface;
import com.dsideal.QingLong.Interceptor.IsLoginInterface;
import com.dsideal.QingLong.Interceptor.IsNumericInterface;
import com.dsideal.QingLong.Interceptor.IsSysAdminInterface;
import com.dsideal.QingLong.Util.CommonUtil;
import com.dsideal.QingLong.Util.PgUtil;
import com.jfinal.aop.Before;
import com.jfinal.ext.interceptor.GET;
import com.jfinal.ext.interceptor.POST;
import com.jfinal.kit.Kv;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Db;
@ -50,16 +43,32 @@ public class DataShareModel {
Db.save("t_datashare_system", "system_id", record);
}
/**
*
* @param system_id
*/
public void delSystem(int system_id) {
//此系统的用户
String user_name = getSystemById(system_id).getStr("user_name");
PgUtil.delUser(user_name);
Db.deleteById("t_datashare_system", "system_id", system_id);
}
/**
*
* @param system_id
* @param system_name
*/
public void updateSystem(int system_id, String system_name) {
String sql = "update t_datashare_system set system_name=? where system_id=?";
Db.update(sql, system_name, system_id);
}
/**
*
* @param system_id
* @return
*/
public Record getSystemById(int system_id) {
return Db.findById("t_datashare_system", "system_id", system_id);
}
@ -115,6 +124,7 @@ public class DataShareModel {
/**
*
*
* @param table_names
* @return
*/

@ -1,6 +1,6 @@
#namespace("DataShare")
#sql("listSystem")
select t1.* from t_datashare_system as t1 where
select t1.* from t_datashare_system as t1 where
t1.system_name like #para(keyword, "like") order by t1.system_id desc
#end
#end

Loading…
Cancel
Save