master
嘉祥 詹 2024-07-28 01:04:02 +08:00
parent 6615c2a4be
commit b513287430
2 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ namespace QuotationMaker.Controllers
foreach (dynamic item in usersJsonObj) { foreach (dynamic item in usersJsonObj) {
string user_uid = item.user_uid; string user_uid = item.user_uid;
string user_name = item.user_name; string user_name = item.user_name;
groupUser chk_user = conn.QueryFirstOrDefault<groupUser>("select * from groupUser where user_uid = @user_uid", new { user_uid = user_uid}); groupUser chk_user = conn.QueryFirstOrDefault<groupUser>("select * from groupUser where user_uid = @user_uid and dept_uid = @dept_uid", new { user_uid = user_uid, dept_uid = dept_uid });
if (chk_user == null) if (chk_user == null)
{ {
@ -87,7 +87,7 @@ namespace QuotationMaker.Controllers
newGU.group_uid = group_uid; newGU.group_uid = group_uid;
newGU.user_uid = user_uid; newGU.user_uid = user_uid;
newGU.groupUser_uid = GlobalClass.CreateRandomCode(16); newGU.groupUser_uid = GlobalClass.CreateRandomCode(16);
newGU.dept_uid = dept_uid;
conn.Insert<groupUser>(newGU); conn.Insert<groupUser>(newGU);
} }
else { else {

View File

@ -41,6 +41,7 @@ public class DbTableClass
public string groupUser_uid { get; set; } = ""; public string groupUser_uid { get; set; } = "";
public string group_uid { get; set; } = ""; public string group_uid { get; set; } = "";
public string user_uid { get; set; } = ""; public string user_uid { get; set; } = "";
public string dept_uid { get; set; } = "";
public DateTime groupUser_createdate { get; set; } = DateTime.Now; public DateTime groupUser_createdate { get; set; } = DateTime.Now;
} }