|
|
|
@ -16,12 +16,12 @@ import (
|
|
|
|
|
var db = DbUtil.Engine
|
|
|
|
|
|
|
|
|
|
//增加
|
|
|
|
|
func AddSysLoginperson(model models.TSysLoginperson) (int64, error) {
|
|
|
|
|
func AddSysLoginPerson(model models.TSysLoginperson) (int64, error) {
|
|
|
|
|
return db.Insert(model)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//修改
|
|
|
|
|
func UpdateSysLoginperson(model models.TSysLoginperson) (int64, error) {
|
|
|
|
|
func UpdateSysLoginPerson(model models.TSysLoginperson) (int64, error) {
|
|
|
|
|
//1、清除Redis缓存
|
|
|
|
|
var ids = []string{model.Id}
|
|
|
|
|
var selector = SqlKit.GetBean("t_sys_loginperson")
|
|
|
|
@ -90,7 +90,7 @@ func IsValidIdTel(tel string, excludePersonId string) bool {
|
|
|
|
|
时间:2020-06-03
|
|
|
|
|
*/
|
|
|
|
|
func IsValidIdEmail(tel string, excludePersonId string) bool {
|
|
|
|
|
//1、在教师表中查找
|
|
|
|
|
//在教师表中查找
|
|
|
|
|
sql := "select count(1) as c from t_base_teacher where dzxx=? and person_id<>? and b_use=1"
|
|
|
|
|
list, _ := db.SQL(sql, tel, excludePersonId).Query().List()
|
|
|
|
|
if list[0]["c"].(int64) > 0 {
|
|
|
|
@ -112,7 +112,7 @@ func UpdatePersonName(personId string, personName string) (int64, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//分页查询
|
|
|
|
|
func PageSysLoginperson(in *SysLoginpersonProto.QueryArg) ([]map[string]interface{}, int32, error) {
|
|
|
|
|
func PageSysLoginPerson(in *SysLoginpersonProto.QueryArg) ([]map[string]interface{}, int32, error) {
|
|
|
|
|
//接收传入参数
|
|
|
|
|
var limit = int(in.Limit)
|
|
|
|
|
var offset = int((in.Page - 1) * in.Limit)
|
|
|
|
|