diff --git a/.history/api/base/loginVerify/login_20220727153717.go b/.history/api/base/loginVerify/login_20220727153717.go new file mode 100644 index 0000000..beb16d3 --- /dev/null +++ b/.history/api/base/loginVerify/login_20220727153717.go @@ -0,0 +1,187 @@ +package loginVerify + +import ( + "fmt" + "key_performance_indicators/middleware/grocerystore" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { + var requestData Login + c.ShouldBindJSON(&requestData) + + if requestData.Username == "" { + publicmethod.Result(1, requestData, c, "请输入用户名!") + return + } + if requestData.Password == "" { + publicmethod.Result(1, requestData, c, "请输入密码!") + return + } + if requestData.Captcha == "" { + publicmethod.Result(1, requestData, c, "请输入验证码!") + return + } + + // if store.Verify(requestData.CaptchaId, requestData.Captcha, true) != true { + // publicmethod.Result(1, requestData, c, "验证码不正确!") + // return + // } + + userAgent := c.Request.Header.Get("User-Agent") + // userAgent = "250" + + var md5JiaMiPwd publicmethod.Md5Encryption + md5JiaMiPwd.Md5EncryptionInit(requestData.Password) + md5TokenPwd := md5JiaMiPwd.Md5EncryptionAlgorithm() + // var oldAdmin OldSchollAdmin + // oldErr := overall.CONSTANT_DB_Master.Model(&models.SystemUser{}).Select("system_user.*,system_user_attribute.*").Joins("left join system_user_attribute on system_user.u_key = system_user_attribute.ua_id").Where("`u_name` = ? AND `u_password` = ?", requestData.Username, md5TokenPwd).First(&oldAdmin).Error + // if oldErr == nil { + // //原知行学院管理员账号登录 + // } + //新的登录认证方式 + var userCont models.ManCont + userErr := userCont.GetCont(map[string]interface{}{"number": requestData.Username, "password": md5TokenPwd}) + if userErr != nil { + publicmethod.Result(2000, userErr, c) + return + } + if requestData.OpenId != "" { + var userInfo models.PersonArchives + userInfo.EiteCont(map[string]interface{}{"id": userCont.Id}, map[string]interface{}{"work_wechat": requestData.OpenId}) + } + if userCont.State == 2 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号已经被禁用!") + return + } + if userCont.State == 3 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号不存在!") + return + } + + var md5JiaMi publicmethod.Md5Encryption + md5JiaMi.Md5EncryptionInit(userAgent) + md5Token := md5JiaMi.Md5EncryptionAlgorithm() + + var md5JiaMiNumber publicmethod.Md5Encryption + md5JiaMiNumber.Md5EncryptionInit(userCont.Number) + userKeyCode := md5JiaMiNumber.Md5EncryptionAlgorithm() + + sha1Str := userKeyCode + userCont.Number + userCont.Password + md5Token + sha1Token := publicmethod.Sha1Encryption(sha1Str) + + //返回值 + saveData := publicmethod.MapOut[string]() + saveData["key"] = userKeyCode + saveData["token"] = sha1Token + saveData["userinfo"] = userCont + menuoper, jurisdiction := getRoleSeat(userCont.Role) + writeRedisData := map[string]interface{}{ + "userkey": userKeyCode, + "key": userCont.Key, + "usernumber": userCont.Number, + "userpwd": userCont.Password, + "usertoken": sha1Token, + "jurisdiction": jurisdiction, + "menuOper": menuoper, + "wand": 118, + } + //API Token数据 + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKeyCode) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + redisClient.SetRedisTime(10800) + redisClient.HashMsetAdd(redisFileKey, writeRedisData) + //缓存写入个人信息 + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userCont.Number) + myCont := publicmethod.MapOut[string]() + myCont["id"] = userCont.Id + myCont["number"] = userCont.Number //员工工号 + myCont["name"] = userCont.Name //姓名 + myCont["icon"] = userCont.Icon //头像 + myCont["hire_class"] = userCont.HireClass //雇佣类型(1:雇佣入职;2:再入职;) + myCont["emp_type"] = userCont.EmpType //用工关系(1:临时工 , 2:编外人员 ;3:实习&实习生;4:试用员工;5:待分配;6:待岗;7:临时调入;8:正式员工;9:长期病假;10:停薪留职;11:退休;12:辞职;13:辞退;14:离职) + myCont["company"] = userCont.Company //入职公司 + myCont["maindeparment"] = userCont.MainDeparment //主部门 + myCont["sun_main_department"] = userCont.SunMainDeparment //二级主部门 + myCont["deparment"] = userCont.Deparment //部门 + myCont["admin_org"] = userCont.AdminOrg //所属行政组织 + myCont["teamid"] = userCont.TeamId //班组 + myCont["position"] = userCont.Position //职位 + myCont["job_class"] = userCont.JobClass //职务分类 + myCont["job_id"] = userCont.JobId //职务 + myCont["job_leve"] = userCont.JobLeve //职务等级 + myCont["wechat"] = userCont.Wechat //微信UserId + myCont["work_wechat"] = userCont.WorkWechat //企业微信UserId + myCont["state"] = userCont.State //状态(1:启用;2:禁用;3:删除) + myCont["key"] = userCont.Key //key + myCont["is_admin"] = userCont.IsAdmin //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管 + myCont["password"] = userCont.Password //密码 + myCont["role"] = userCont.Role //角色 + myCont["idcardno"] = userCont.Idcardno //身份证号 + myCont["passportno"] = userCont.Passportno //护照号码 + myCont["globalroaming"] = userCont.Globalroaming //国际区号 + myCont["mobilephone"] = userCont.Mobilephone //手机号码 + myCont["email"] = userCont.Email //电子邮件 + myCont["gender"] = userCont.Gender //性别(1:男性;2:女性;3:中性) + myCont["birthday"] = userCont.Birthday //birthday + myCont["myfolk"] = userCont.Myfolk //民族 + myCont["nativeplace"] = userCont.Nativeplace //籍贯 + myCont["idcardstartdate"] = userCont.Idcardstartdate //身份证有效期开始 + myCont["idcardenddate"] = userCont.Idcardenddate //身份证有效期结束 + myCont["idcardaddress"] = userCont.Idcardaddress //身份证地址 + myCont["idcardIssued"] = userCont.IdcardIssued //身份证签发机关 + myCont["health"] = userCont.Health //健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废) + myCont["maritalstatus"] = userCont.Maritalstatus //婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异) + myCont["internaltelephone"] = userCont.Internaltelephone //内线电话 + myCont["currentresidence"] = userCont.Currentresidence //现居住地址 + myCont["constellationing"] = userCont.Constellation //星座(1:白羊座;2:金牛座;3:双子座;4:巨蟹座;5:狮子座;6:处女座;7:天枰座;8:天蝎座;9:射手座;10:摩羯座;11:水瓶座;12:双鱼座) + myCont["isdoubleworker"] = userCont.Isdoubleworker //是否双职工(1:是;2:否) + myCont["isveterans"] = userCont.Isveterans //是否为退役军人(1:是;2:否) + myCont["veteransnumber"] = userCont.Veteransnumber //退役证编号 + myCont["jobstartdate"] = userCont.Jobstartdate //参加工作日期 + myCont["entrydate"] = userCont.Entrydate //入职日期 + myCont["probationperiod"] = userCont.Probationperiod //试用期 + myCont["planformaldate"] = userCont.Planformaldate //预计转正日期 + myCont["political_outlook"] = userCont.PoliticalOutlook //政治面貌(1:群众;2:无党派;3:台盟会员;4:九三社员;5:致公党员;6:农工党员;7:民进会员;8:民建会员;9:民盟盟员;10:民革会员,11:共青团员;12:预备党员;13:中共党员) + redisClient.HashMsetAdd(redisMyContKey, myCont) + publicmethod.Result(0, saveData, c) +} + +//获取权限点位 +func getRoleSeat(roleId string) (menuStr, buttonStr string) { + var roleInfo models.SystemRole + err := roleInfo.GetCont(map[string]interface{}{"r_id": roleId}, "r_menu_oper", "r_jurisdiction") + if err != nil { + return + } + menuStr = roleInfo.MenuOper + buttonStr = roleInfo.Jurisdiction + return +} + +//退出登录 +func (a *ApiMethod) SignOut(c *gin.Context) { + userKey := c.Request.Header.Get("user-key") + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKey) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + userToken, isTrue := redisClient.HashGetAll(redisFileKey) + if isTrue == false { + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + // fmt.Printf("userToken----->%v\n", userToken) + _, err := publicmethod.GetUserRedisCont(userToken["usernumber"]) + if err != nil { + redisClient.DelKey(redisFileKey) + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + redisClient.DelKey(redisFileKey) + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userToken["usernumber"]) + redisClient.DelKey(redisMyContKey) + publicmethod.Result(0, isTrue, c, "退出成功!") +} diff --git a/.history/api/base/loginVerify/login_20220729082636.go b/.history/api/base/loginVerify/login_20220729082636.go new file mode 100644 index 0000000..077a1d0 --- /dev/null +++ b/.history/api/base/loginVerify/login_20220729082636.go @@ -0,0 +1,187 @@ +package loginVerify + +import ( + "fmt" + "key_performance_indicators/middleware/grocerystore" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { + var requestData Login + c.ShouldBindJSON(&requestData) + + if requestData.Username == "" { + publicmethod.Result(1, requestData, c, "请输入用户名!") + return + } + if requestData.Password == "" { + publicmethod.Result(1, requestData, c, "请输入密码!") + return + } + if requestData.Captcha == "" { + publicmethod.Result(1, requestData, c, "请输入验证码!") + return + } + + // if store.Verify(requestData.CaptchaId, requestData.Captcha, true) != true { + // publicmethod.Result(1, requestData, c, "验证码不正确!") + // return + // } + + userAgent := c.Request.Header.Get("User-Agent") // + // userAgent = "250" + + var md5JiaMiPwd publicmethod.Md5Encryption + md5JiaMiPwd.Md5EncryptionInit(requestData.Password) + md5TokenPwd := md5JiaMiPwd.Md5EncryptionAlgorithm() + // var oldAdmin OldSchollAdmin + // oldErr := overall.CONSTANT_DB_Master.Model(&models.SystemUser{}).Select("system_user.*,system_user_attribute.*").Joins("left join system_user_attribute on system_user.u_key = system_user_attribute.ua_id").Where("`u_name` = ? AND `u_password` = ?", requestData.Username, md5TokenPwd).First(&oldAdmin).Error + // if oldErr == nil { + // //原知行学院管理员账号登录 + // } + //新的登录认证方式 + var userCont models.ManCont + userErr := userCont.GetCont(map[string]interface{}{"number": requestData.Username, "password": md5TokenPwd}) + if userErr != nil { + publicmethod.Result(2000, userErr, c) + return + } + if requestData.OpenId != "" { + var userInfo models.PersonArchives + userInfo.EiteCont(map[string]interface{}{"id": userCont.Id}, map[string]interface{}{"work_wechat": requestData.OpenId}) + } + if userCont.State == 2 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号已经被禁用!") + return + } + if userCont.State == 3 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号不存在!") + return + } + + var md5JiaMi publicmethod.Md5Encryption + md5JiaMi.Md5EncryptionInit(userAgent) + md5Token := md5JiaMi.Md5EncryptionAlgorithm() + + var md5JiaMiNumber publicmethod.Md5Encryption + md5JiaMiNumber.Md5EncryptionInit(userCont.Number) + userKeyCode := md5JiaMiNumber.Md5EncryptionAlgorithm() + + sha1Str := userKeyCode + userCont.Number + userCont.Password + md5Token + sha1Token := publicmethod.Sha1Encryption(sha1Str) + + //返回值 + saveData := publicmethod.MapOut[string]() + saveData["key"] = userKeyCode + saveData["token"] = sha1Token + saveData["userinfo"] = userCont + menuoper, jurisdiction := getRoleSeat(userCont.Role) + writeRedisData := map[string]interface{}{ + "userkey": userKeyCode, + "key": userCont.Key, + "usernumber": userCont.Number, + "userpwd": userCont.Password, + "usertoken": sha1Token, + "jurisdiction": jurisdiction, + "menuOper": menuoper, + "wand": 118, + } + //API Token数据 + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKeyCode) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + redisClient.SetRedisTime(10800) + redisClient.HashMsetAdd(redisFileKey, writeRedisData) + //缓存写入个人信息 + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userCont.Number) + myCont := publicmethod.MapOut[string]() + myCont["id"] = userCont.Id + myCont["number"] = userCont.Number //员工工号 + myCont["name"] = userCont.Name //姓名 + myCont["icon"] = userCont.Icon //头像 + myCont["hire_class"] = userCont.HireClass //雇佣类型(1:雇佣入职;2:再入职;) + myCont["emp_type"] = userCont.EmpType //用工关系(1:临时工 , 2:编外人员 ;3:实习&实习生;4:试用员工;5:待分配;6:待岗;7:临时调入;8:正式员工;9:长期病假;10:停薪留职;11:退休;12:辞职;13:辞退;14:离职) + myCont["company"] = userCont.Company //入职公司 + myCont["maindeparment"] = userCont.MainDeparment //主部门 + myCont["sun_main_department"] = userCont.SunMainDeparment //二级主部门 + myCont["deparment"] = userCont.Deparment //部门 + myCont["admin_org"] = userCont.AdminOrg //所属行政组织 + myCont["teamid"] = userCont.TeamId //班组 + myCont["position"] = userCont.Position //职位 + myCont["job_class"] = userCont.JobClass //职务分类 + myCont["job_id"] = userCont.JobId //职务 + myCont["job_leve"] = userCont.JobLeve //职务等级 + myCont["wechat"] = userCont.Wechat //微信UserId + myCont["work_wechat"] = userCont.WorkWechat //企业微信UserId + myCont["state"] = userCont.State //状态(1:启用;2:禁用;3:删除) + myCont["key"] = userCont.Key //key + myCont["is_admin"] = userCont.IsAdmin //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管 + myCont["password"] = userCont.Password //密码 + myCont["role"] = userCont.Role //角色 + myCont["idcardno"] = userCont.Idcardno //身份证号 + myCont["passportno"] = userCont.Passportno //护照号码 + myCont["globalroaming"] = userCont.Globalroaming //国际区号 + myCont["mobilephone"] = userCont.Mobilephone //手机号码 + myCont["email"] = userCont.Email //电子邮件 + myCont["gender"] = userCont.Gender //性别(1:男性;2:女性;3:中性) + myCont["birthday"] = userCont.Birthday //birthday + myCont["myfolk"] = userCont.Myfolk //民族 + myCont["nativeplace"] = userCont.Nativeplace //籍贯 + myCont["idcardstartdate"] = userCont.Idcardstartdate //身份证有效期开始 + myCont["idcardenddate"] = userCont.Idcardenddate //身份证有效期结束 + myCont["idcardaddress"] = userCont.Idcardaddress //身份证地址 + myCont["idcardIssued"] = userCont.IdcardIssued //身份证签发机关 + myCont["health"] = userCont.Health //健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废) + myCont["maritalstatus"] = userCont.Maritalstatus //婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异) + myCont["internaltelephone"] = userCont.Internaltelephone //内线电话 + myCont["currentresidence"] = userCont.Currentresidence //现居住地址 + myCont["constellationing"] = userCont.Constellation //星座(1:白羊座;2:金牛座;3:双子座;4:巨蟹座;5:狮子座;6:处女座;7:天枰座;8:天蝎座;9:射手座;10:摩羯座;11:水瓶座;12:双鱼座) + myCont["isdoubleworker"] = userCont.Isdoubleworker //是否双职工(1:是;2:否) + myCont["isveterans"] = userCont.Isveterans //是否为退役军人(1:是;2:否) + myCont["veteransnumber"] = userCont.Veteransnumber //退役证编号 + myCont["jobstartdate"] = userCont.Jobstartdate //参加工作日期 + myCont["entrydate"] = userCont.Entrydate //入职日期 + myCont["probationperiod"] = userCont.Probationperiod //试用期 + myCont["planformaldate"] = userCont.Planformaldate //预计转正日期 + myCont["political_outlook"] = userCont.PoliticalOutlook //政治面貌(1:群众;2:无党派;3:台盟会员;4:九三社员;5:致公党员;6:农工党员;7:民进会员;8:民建会员;9:民盟盟员;10:民革会员,11:共青团员;12:预备党员;13:中共党员) + redisClient.HashMsetAdd(redisMyContKey, myCont) + publicmethod.Result(0, saveData, c) +} + +//获取权限点位 +func getRoleSeat(roleId string) (menuStr, buttonStr string) { + var roleInfo models.SystemRole + err := roleInfo.GetCont(map[string]interface{}{"r_id": roleId}, "r_menu_oper", "r_jurisdiction") + if err != nil { + return + } + menuStr = roleInfo.MenuOper + buttonStr = roleInfo.Jurisdiction + return +} + +//退出登录 +func (a *ApiMethod) SignOut(c *gin.Context) { + userKey := c.Request.Header.Get("user-key") + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKey) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + userToken, isTrue := redisClient.HashGetAll(redisFileKey) + if isTrue == false { + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + // fmt.Printf("userToken----->%v\n", userToken) + _, err := publicmethod.GetUserRedisCont(userToken["usernumber"]) + if err != nil { + redisClient.DelKey(redisFileKey) + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + redisClient.DelKey(redisFileKey) + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userToken["usernumber"]) + redisClient.DelKey(redisMyContKey) + publicmethod.Result(0, isTrue, c, "退出成功!") +} diff --git a/.history/api/base/loginVerify/login_20220729082639.go b/.history/api/base/loginVerify/login_20220729082639.go new file mode 100644 index 0000000..17f8e07 --- /dev/null +++ b/.history/api/base/loginVerify/login_20220729082639.go @@ -0,0 +1,187 @@ +package loginVerify + +import ( + "fmt" + "key_performance_indicators/middleware/grocerystore" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { + var requestData Login + c.ShouldBindJSON(&requestData) + + if requestData.Username == "" { + publicmethod.Result(1, requestData, c, "请输入用户名!") + return + } + if requestData.Password == "" { + publicmethod.Result(1, requestData, c, "请输入密码!") + return + } + if requestData.Captcha == "" { + publicmethod.Result(1, requestData, c, "请输入验证码!") + return + } + + // if store.Verify(requestData.CaptchaId, requestData.Captcha, true) != true { + // publicmethod.Result(1, requestData, c, "验证码不正确!") + // return + // } + + userAgent := c.Request.Header.Get("User-Agent") // 获取用户代理 + // userAgent = "250" + + var md5JiaMiPwd publicmethod.Md5Encryption + md5JiaMiPwd.Md5EncryptionInit(requestData.Password) + md5TokenPwd := md5JiaMiPwd.Md5EncryptionAlgorithm() + // var oldAdmin OldSchollAdmin + // oldErr := overall.CONSTANT_DB_Master.Model(&models.SystemUser{}).Select("system_user.*,system_user_attribute.*").Joins("left join system_user_attribute on system_user.u_key = system_user_attribute.ua_id").Where("`u_name` = ? AND `u_password` = ?", requestData.Username, md5TokenPwd).First(&oldAdmin).Error + // if oldErr == nil { + // //原知行学院管理员账号登录 + // } + //新的登录认证方式 + var userCont models.ManCont + userErr := userCont.GetCont(map[string]interface{}{"number": requestData.Username, "password": md5TokenPwd}) + if userErr != nil { + publicmethod.Result(2000, userErr, c) + return + } + if requestData.OpenId != "" { + var userInfo models.PersonArchives + userInfo.EiteCont(map[string]interface{}{"id": userCont.Id}, map[string]interface{}{"work_wechat": requestData.OpenId}) + } + if userCont.State == 2 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号已经被禁用!") + return + } + if userCont.State == 3 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号不存在!") + return + } + + var md5JiaMi publicmethod.Md5Encryption + md5JiaMi.Md5EncryptionInit(userAgent) + md5Token := md5JiaMi.Md5EncryptionAlgorithm() + + var md5JiaMiNumber publicmethod.Md5Encryption + md5JiaMiNumber.Md5EncryptionInit(userCont.Number) + userKeyCode := md5JiaMiNumber.Md5EncryptionAlgorithm() + + sha1Str := userKeyCode + userCont.Number + userCont.Password + md5Token + sha1Token := publicmethod.Sha1Encryption(sha1Str) + + //返回值 + saveData := publicmethod.MapOut[string]() + saveData["key"] = userKeyCode + saveData["token"] = sha1Token + saveData["userinfo"] = userCont + menuoper, jurisdiction := getRoleSeat(userCont.Role) + writeRedisData := map[string]interface{}{ + "userkey": userKeyCode, + "key": userCont.Key, + "usernumber": userCont.Number, + "userpwd": userCont.Password, + "usertoken": sha1Token, + "jurisdiction": jurisdiction, + "menuOper": menuoper, + "wand": 118, + } + //API Token数据 + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKeyCode) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + redisClient.SetRedisTime(10800) + redisClient.HashMsetAdd(redisFileKey, writeRedisData) + //缓存写入个人信息 + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userCont.Number) + myCont := publicmethod.MapOut[string]() + myCont["id"] = userCont.Id + myCont["number"] = userCont.Number //员工工号 + myCont["name"] = userCont.Name //姓名 + myCont["icon"] = userCont.Icon //头像 + myCont["hire_class"] = userCont.HireClass //雇佣类型(1:雇佣入职;2:再入职;) + myCont["emp_type"] = userCont.EmpType //用工关系(1:临时工 , 2:编外人员 ;3:实习&实习生;4:试用员工;5:待分配;6:待岗;7:临时调入;8:正式员工;9:长期病假;10:停薪留职;11:退休;12:辞职;13:辞退;14:离职) + myCont["company"] = userCont.Company //入职公司 + myCont["maindeparment"] = userCont.MainDeparment //主部门 + myCont["sun_main_department"] = userCont.SunMainDeparment //二级主部门 + myCont["deparment"] = userCont.Deparment //部门 + myCont["admin_org"] = userCont.AdminOrg //所属行政组织 + myCont["teamid"] = userCont.TeamId //班组 + myCont["position"] = userCont.Position //职位 + myCont["job_class"] = userCont.JobClass //职务分类 + myCont["job_id"] = userCont.JobId //职务 + myCont["job_leve"] = userCont.JobLeve //职务等级 + myCont["wechat"] = userCont.Wechat //微信UserId + myCont["work_wechat"] = userCont.WorkWechat //企业微信UserId + myCont["state"] = userCont.State //状态(1:启用;2:禁用;3:删除) + myCont["key"] = userCont.Key //key + myCont["is_admin"] = userCont.IsAdmin //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管 + myCont["password"] = userCont.Password //密码 + myCont["role"] = userCont.Role //角色 + myCont["idcardno"] = userCont.Idcardno //身份证号 + myCont["passportno"] = userCont.Passportno //护照号码 + myCont["globalroaming"] = userCont.Globalroaming //国际区号 + myCont["mobilephone"] = userCont.Mobilephone //手机号码 + myCont["email"] = userCont.Email //电子邮件 + myCont["gender"] = userCont.Gender //性别(1:男性;2:女性;3:中性) + myCont["birthday"] = userCont.Birthday //birthday + myCont["myfolk"] = userCont.Myfolk //民族 + myCont["nativeplace"] = userCont.Nativeplace //籍贯 + myCont["idcardstartdate"] = userCont.Idcardstartdate //身份证有效期开始 + myCont["idcardenddate"] = userCont.Idcardenddate //身份证有效期结束 + myCont["idcardaddress"] = userCont.Idcardaddress //身份证地址 + myCont["idcardIssued"] = userCont.IdcardIssued //身份证签发机关 + myCont["health"] = userCont.Health //健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废) + myCont["maritalstatus"] = userCont.Maritalstatus //婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异) + myCont["internaltelephone"] = userCont.Internaltelephone //内线电话 + myCont["currentresidence"] = userCont.Currentresidence //现居住地址 + myCont["constellationing"] = userCont.Constellation //星座(1:白羊座;2:金牛座;3:双子座;4:巨蟹座;5:狮子座;6:处女座;7:天枰座;8:天蝎座;9:射手座;10:摩羯座;11:水瓶座;12:双鱼座) + myCont["isdoubleworker"] = userCont.Isdoubleworker //是否双职工(1:是;2:否) + myCont["isveterans"] = userCont.Isveterans //是否为退役军人(1:是;2:否) + myCont["veteransnumber"] = userCont.Veteransnumber //退役证编号 + myCont["jobstartdate"] = userCont.Jobstartdate //参加工作日期 + myCont["entrydate"] = userCont.Entrydate //入职日期 + myCont["probationperiod"] = userCont.Probationperiod //试用期 + myCont["planformaldate"] = userCont.Planformaldate //预计转正日期 + myCont["political_outlook"] = userCont.PoliticalOutlook //政治面貌(1:群众;2:无党派;3:台盟会员;4:九三社员;5:致公党员;6:农工党员;7:民进会员;8:民建会员;9:民盟盟员;10:民革会员,11:共青团员;12:预备党员;13:中共党员) + redisClient.HashMsetAdd(redisMyContKey, myCont) + publicmethod.Result(0, saveData, c) +} + +//获取权限点位 +func getRoleSeat(roleId string) (menuStr, buttonStr string) { + var roleInfo models.SystemRole + err := roleInfo.GetCont(map[string]interface{}{"r_id": roleId}, "r_menu_oper", "r_jurisdiction") + if err != nil { + return + } + menuStr = roleInfo.MenuOper + buttonStr = roleInfo.Jurisdiction + return +} + +//退出登录 +func (a *ApiMethod) SignOut(c *gin.Context) { + userKey := c.Request.Header.Get("user-key") + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKey) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + userToken, isTrue := redisClient.HashGetAll(redisFileKey) + if isTrue == false { + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + // fmt.Printf("userToken----->%v\n", userToken) + _, err := publicmethod.GetUserRedisCont(userToken["usernumber"]) + if err != nil { + redisClient.DelKey(redisFileKey) + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + redisClient.DelKey(redisFileKey) + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userToken["usernumber"]) + redisClient.DelKey(redisMyContKey) + publicmethod.Result(0, isTrue, c, "退出成功!") +} diff --git a/.history/api/base/loginVerify/login_20220729082930.go b/.history/api/base/loginVerify/login_20220729082930.go new file mode 100644 index 0000000..7a72e9d --- /dev/null +++ b/.history/api/base/loginVerify/login_20220729082930.go @@ -0,0 +1,188 @@ +package loginVerify + +import ( + "fmt" + "key_performance_indicators/middleware/grocerystore" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { + var requestData Login + c.ShouldBindJSON(&requestData) + + if requestData.Username == "" { + publicmethod.Result(1, requestData, c, "请输入用户名!") + return + } + if requestData.Password == "" { + publicmethod.Result(1, requestData, c, "请输入密码!") + return + } + if requestData.Captcha == "" { + publicmethod.Result(1, requestData, c, "请输入验证码!") + return + } + + // if store.Verify(requestData.CaptchaId, requestData.Captcha, true) != true { + // publicmethod.Result(1, requestData, c, "验证码不正确!") + // return + // } + + userAgent := c.Request.Header.Get("User-Agent") // 获取用户代理 + // userAgent = "250" + + var md5JiaMiPwd publicmethod.Md5Encryption + md5JiaMiPwd.Md5EncryptionInit(requestData.Password) + md5TokenPwd := md5JiaMiPwd.Md5EncryptionAlgorithm() + // var oldAdmin OldSchollAdmin + // oldErr := overall.CONSTANT_DB_Master.Model(&models.SystemUser{}).Select("system_user.*,system_user_attribute.*").Joins("left join system_user_attribute on system_user.u_key = system_user_attribute.ua_id").Where("`u_name` = ? AND `u_password` = ?", requestData.Username, md5TokenPwd).First(&oldAdmin).Error + // if oldErr == nil { + // //原知行学院管理员账号登录 + // } + + //新的登录认证方式 + var userCont models.ManCont + userErr := userCont.GetCont(map[string]interface{}{"number": requestData.Username, "password": md5TokenPwd}) + if userErr != nil { + publicmethod.Result(2000, userErr, c) + return + } + if requestData.OpenId != "" { + var userInfo models.PersonArchives + userInfo.EiteCont(map[string]interface{}{"id": userCont.Id}, map[string]interface{}{"work_wechat": requestData.OpenId}) + } + if userCont.State == 2 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号已经被禁用!") + return + } + if userCont.State == 3 { + publicmethod.Result(1, userErr, c, "登陆失败! 该账号不存在!") + return + } + + var md5JiaMi publicmethod.Md5Encryption + md5JiaMi.Md5EncryptionInit(userAgent) + md5Token := md5JiaMi.Md5EncryptionAlgorithm() + + var md5JiaMiNumber publicmethod.Md5Encryption + md5JiaMiNumber.Md5EncryptionInit(userCont.Number) + userKeyCode := md5JiaMiNumber.Md5EncryptionAlgorithm() + + sha1Str := userKeyCode + userCont.Number + userCont.Password + md5Token + sha1Token := publicmethod.Sha1Encryption(sha1Str) + + //返回值 + saveData := publicmethod.MapOut[string]() + saveData["key"] = userKeyCode + saveData["token"] = sha1Token + saveData["userinfo"] = userCont + menuoper, jurisdiction := getRoleSeat(userCont.Role) + writeRedisData := map[string]interface{}{ + "userkey": userKeyCode, + "key": userCont.Key, + "usernumber": userCont.Number, + "userpwd": userCont.Password, + "usertoken": sha1Token, + "jurisdiction": jurisdiction, + "menuOper": menuoper, + "wand": 118, + } + //API Token数据 + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKeyCode) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + redisClient.SetRedisTime(10800) + redisClient.HashMsetAdd(redisFileKey, writeRedisData) + //缓存写入个人信息 + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userCont.Number) + myCont := publicmethod.MapOut[string]() + myCont["id"] = userCont.Id + myCont["number"] = userCont.Number //员工工号 + myCont["name"] = userCont.Name //姓名 + myCont["icon"] = userCont.Icon //头像 + myCont["hire_class"] = userCont.HireClass //雇佣类型(1:雇佣入职;2:再入职;) + myCont["emp_type"] = userCont.EmpType //用工关系(1:临时工 , 2:编外人员 ;3:实习&实习生;4:试用员工;5:待分配;6:待岗;7:临时调入;8:正式员工;9:长期病假;10:停薪留职;11:退休;12:辞职;13:辞退;14:离职) + myCont["company"] = userCont.Company //入职公司 + myCont["maindeparment"] = userCont.MainDeparment //主部门 + myCont["sun_main_department"] = userCont.SunMainDeparment //二级主部门 + myCont["deparment"] = userCont.Deparment //部门 + myCont["admin_org"] = userCont.AdminOrg //所属行政组织 + myCont["teamid"] = userCont.TeamId //班组 + myCont["position"] = userCont.Position //职位 + myCont["job_class"] = userCont.JobClass //职务分类 + myCont["job_id"] = userCont.JobId //职务 + myCont["job_leve"] = userCont.JobLeve //职务等级 + myCont["wechat"] = userCont.Wechat //微信UserId + myCont["work_wechat"] = userCont.WorkWechat //企业微信UserId + myCont["state"] = userCont.State //状态(1:启用;2:禁用;3:删除) + myCont["key"] = userCont.Key //key + myCont["is_admin"] = userCont.IsAdmin //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管 + myCont["password"] = userCont.Password //密码 + myCont["role"] = userCont.Role //角色 + myCont["idcardno"] = userCont.Idcardno //身份证号 + myCont["passportno"] = userCont.Passportno //护照号码 + myCont["globalroaming"] = userCont.Globalroaming //国际区号 + myCont["mobilephone"] = userCont.Mobilephone //手机号码 + myCont["email"] = userCont.Email //电子邮件 + myCont["gender"] = userCont.Gender //性别(1:男性;2:女性;3:中性) + myCont["birthday"] = userCont.Birthday //birthday + myCont["myfolk"] = userCont.Myfolk //民族 + myCont["nativeplace"] = userCont.Nativeplace //籍贯 + myCont["idcardstartdate"] = userCont.Idcardstartdate //身份证有效期开始 + myCont["idcardenddate"] = userCont.Idcardenddate //身份证有效期结束 + myCont["idcardaddress"] = userCont.Idcardaddress //身份证地址 + myCont["idcardIssued"] = userCont.IdcardIssued //身份证签发机关 + myCont["health"] = userCont.Health //健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废) + myCont["maritalstatus"] = userCont.Maritalstatus //婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异) + myCont["internaltelephone"] = userCont.Internaltelephone //内线电话 + myCont["currentresidence"] = userCont.Currentresidence //现居住地址 + myCont["constellationing"] = userCont.Constellation //星座(1:白羊座;2:金牛座;3:双子座;4:巨蟹座;5:狮子座;6:处女座;7:天枰座;8:天蝎座;9:射手座;10:摩羯座;11:水瓶座;12:双鱼座) + myCont["isdoubleworker"] = userCont.Isdoubleworker //是否双职工(1:是;2:否) + myCont["isveterans"] = userCont.Isveterans //是否为退役军人(1:是;2:否) + myCont["veteransnumber"] = userCont.Veteransnumber //退役证编号 + myCont["jobstartdate"] = userCont.Jobstartdate //参加工作日期 + myCont["entrydate"] = userCont.Entrydate //入职日期 + myCont["probationperiod"] = userCont.Probationperiod //试用期 + myCont["planformaldate"] = userCont.Planformaldate //预计转正日期 + myCont["political_outlook"] = userCont.PoliticalOutlook //政治面貌(1:群众;2:无党派;3:台盟会员;4:九三社员;5:致公党员;6:农工党员;7:民进会员;8:民建会员;9:民盟盟员;10:民革会员,11:共青团员;12:预备党员;13:中共党员) + redisClient.HashMsetAdd(redisMyContKey, myCont) + publicmethod.Result(0, saveData, c) +} + +//获取权限点位 +func getRoleSeat(roleId string) (menuStr, buttonStr string) { + var roleInfo models.SystemRole + err := roleInfo.GetCont(map[string]interface{}{"r_id": roleId}, "r_menu_oper", "r_jurisdiction") + if err != nil { + return + } + menuStr = roleInfo.MenuOper + buttonStr = roleInfo.Jurisdiction + return +} + +//退出登录 +func (a *ApiMethod) SignOut(c *gin.Context) { + userKey := c.Request.Header.Get("user-key") + redisFileKey := fmt.Sprintf("ScanCode:Authentication:LoginApi_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userKey) + redisClient := grocerystore.RunRedis(overall.CONSTANT_REDIS5) + userToken, isTrue := redisClient.HashGetAll(redisFileKey) + if isTrue == false { + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + // fmt.Printf("userToken----->%v\n", userToken) + _, err := publicmethod.GetUserRedisCont(userToken["usernumber"]) + if err != nil { + redisClient.DelKey(redisFileKey) + publicmethod.Result(0, isTrue, c, "退出成功!") + return + } + redisClient.DelKey(redisFileKey) + redisMyContKey := fmt.Sprintf("ScanCode:Authentication:UserCont_%v_%v", overall.CONSTANT_CONFIG.RedisPrefixStr.Alias, userToken["usernumber"]) + redisClient.DelKey(redisMyContKey) + publicmethod.Result(0, isTrue, c, "退出成功!") +} diff --git a/.history/api/version1/honoraryArchives/honors_20220727153717.go b/.history/api/version1/honoraryArchives/honors_20220727153717.go new file mode 100644 index 0000000..1e46c3a --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220727153717.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729090701.go b/.history/api/version1/honoraryArchives/honors_20220729090701.go new file mode 100644 index 0000000..b1cf602 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729090701.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729090708.go b/.history/api/version1/honoraryArchives/honors_20220729090708.go new file mode 100644 index 0000000..b1cf602 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729090708.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729090730.go b/.history/api/version1/honoraryArchives/honors_20220729090730.go new file mode 100644 index 0000000..9b33e3e --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729090730.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont // + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729090740.go b/.history/api/version1/honoraryArchives/honors_20220729090740.go new file mode 100644 index 0000000..73b9b0b --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729090740.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729092037.go b/.history/api/version1/honoraryArchives/honors_20220729092037.go new file mode 100644 index 0000000..7af79f4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729092037.go @@ -0,0 +1,336 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} + + diff --git a/.history/api/version1/honoraryArchives/honors_20220729094120.go b/.history/api/version1/honoraryArchives/honors_20220729094120.go new file mode 100644 index 0000000..8e754d6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729094120.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属哪个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729100358.go b/.history/api/version1/honoraryArchives/honors_20220729100358.go new file mode 100644 index 0000000..d514503 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729100358.go @@ -0,0 +1,335 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属哪个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + requestData.i + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729100400.go b/.history/api/version1/honoraryArchives/honors_20220729100400.go new file mode 100644 index 0000000..7699df0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729100400.go @@ -0,0 +1,335 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属哪个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + requestData.Id + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/honors_20220729100406.go b/.history/api/version1/honoraryArchives/honors_20220729100406.go new file mode 100644 index 0000000..8e754d6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/honors_20220729100406.go @@ -0,0 +1,334 @@ +package honoraryArchives + +import ( + "fmt" + "key_performance_indicators/middleware/snowflake" + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" + "gorm.io/gorm" +) + +//荣誉列表 +func (a *ApiMethod) HonorList(c *gin.Context) { + var requestData honorListKey + c.ShouldBindJSON(&requestData) + var honorsList []models.HonoraryArchives + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.HonoraryArchives{}).Where("state BETWEEN ? AND ?", 1, 2) + if requestData.Name != "" { + gormDb = gormDb.Where("`name` LIKE ?", "%"+requestData.Name+"%") + } + if requestData.IssuingAgency != "" { + gormDb = gormDb.Where("`issuing_unit` LIKE ?", "%"+requestData.IssuingAgency+"%") + } + if requestData.Carrier != 0 { + gormDb = gormDb.Where("carrier = ?", requestData.Carrier) + } + if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin != "" && requestData.AwardTimeEnd == "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeBegin) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeBegin) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } else if requestData.AwardTimeBegin == "" && requestData.AwardTimeEnd != "" { + timeBegin := fmt.Sprintf("%v 00:00:00", requestData.AwardTimeEnd) + timeEnd := fmt.Sprintf("%v 23:59:59", requestData.AwardTimeEnd) + gormDb = gormDb.Where("`award_time` BETWEEN ?", timeBegin, timeEnd) + } + if requestData.Organize != "" { + gormDb = gormDb.Where("organization = ?", requestData.Organize) + } + if requestData.UserKey != "" { + gormDb = gormDb.Where("userid = ?", requestData.UserKey) + } + var total int64 + totalErr := gormDb.Count(&total).Error + if totalErr != nil { + total = 0 + } + gormDb = publicmethod.PageTurningSettings(gormDb, requestData.Page, requestData.PageSize) + err := gormDb.Order("`id` DESC").Find(&honorsList).Error + if err != nil { + publicmethod.Result(105, err, c) + return + } + publicmethod.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(honorsList)), honorsList, c) +} + +//添加荣誉 +func (a *ApiMethod) AddHonorCont(c *gin.Context) { + var requestData addHonorCont //添加荣誉字段 + c.ShouldBindJSON(&requestData) + if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + var uuId int64 = 0 + snowflakeId, snowflakeErr := snowflake.NewWorker(1) + if snowflakeErr != nil { + uuId = publicmethod.TableNumber() + } else { + uuId = snowflakeId.GetId() + } + var honorCont models.HonoraryArchives + honorCont.Id = uuId + honorCont.Name = requestData.Name //荣誉名称"` + honorCont.IssuingUnit = requestData.IssuingAgency //发放单位"` + honorCont.Carrier = int64(requestData.Carrier) //载体"` + awardTime, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + honorCont.AwardTime = awardTime //获奖时间"` + if requestData.EfficientDate != "" { + termvalidity, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if termvalidity <= awardTime { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } + honorCont.TermOfValidity = termvalidity //有效期限"` + } + + honorCont.Contet = requestData.Remark //备注"` + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + honorCont.Organization = organizationId //归属行政组织"` + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + honorCont.Userid = userId //归属人员"` + } + honorCont.Time = time.Now().Unix() //创建时间"` + honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + if len(requestData.ImgUrl) > 0 { + var imgList []models.PhotosGallery //图片档案 + for _, v := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = uuId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属哪个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgList = append(imgList, imgCont) + } + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if err := tx.Create(&honorCont).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + if err := tx.Create(&imgList).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + return nil + }) + if addErr != nil { + publicmethod.Result(104, addErr.Error(), c) + } else { + publicmethod.Result(0, addErr, c) + } + } else { + addErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Create(&honorCont) + if addErr != nil { + publicmethod.Result(104, addErr, c) + } else { + publicmethod.Result(0, addErr, c) + } + } +} + +//编辑荣誉 +func (a *ApiMethod) EidyHonorCont(c *gin.Context) { + var requestData eidtHonorCont + c.ShouldBindJSON(&requestData) + if requestData.Id == "" || requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.Carrier == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + //原信息 + var honContOld models.HonoraryArchives + err := honContOld.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + //要修改的内容 + saveData := publicmethod.MapOut[string]() + if requestData.Name != "" && requestData.Name != honContOld.Name { + saveData["name"] = requestData.Name + } + if requestData.IssuingAgency != "" && requestData.IssuingAgency != honContOld.IssuingUnit { + saveData["issuing_unit"] = requestData.IssuingAgency + } + if requestData.Carrier != honContOld.Carrier { + saveData["carrier"] = requestData.Carrier + } + var awardTime int64 = 0 + if requestData.AwardTime != "" { + awardTime, _ = publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.AwardTime)) + if awardTime != honContOld.AwardTime { + saveData["award_time"] = awardTime + } + } + if requestData.EfficientDate != "" { + efficientDate, _ := publicmethod.DateToTimeStamp(fmt.Sprintf("%v 12:00:00", requestData.EfficientDate)) + if efficientDate != honContOld.TermOfValidity { + if awardTime != 0 && awardTime >= efficientDate { + publicmethod.Result(1, requestData, c, "有效日期必须晚于获奖日期!") + return + } else { + saveData["award_time"] = efficientDate + } + + } + } + if requestData.Organize != "" { + organizationId, _ := strconv.ParseInt(requestData.Organize, 10, 64) + if organizationId != honContOld.Organization { + saveData["organization"] = organizationId + } + } + if requestData.UserKey != "" { + userId, _ := strconv.ParseInt(requestData.UserKey, 10, 64) + if userId != honContOld.Userid { + saveData["userid"] = userId + } + } + if requestData.Remark != "" && requestData.Remark != honContOld.Contet { + saveData["contet"] = requestData.Remark + } + var imgUrlListNoId []models.PhotosGallery + var pldImgId []int64 + if len(requestData.ImgUrl) > 0 { + for _, v := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } + } + + if len(imgUrlListNoId) > 0 { + var imgList models.PhotosGallery + saveErr := overall.CONSTANT_DB_MANAGE_ARCHIVES.Transaction(func(tx *gorm.DB) error { + if len(pldImgId) > 0 { + if err := tx.Not(map[string]interface{}{"`id`": pldImgId}).Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } else { + if err := tx.Where(map[string]interface{}{"`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList).Error; err != nil { + return err + } + } + + saveData["time"] = time.Now().Unix() + + if err := tx.Model(&models.HonoraryArchives{}).Where(where).Updates(&saveData).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + if err := tx.Create(&imgUrlListNoId).Error; err != nil { + // 返回任何错误都会回滚事务 + return err + } + + return nil + }) + if saveErr == nil { + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + + } else { + saveData["time"] = time.Now().Unix() + saveErr := honContOld.EiteCont(where, saveData) + if saveErr == nil { + var imgList models.PhotosGallery + if len(pldImgId) > 0 { + overall.CONSTANT_DB_MANAGE_ARCHIVES.Not(map[string]interface{}{"`id`": pldImgId, "`ascription_id`": requestData.Id, "`ascription_data_sheet`": "honorary_archives"}).Delete(&imgList) + } else { + imgList.DelCont(map[string]interface{}{"ascription_id": requestData.Id, "ascription_data_sheet": "honorary_archives"}) + } + publicmethod.Result(0, err, c) + } else { + publicmethod.Result(106, err, c) + } + } +} + +//编辑状态 +func (a *ApiMethod) EidyHonorContState(c *gin.Context) { + var requestData publicmethod.PublicState + c.ShouldBindJSON(&requestData) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + if requestData.State == 0 { + requestData.State = 1 + } + if requestData.IsTrue == 0 { + requestData.IsTrue = 2 + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + var carrierTypeCont models.HonoraryArchives + judgeErr := carrierTypeCont.GetCont(where, "`id`") + if judgeErr != nil { + publicmethod.Result(107, judgeErr, c) + return + } + if requestData.State != 3 { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + if requestData.IsTrue == 1 { + err := carrierTypeCont.DelCont(where) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } else { + err := carrierTypeCont.EiteCont(where, map[string]interface{}{"`state`": requestData.State}) + if err != nil { + publicmethod.Result(106, err, c) + return + } + } + } + publicmethod.Result(0, carrierTypeCont, c) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085406.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085406.go new file mode 100644 index 0000000..e69de29 diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085612.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085612.go new file mode 100644 index 0000000..87b893f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729085612.go @@ -0,0 +1 @@ +package honoraryArchives diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085621.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085621.go new file mode 100644 index 0000000..2e9e5f7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729085621.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +// 加载图片 diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085623.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085623.go new file mode 100644 index 0000000..119ff0d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729085623.go @@ -0,0 +1,5 @@ +package honoraryArchives + + +// 加载图片 +func \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085628.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085628.go new file mode 100644 index 0000000..ae0d610 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729085628.go @@ -0,0 +1,5 @@ +package honoraryArchives + + +// 加载图片 +func () \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729085638.go b/.history/api/version1/honoraryArchives/operate_photo_20220729085638.go new file mode 100644 index 0000000..87b893f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729085638.go @@ -0,0 +1 @@ +package honoraryArchives diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092055.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092055.go new file mode 100644 index 0000000..9f5843d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092055.go @@ -0,0 +1,3 @@ +package honoraryArchives + + diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092059.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092059.go new file mode 100644 index 0000000..568e398 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092059.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092120.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092120.go new file mode 100644 index 0000000..99fd9ca --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092120.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func Review images \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092122.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092122.go new file mode 100644 index 0000000..176f63b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092122.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func ReviewImages \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092125.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092125.go new file mode 100644 index 0000000..87156c4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092125.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func eeviewImages \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092127.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092127.go new file mode 100644 index 0000000..e2d27a5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092127.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func reviewImages \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092130.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092130.go new file mode 100644 index 0000000..17cf880 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092130.go @@ -0,0 +1,4 @@ +package honoraryArchives + + +func reviewImages() \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092136.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092136.go new file mode 100644 index 0000000..7f1e602 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092136.go @@ -0,0 +1,3 @@ +package honoraryArchives + +func reviewImages(a ApiMethod) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092139.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092139.go new file mode 100644 index 0000000..9bb3094 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092139.go @@ -0,0 +1,3 @@ +package honoraryArchives + +func reviewImages(a @ApiMethod) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092140.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092140.go new file mode 100644 index 0000000..7f1e602 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092140.go @@ -0,0 +1,3 @@ +package honoraryArchives + +func reviewImages(a ApiMethod) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092141.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092141.go new file mode 100644 index 0000000..fa9de03 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092141.go @@ -0,0 +1,3 @@ +package honoraryArchives + +func reviewImages(a *ApiMethod) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092204.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092204.go new file mode 100644 index 0000000..58d763f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092204.go @@ -0,0 +1,5 @@ +package honoraryArchives + +func reviewImages(a *ApiMethod){ + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092210.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092210.go new file mode 100644 index 0000000..a7dd378 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092210.go @@ -0,0 +1,5 @@ +package honoraryArchives + +func (a *ApiMethod)reviewImages{ + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092216.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092216.go new file mode 100644 index 0000000..a98fa13 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092216.go @@ -0,0 +1,5 @@ +package honoraryArchives + +func (a *ApiMethod)reviewImages(c *gin.){ + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092329.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092329.go new file mode 100644 index 0000000..4bd9578 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092329.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092331.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092331.go new file mode 100644 index 0000000..d7bb7cf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092331.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { +`` +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092333.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092333.go new file mode 100644 index 0000000..bbedfc8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092333.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092528.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092528.go new file mode 100644 index 0000000..d6e8299 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092528.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092538.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092538.go new file mode 100644 index 0000000..04e38f0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092538.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData po +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092541.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092541.go new file mode 100644 index 0000000..922806d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092541.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData poto +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092543.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092543.go new file mode 100644 index 0000000..6e451e1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092543.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData PhotosGallery +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092559.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092559.go new file mode 100644 index 0000000..898cf0a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092559.go @@ -0,0 +1,7 @@ +package honoraryArchives + +import "github.com/gin-gonic/gin" + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData o +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092601.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092601.go new file mode 100644 index 0000000..0e64dad --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092601.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData overall. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092603.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092603.go new file mode 100644 index 0000000..0e64dad --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092603.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData overall. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092606.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092606.go new file mode 100644 index 0000000..0e64dad --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092606.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData overall. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092612.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092612.go new file mode 100644 index 0000000..58a9fb5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092612.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData me +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092616.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092616.go new file mode 100644 index 0000000..d91959e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092616.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092622.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092622.go new file mode 100644 index 0000000..7129e6d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092622.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092624.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092624.go new file mode 100644 index 0000000..a0605d4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092624.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092658.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092658.go new file mode 100644 index 0000000..a0605d4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092658.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092703.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092703.go new file mode 100644 index 0000000..476c2d8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092703.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092706.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092706.go new file mode 100644 index 0000000..49cbbe5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092706.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.con +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729092708.go b/.history/api/version1/honoraryArchives/operate_photo_20220729092708.go new file mode 100644 index 0000000..a0605d4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729092708.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093032.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093032.go new file mode 100644 index 0000000..4c8c7e8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093032.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.shoubui +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093033.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093033.go new file mode 100644 index 0000000..4ecc4bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093033.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.shoub +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093038.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093038.go new file mode 100644 index 0000000..685b308 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093038.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.shouldbind +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093040.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093040.go new file mode 100644 index 0000000..ce7c29b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093040.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.ShouldBindJSON() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093044.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093044.go new file mode 100644 index 0000000..310d0f7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093044.go @@ -0,0 +1,12 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData models.PhotosGallery + c.ShouldBindJSON(requestData) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093219.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093219.go new file mode 100644 index 0000000..b431ca7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093219.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093228.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093228.go new file mode 100644 index 0000000..d57d5cf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093228.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData ph +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093230.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093230.go new file mode 100644 index 0000000..c989b9d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093230.go @@ -0,0 +1,10 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093232.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093232.go new file mode 100644 index 0000000..177bd1d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093232.go @@ -0,0 +1,10 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093237.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093237.go new file mode 100644 index 0000000..22aeb9d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093237.go @@ -0,0 +1,10 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.shou +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093240.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093240.go new file mode 100644 index 0000000..5d0ab95 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093240.go @@ -0,0 +1,10 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093243.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093243.go new file mode 100644 index 0000000..6783759 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093243.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093244.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093244.go new file mode 100644 index 0000000..a030da9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093244.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729093311.go b/.history/api/version1/honoraryArchives/operate_photo_20220729093311.go new file mode 100644 index 0000000..6783759 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729093311.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729094010.go b/.history/api/version1/honoraryArchives/operate_photo_20220729094010.go new file mode 100644 index 0000000..f423a4a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729094010.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + c. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729094020.go b/.history/api/version1/honoraryArchives/operate_photo_20220729094020.go new file mode 100644 index 0000000..9942e30 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729094020.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + if requestData. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729094457.go b/.history/api/version1/honoraryArchives/operate_photo_20220729094457.go new file mode 100644 index 0000000..6783759 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729094457.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095039.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095039.go new file mode 100644 index 0000000..6783759 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095039.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095521.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095521.go new file mode 100644 index 0000000..6783759 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095521.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095537.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095537.go new file mode 100644 index 0000000..3f8e158 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095537.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095541.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095541.go new file mode 100644 index 0000000..8277edd --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095541.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var phots +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095542.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095542.go new file mode 100644 index 0000000..4a79166 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095542.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var phot +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095548.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095548.go new file mode 100644 index 0000000..c634bde --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095548.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var photo_List +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095550.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095550.go new file mode 100644 index 0000000..5951a42 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095550.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095553.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095553.go new file mode 100644 index 0000000..d7d41e5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095553.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095555.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095555.go new file mode 100644 index 0000000..adf073d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095555.go @@ -0,0 +1,11 @@ +package honoraryArchives + +import ( + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List [] +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095559.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095559.go new file mode 100644 index 0000000..c5f3c1e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095559.go @@ -0,0 +1,13 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.g +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095600.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095600.go new file mode 100644 index 0000000..a707036 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095600.go @@ -0,0 +1,13 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095610.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095610.go new file mode 100644 index 0000000..31b8910 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095610.go @@ -0,0 +1,14 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095618.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095618.go new file mode 100644 index 0000000..31556ac --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095618.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095707.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095707.go new file mode 100644 index 0000000..0ea8732 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095707.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095719.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095719.go new file mode 100644 index 0000000..409ba39 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095719.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095722.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095722.go new file mode 100644 index 0000000..258967e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095722.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095727.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095727.go new file mode 100644 index 0000000..db99682 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095727.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&model.p) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095728.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095728.go new file mode 100644 index 0000000..b5efc65 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095728.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&model.ph) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095731.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095731.go new file mode 100644 index 0000000..c380ec6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095731.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&model.PhotosGallery) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095733.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095733.go new file mode 100644 index 0000000..5a9824e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095733.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095741.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095741.go new file mode 100644 index 0000000..be3ca0a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095741.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095753.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095753.go new file mode 100644 index 0000000..a8464b5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095753.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095834.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095834.go new file mode 100644 index 0000000..5128076 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095834.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("") +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095850.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095850.go new file mode 100644 index 0000000..aec63cc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095850.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095906.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095906.go new file mode 100644 index 0000000..f299aaf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095906.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + gormDboverall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095907.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095907.go new file mode 100644 index 0000000..7cb251f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095907.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095918.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095918.go new file mode 100644 index 0000000..5a2ac26 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095918.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明 + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095925.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095925.go new file mode 100644 index 0000000..aba012a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095925.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明ron + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095930.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095930.go new file mode 100644 index 0000000..ffed4ba --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095930.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095938.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095938.go new file mode 100644 index 0000000..946b6df --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095938.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行绑定 + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729095959.go b/.history/api/version1/honoraryArchives/operate_photo_20220729095959.go new file mode 100644 index 0000000..ae77914 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729095959.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100005.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100005.go new file mode 100644 index 0000000..8436b8f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100005.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100009.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100009.go new file mode 100644 index 0000000..d58a742 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100009.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100015.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100015.go new file mode 100644 index 0000000..3157251 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100015.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100024.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100024.go new file mode 100644 index 0000000..cb121fc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100024.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100118.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100118.go new file mode 100644 index 0000000..cb121fc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100118.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100140.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100140.go new file mode 100644 index 0000000..e74a34d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100140.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100142.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100142.go new file mode 100644 index 0000000..cb121fc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100142.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100143.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100143.go new file mode 100644 index 0000000..98669da --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100143.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100145.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100145.go new file mode 100644 index 0000000..097fb78 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100145.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取chu +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100157.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100157.go new file mode 100644 index 0000000..b95f8a0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100157.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取除除删除 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100200.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100200.go new file mode 100644 index 0000000..ca7a7e2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100200.go @@ -0,0 +1,15 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) // 获取除了删除 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100205.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100205.go new file mode 100644 index 0000000..6c8737a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100205.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100224.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100224.go new file mode 100644 index 0000000..0d3ee0f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100224.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100533.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100533.go new file mode 100644 index 0000000..d606c10 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100533.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100535.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100535.go new file mode 100644 index 0000000..44789a0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100535.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100540.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100540.go new file mode 100644 index 0000000..021e184 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100540.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100551.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100551.go new file mode 100644 index 0000000..bdcc09e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100551.go @@ -0,0 +1,16 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" || requestData. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100619.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100619.go new file mode 100644 index 0000000..e6dcf1f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100619.go @@ -0,0 +1,18 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100628.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100628.go new file mode 100644 index 0000000..5c20109 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100628.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100649.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100649.go new file mode 100644 index 0000000..1ba36cc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100649.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100654.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100654.go new file mode 100644 index 0000000..1ba36cc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100654.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100703.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100703.go new file mode 100644 index 0000000..eb4421a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100703.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100705.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100705.go new file mode 100644 index 0000000..ec40402 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100705.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := p +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100707.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100707.go new file mode 100644 index 0000000..e30e1e3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100707.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100712.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100712.go new file mode 100644 index 0000000..94f6987 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100712.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[]() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100718.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100718.go new file mode 100644 index 0000000..73f2bb1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100718.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100722.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100722.go new file mode 100644 index 0000000..43c17f1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100722.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100729.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100729.go new file mode 100644 index 0000000..43c17f1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100729.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100734.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100734.go new file mode 100644 index 0000000..36b0d39 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100734.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100807.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100807.go new file mode 100644 index 0000000..270e7c9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100807.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" || requestData.{ + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100816.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100816.go new file mode 100644 index 0000000..1c982ef --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100816.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" || requestData{ + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100819.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100819.go new file mode 100644 index 0000000..36b0d39 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100819.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100844.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100844.go new file mode 100644 index 0000000..8c3fce4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100844.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100850.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100850.go new file mode 100644 index 0000000..24334c8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100850.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100852.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100852.go new file mode 100644 index 0000000..394d3f1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100852.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where[""] + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100903.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100903.go new file mode 100644 index 0000000..377f630 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100903.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["AscriptionId"] = + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100908.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100908.go new file mode 100644 index 0000000..bcb2f43 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100908.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["AscriptionId"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100928.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100928.go new file mode 100644 index 0000000..e209ce8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100928.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取 + where["AscriptionId"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729100933.go b/.history/api/version1/honoraryArchives/operate_photo_20220729100933.go new file mode 100644 index 0000000..6b59500 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729100933.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101030.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101030.go new file mode 100644 index 0000000..f193b31 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101030.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101205.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101205.go new file mode 100644 index 0000000..542d423 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101205.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101208.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101208.go new file mode 100644 index 0000000..542d423 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101208.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101214.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101214.go new file mode 100644 index 0000000..f193b31 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101214.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101224.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101224.go new file mode 100644 index 0000000..542d423 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101224.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101226.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101226.go new file mode 100644 index 0000000..69a22a1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101226.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var p +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101231.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101231.go new file mode 100644 index 0000000..ea83ed5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101231.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photo +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101235.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101235.go new file mode 100644 index 0000000..ca2f569 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101235.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGallery +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101237.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101237.go new file mode 100644 index 0000000..d0810c6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101237.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryBy +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101531.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101531.go new file mode 100644 index 0000000..8ca1bb4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101531.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101536.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101536.go new file mode 100644 index 0000000..17330d9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101536.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId mode +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101541.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101541.go new file mode 100644 index 0000000..444b709 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101541.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId model +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101545.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101545.go new file mode 100644 index 0000000..0f0a95d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101545.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101546.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101546.go new file mode 100644 index 0000000..dc6de9a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101546.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101551.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101551.go new file mode 100644 index 0000000..2ed63aa --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101551.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + photoGalleryByAscriptionId = +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101556.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101556.go new file mode 100644 index 0000000..2ed63aa --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101556.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + photoGalleryByAscriptionId = +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101616.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101616.go new file mode 100644 index 0000000..6ddc0cf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101616.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + photoGalleryByAscriptionId.get +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101619.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101619.go new file mode 100644 index 0000000..6c34f25 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101619.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + photoGalleryByAscriptionId.GetCont(where) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101624.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101624.go new file mode 100644 index 0000000..dcea6d0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101624.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101628.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101628.go new file mode 100644 index 0000000..1f35aba --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101628.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) + if err != +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101630.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101630.go new file mode 100644 index 0000000..63d37bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101630.go @@ -0,0 +1,28 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101637.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101637.go new file mode 100644 index 0000000..cd37f19 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101637.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + retur + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101638.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101638.go new file mode 100644 index 0000000..21861f8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101638.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101652.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101652.go new file mode 100644 index 0000000..d87f220 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101652.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101655.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101655.go new file mode 100644 index 0000000..7d9baf0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101655.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) //g + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101657.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101657.go new file mode 100644 index 0000000..3a2e023 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101657.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) //根据 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101750.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101750.go new file mode 100644 index 0000000..afa3353 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101750.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) //根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101752.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101752.go new file mode 100644 index 0000000..3777cd6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101752.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) //根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101754.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101754.go new file mode 100644 index 0000000..c421908 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101754.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := photoGalleryByAscriptionId.GetCont(where) //根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101841.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101841.go new file mode 100644 index 0000000..5117c84 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101841.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb. + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101843.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101843.go new file mode 100644 index 0000000..b9d909d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101843.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.ge + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101847.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101847.go new file mode 100644 index 0000000..a8d7317 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101847.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.fin + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729101848.go b/.history/api/version1/honoraryArchives/operate_photo_20220729101848.go new file mode 100644 index 0000000..7914dc9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729101848.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Find() + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102224.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102224.go new file mode 100644 index 0000000..c890210 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102224.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("") + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102231.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102231.go new file mode 100644 index 0000000..f7d3d5f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102231.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid") + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102233.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102233.go new file mode 100644 index 0000000..6ecc985 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102233.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ") + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102236.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102236.go new file mode 100644 index 0000000..5542af7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102236.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ".) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102238.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102238.go new file mode 100644 index 0000000..1ec3ad3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102238.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?".) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102239.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102239.go new file mode 100644 index 0000000..01c5982 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102239.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + // 获取归属id + where["AscriptionId"] = requestData.Id + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?",) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102251.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102251.go new file mode 100644 index 0000000..5dc6e8e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102251.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?",) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102256.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102256.go new file mode 100644 index 0000000..601d66a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102256.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102304.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102304.go new file mode 100644 index 0000000..0e31f20 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102304.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id).find + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102305.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102305.go new file mode 100644 index 0000000..a1d6a82 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102305.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id).Find() + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102332.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102332.go new file mode 100644 index 0000000..b092b18 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102332.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id).Find(&ph) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102333.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102333.go new file mode 100644 index 0000000..826c979 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102333.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102334.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102334.go new file mode 100644 index 0000000..826c979 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102334.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + err := gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102337.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102337.go new file mode 100644 index 0000000..287f01b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102337.go @@ -0,0 +1,27 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102346.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102346.go new file mode 100644 index 0000000..2cdf986 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102346.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102506.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102506.go new file mode 100644 index 0000000..a75c22d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102506.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + for + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102510.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102510.go new file mode 100644 index 0000000..dd1dc95 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102510.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) + for + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102523.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102523.go new file mode 100644 index 0000000..340f306 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102523.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据 + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102538.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102538.go new file mode 100644 index 0000000..55378c7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102538.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102541.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102541.go new file mode 100644 index 0000000..5e561be --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102541.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102556.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102556.go new file mode 100644 index 0000000..5e561be --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102556.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102645.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102645.go new file mode 100644 index 0000000..23ecf00 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102645.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102652.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102652.go new file mode 100644 index 0000000..d9c7212 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102652.go @@ -0,0 +1,23 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) > 1 +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102706.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102706.go new file mode 100644 index 0000000..bb0a428 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102706.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) > 1 { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102709.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102709.go new file mode 100644 index 0000000..1f7242a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102709.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) > 1 { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102718.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102718.go new file mode 100644 index 0000000..5ac247b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102718.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) < 1 { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102722.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102722.go new file mode 100644 index 0000000..73c801c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102722.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) <= 0 { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102737.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102737.go new file mode 100644 index 0000000..8453e98 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102737.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) <= 0 { + pub + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102739.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102739.go new file mode 100644 index 0000000..f26bdc9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102739.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) <= 0 { + publicmethod. + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102803.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102803.go new file mode 100644 index 0000000..73c801c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102803.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + gormDb.Where("ascriptionid = ?", requestData.Id).Find(&Photo_List) // 根据归属获取荣誉图片 + if len(Photo_List) <= 0 { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102823.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102823.go new file mode 100644 index 0000000..118df7a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102823.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + // var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102826.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102826.go new file mode 100644 index 0000000..729037d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102826.go @@ -0,0 +1,22 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + var Photo_List []models.PhotosGallery // 声明荣誉图片列表 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102830.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102830.go new file mode 100644 index 0000000..3102542 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102830.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&models.PhotosGallery{}).Where("state betweent ? and ?", 1, 2) + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102835.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102835.go new file mode 100644 index 0000000..ae3fb4f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102835.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102839.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102839.go new file mode 100644 index 0000000..3adc0f2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102839.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102840.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102840.go new file mode 100644 index 0000000..e5a740c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102840.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102842.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102842.go new file mode 100644 index 0000000..ae3fb4f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102842.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102843.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102843.go new file mode 100644 index 0000000..9ab8a3d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102843.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102852.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102852.go new file mode 100644 index 0000000..a92a62c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102852.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102900.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102900.go new file mode 100644 index 0000000..ca82564 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102900.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[]() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102905.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102905.go new file mode 100644 index 0000000..c1e8edc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102905.go @@ -0,0 +1,19 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102906.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102906.go new file mode 100644 index 0000000..aae5d0a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102906.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102910.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102910.go new file mode 100644 index 0000000..7db709d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102910.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where[""] +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102915.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102915.go new file mode 100644 index 0000000..4cc0285 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102915.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102917.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102917.go new file mode 100644 index 0000000..6f58703 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102917.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102919.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102919.go new file mode 100644 index 0000000..980ace8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102919.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = eq +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102922.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102922.go new file mode 100644 index 0000000..c0f8d54 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102922.go @@ -0,0 +1,20 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102923.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102923.go new file mode 100644 index 0000000..792fa0e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102923.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102926.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102926.go new file mode 100644 index 0000000..6917f77 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102926.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + po +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102929.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102929.go new file mode 100644 index 0000000..e48408f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102929.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + photoGalleryByAscriptionId. +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102933.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102933.go new file mode 100644 index 0000000..2975101 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102933.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + photoGalleryByAscriptionId.GetCont(where) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102943.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102943.go new file mode 100644 index 0000000..2673ceb --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102943.go @@ -0,0 +1,21 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102949.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102949.go new file mode 100644 index 0000000..9439bc7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102949.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err := nil{ + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102951.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102951.go new file mode 100644 index 0000000..9439bc7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102951.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err := nil{ + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102955.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102955.go new file mode 100644 index 0000000..6d8c54e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102955.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err = nil{ + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729102957.go b/.history/api/version1/honoraryArchives/operate_photo_20220729102957.go new file mode 100644 index 0000000..a551003 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729102957.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103000.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103000.go new file mode 100644 index 0000000..b115866 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103000.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103005.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103005.go new file mode 100644 index 0000000..1d1f767 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103005.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.re + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103009.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103009.go new file mode 100644 index 0000000..400582b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103009.go @@ -0,0 +1,24 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107) + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103022.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103022.go new file mode 100644 index 0000000..2154897 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103022.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103032.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103032.go new file mode 100644 index 0000000..2154897 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103032.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103041.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103041.go new file mode 100644 index 0000000..a013b02 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103041.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103049.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103049.go new file mode 100644 index 0000000..c0d7274 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103049.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103053.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103053.go new file mode 100644 index 0000000..d0fa465 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103053.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103055.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103055.go new file mode 100644 index 0000000..7974d45 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103055.go @@ -0,0 +1,25 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103057.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103057.go new file mode 100644 index 0000000..80edc15 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103057.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103208.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103208.go new file mode 100644 index 0000000..5e13211 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103208.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + p +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103211.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103211.go new file mode 100644 index 0000000..76327b2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103211.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.re +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103213.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103213.go new file mode 100644 index 0000000..0d6343e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103213.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result() +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103220.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103220.go new file mode 100644 index 0000000..cb94178 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103220.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103224.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103224.go new file mode 100644 index 0000000..e509cee --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103224.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,req) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103228.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103228.go new file mode 100644 index 0000000..cba5cd8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103228.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,requestData) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103229.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103229.go new file mode 100644 index 0000000..4f64596 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103229.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,requestData,) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103232.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103232.go new file mode 100644 index 0000000..d6842e7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103232.go @@ -0,0 +1,26 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103250.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103250.go new file mode 100644 index 0000000..570b59d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103250.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +func (a *ApiMethod) \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103255.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103255.go new file mode 100644 index 0000000..390796c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103255.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +func (a *ApiMethod) edit \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103300.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103300.go new file mode 100644 index 0000000..8eb54ca --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103300.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImages(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +func (a *ApiMethod) editImage) \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103303.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103303.go new file mode 100644 index 0000000..d30f63d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103303.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +func (a *ApiMethod) editImage) \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103307.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103307.go new file mode 100644 index 0000000..a2f4d22 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103307.go @@ -0,0 +1,29 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +func (a *ApiMethod) editImage(c ) \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103310.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103310.go new file mode 100644 index 0000000..5cc05b9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103310.go @@ -0,0 +1,28 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +func (a *ApiMethod) editImage(c *gin.Context) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103311.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103311.go new file mode 100644 index 0000000..7f9cbb8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103311.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +func (a *ApiMethod) editImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103314.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103314.go new file mode 100644 index 0000000..7f9cbb8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103314.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +func (a *ApiMethod) editImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103324.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103324.go new file mode 100644 index 0000000..9e9b426 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103324.go @@ -0,0 +1,31 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +func (a *ApiMethod) editImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103344.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103344.go new file mode 100644 index 0000000..5bec302 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103344.go @@ -0,0 +1,33 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103346.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103346.go new file mode 100644 index 0000000..f07c7d0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103346.go @@ -0,0 +1,32 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103357.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103357.go new file mode 100644 index 0000000..ed0d3fb --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103357.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103359.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103359.go new file mode 100644 index 0000000..0a67eb2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103359.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) del diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103401.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103401.go new file mode 100644 index 0000000..38dd9a6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103401.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) de diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103403.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103403.go new file mode 100644 index 0000000..0a67eb2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103403.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) reviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) del diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103423.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103423.go new file mode 100644 index 0000000..0ac04b0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103423.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) editImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) del diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103425.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103425.go new file mode 100644 index 0000000..5d81448 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103425.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) del diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103428.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103428.go new file mode 100644 index 0000000..5f05534 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103428.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) Del diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103431.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103431.go new file mode 100644 index 0000000..a2af8a6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103431.go @@ -0,0 +1,36 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + + +// 删除图片 +func (a *ApiMethod) DelImage() diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103437.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103437.go new file mode 100644 index 0000000..c223c11 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103437.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103459.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103459.go new file mode 100644 index 0000000..c223c11 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103459.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103506.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103506.go new file mode 100644 index 0000000..c223c11 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103506.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729103516.go b/.history/api/version1/honoraryArchives/operate_photo_20220729103516.go new file mode 100644 index 0000000..c223c11 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729103516.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104344.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104344.go new file mode 100644 index 0000000..f3404dc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104344.go @@ -0,0 +1,38 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + publicmethod.Result(0, requestData, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104414.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104414.go new file mode 100644 index 0000000..886384d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104414.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104422.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104422.go new file mode 100644 index 0000000..8da7d68 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104422.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + imgU +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104424.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104424.go new file mode 100644 index 0000000..065a00d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104424.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + imgUrlList +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104427.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104427.go new file mode 100644 index 0000000..838e2a4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104427.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + imgUrlList +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104433.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104433.go new file mode 100644 index 0000000..5f473c6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104433.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104500.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104500.go new file mode 100644 index 0000000..886384d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104500.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104822.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104822.go new file mode 100644 index 0000000..886384d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104822.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104825.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104825.go new file mode 100644 index 0000000..602ddc6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104825.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104826.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104826.go new file mode 100644 index 0000000..47ab3ae --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104826.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var new +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104833.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104833.go new file mode 100644 index 0000000..1813c32 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104833.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var newImage +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104835.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104835.go new file mode 100644 index 0000000..1802699 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104835.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var newImage mode +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104839.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104839.go new file mode 100644 index 0000000..579af99 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104839.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var newImage models. +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104843.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104843.go new file mode 100644 index 0000000..5f23b7f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104843.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + var newImage models.PhotosGallery +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104849.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104849.go new file mode 100644 index 0000000..886384d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104849.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104853.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104853.go new file mode 100644 index 0000000..872a9a8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104853.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + pu +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104855.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104855.go new file mode 100644 index 0000000..12efa8a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104855.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.re +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104856.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104856.go new file mode 100644 index 0000000..66d7c6b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104856.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result() +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104858.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104858.go new file mode 100644 index 0000000..91a41e0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104858.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(1) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104900.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104900.go new file mode 100644 index 0000000..e5ac4aa --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104900.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104906.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104906.go new file mode 100644 index 0000000..b659e27 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104906.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,pho) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104908.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104908.go new file mode 100644 index 0000000..ebd7b96 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104908.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0,photoGalleryByAscriptionId,) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104909.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104909.go new file mode 100644 index 0000000..728c8e5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104909.go @@ -0,0 +1,37 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + publicmethod.Result(0, photoGalleryByAscriptionId, c) +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104922.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104922.go new file mode 100644 index 0000000..b88d6c0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104922.go @@ -0,0 +1,39 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104929.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104929.go new file mode 100644 index 0000000..bc085ec --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104929.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newI + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104932.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104932.go new file mode 100644 index 0000000..219ee0c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104932.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var new + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104936.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104936.go new file mode 100644 index 0000000..0b00a9f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104936.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPho + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104937.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104937.go new file mode 100644 index 0000000..93e8218 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104937.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhoo + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104944.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104944.go new file mode 100644 index 0000000..ad8e214 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104944.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhotoGalley + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104946.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104946.go new file mode 100644 index 0000000..7644e8e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104946.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhotoGalley mode + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104951.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104951.go new file mode 100644 index 0000000..57ce6fd --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104951.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhotoGalley models.PhotosGallery + new + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729104956.go b/.history/api/version1/honoraryArchives/operate_photo_20220729104956.go new file mode 100644 index 0000000..6c9bd15 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729104956.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhotoGalley models.PhotosGallery{ + + } + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105004.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105004.go new file mode 100644 index 0000000..6c9bd15 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105004.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + var newPhotoGalley models.PhotosGallery{ + + } + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105007.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105007.go new file mode 100644 index 0000000..82bf0b6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105007.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105010.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105010.go new file mode 100644 index 0000000..82bf0b6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105010.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105015.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105015.go new file mode 100644 index 0000000..82bf0b6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105015.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105017.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105017.go new file mode 100644 index 0000000..be665b1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105017.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + phot + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105027.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105027.go new file mode 100644 index 0000000..708e4e9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105027.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.u + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105028.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105028.go new file mode 100644 index 0000000..8f6118d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105028.go @@ -0,0 +1,40 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105033.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105033.go new file mode 100644 index 0000000..dca31a8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105033.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105035.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105035.go new file mode 100644 index 0000000..b104d3f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105035.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105038.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105038.go new file mode 100644 index 0000000..4dd1f28 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105038.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, pho, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105039.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105039.go new file mode 100644 index 0000000..158f998 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105039.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105046.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105046.go new file mode 100644 index 0000000..efdb5ee --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105046.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105141.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105141.go new file mode 100644 index 0000000..35f9077 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105141.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105144.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105144.go new file mode 100644 index 0000000..45718cb --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105144.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData pho +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105145.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105145.go new file mode 100644 index 0000000..00b6914 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105145.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoListKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoListKey +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105342.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105342.go new file mode 100644 index 0000000..bf2c626 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105342.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoListKey +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105347.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105347.go new file mode 100644 index 0000000..6c2d0c4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105347.go @@ -0,0 +1,41 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105402.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105402.go new file mode 100644 index 0000000..8854c4d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105402.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey + c.show +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105408.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105408.go new file mode 100644 index 0000000..f9eb81d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105408.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey + c.ShouldBindJSON() +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105411.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105411.go new file mode 100644 index 0000000..76ff2fd --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105411.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉查询字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105415.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105415.go new file mode 100644 index 0000000..765b35a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105415.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105425.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105425.go new file mode 100644 index 0000000..3266647 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105425.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明冗余字段 + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105429.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105429.go new file mode 100644 index 0000000..d9c8cca --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105429.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉字段 + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105431.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105431.go new file mode 100644 index 0000000..5498ca2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105431.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105433.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105433.go new file mode 100644 index 0000000..7424c2e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105433.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105437.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105437.go new file mode 100644 index 0000000..353fcef --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105437.go @@ -0,0 +1,42 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105441.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105441.go new file mode 100644 index 0000000..22775bc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105441.go @@ -0,0 +1,43 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729105509.go b/.history/api/version1/honoraryArchives/operate_photo_20220729105509.go new file mode 100644 index 0000000..5e55379 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729105509.go @@ -0,0 +1,43 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113035.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113035.go new file mode 100644 index 0000000..22775bc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113035.go @@ -0,0 +1,43 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113038.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113038.go new file mode 100644 index 0000000..e0378da --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113038.go @@ -0,0 +1,43 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113043.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113043.go new file mode 100644 index 0000000..5df0af2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113043.go @@ -0,0 +1,43 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113047.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113047.go new file mode 100644 index 0000000..b93750d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113047.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == ""{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113053.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113053.go new file mode 100644 index 0000000..987aecb --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113053.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ur{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113054.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113054.go new file mode 100644 index 0000000..a3701e0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113054.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113103.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113103.go new file mode 100644 index 0000000..ad9036a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113103.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl == "" || requestData.{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113116.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113116.go new file mode 100644 index 0000000..ad9036a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113116.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl == "" || requestData.{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113205.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113205.go new file mode 100644 index 0000000..22e8b8e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113205.go @@ -0,0 +1,45 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl == "" || requestData.I{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113212.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113212.go new file mode 100644 index 0000000..f3dfa32 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113212.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl == ""{ + + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113224.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113224.go new file mode 100644 index 0000000..c0a22ff --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113224.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || requestData.ImgUrl == ""{ + publicmethod.Result(101,requestData,c) + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113233.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113233.go new file mode 100644 index 0000000..3fa739a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113233.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl == ""{ + publicmethod.Result(101,requestData,c) + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113235.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113235.go new file mode 100644 index 0000000..fc1f293 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113235.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == ""{ + publicmethod.Result(101,requestData,c) + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113238.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113238.go new file mode 100644 index 0000000..de015ad --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113238.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0{ + publicmethod.Result(101,requestData,c) + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113243.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113243.go new file mode 100644 index 0000000..3b7436a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113243.go @@ -0,0 +1,46 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113245.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113245.go new file mode 100644 index 0000000..61619e7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113245.go @@ -0,0 +1,47 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113300.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113300.go new file mode 100644 index 0000000..23e0113 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113300.go @@ -0,0 +1,48 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113302.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113302.go new file mode 100644 index 0000000..863f470 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113302.go @@ -0,0 +1,49 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113305.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113305.go new file mode 100644 index 0000000..b2820f3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113305.go @@ -0,0 +1,49 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113312.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113312.go new file mode 100644 index 0000000..2a3aa8f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113312.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + old +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113318.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113318.go new file mode 100644 index 0000000..4810abd --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113318.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + oldImage := +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113332.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113332.go new file mode 100644 index 0000000..1106a81 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113332.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113334.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113334.go new file mode 100644 index 0000000..7572563 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113334.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage me +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113337.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113337.go new file mode 100644 index 0000000..0fed72f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113337.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage mo +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113339.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113339.go new file mode 100644 index 0000000..647633e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113339.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models. +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113340.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113340.go new file mode 100644 index 0000000..fea04a0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113340.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.m +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113341.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113341.go new file mode 100644 index 0000000..647633e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113341.go @@ -0,0 +1,50 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models. +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113354.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113354.go new file mode 100644 index 0000000..532712e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113354.go @@ -0,0 +1,51 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + oldImage.GetCont(where) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113401.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113401.go new file mode 100644 index 0000000..84c2159 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113401.go @@ -0,0 +1,54 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + if err != nil { + publicmethod.Result(107, err, c) + return + }oldImage.GetCont(where) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113402.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113402.go new file mode 100644 index 0000000..84c2159 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113402.go @@ -0,0 +1,54 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + if err != nil { + publicmethod.Result(107, err, c) + return + }oldImage.GetCont(where) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113405.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113405.go new file mode 100644 index 0000000..532712e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113405.go @@ -0,0 +1,51 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + oldImage.GetCont(where) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113406.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113406.go new file mode 100644 index 0000000..5534b61 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113406.go @@ -0,0 +1,55 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113409.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113409.go new file mode 100644 index 0000000..ef4ae31 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113409.go @@ -0,0 +1,55 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113426.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113426.go new file mode 100644 index 0000000..c943efc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113426.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113559.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113559.go new file mode 100644 index 0000000..a9bf0f9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113559.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + if +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113600.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113600.go new file mode 100644 index 0000000..c943efc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113600.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113632.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113632.go new file mode 100644 index 0000000..0e04435 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113632.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113634.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113634.go new file mode 100644 index 0000000..a322d82 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113634.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113636.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113636.go new file mode 100644 index 0000000..986859f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113636.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := req +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113637.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113637.go new file mode 100644 index 0000000..4583af9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113637.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := re +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113641.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113641.go new file mode 100644 index 0000000..e74bf37 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113641.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := request +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113645.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113645.go new file mode 100644 index 0000000..677ca2c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113645.go @@ -0,0 +1,56 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := requestData. +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113650.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113650.go new file mode 100644 index 0000000..9007996 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113650.go @@ -0,0 +1,58 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _,value := requestData.ImgUrl{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113656.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113656.go new file mode 100644 index 0000000..bb90693 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113656.go @@ -0,0 +1,58 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := requestData.ImgUrl{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113706.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113706.go new file mode 100644 index 0000000..d17b5b9 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113706.go @@ -0,0 +1,58 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := requestData.ImgUrl{ + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113716.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113716.go new file mode 100644 index 0000000..af7fce7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113716.go @@ -0,0 +1,58 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113718.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113718.go new file mode 100644 index 0000000..a3e996e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113718.go @@ -0,0 +1,58 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113743.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113743.go new file mode 100644 index 0000000..76d8900 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113743.go @@ -0,0 +1,74 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + if v.Id != "" { + oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + pldImgId = append(pldImgId, oldIdInt) + } + } else { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113809.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113809.go new file mode 100644 index 0000000..9ac2951 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113809.go @@ -0,0 +1,74 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // if v.Id != "" { + // oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + // if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + // pldImgId = append(pldImgId, oldIdInt) + // } + // } else { + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113825.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113825.go new file mode 100644 index 0000000..7932811 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113825.go @@ -0,0 +1,77 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // if v.Id != "" { + // oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + // if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + // pldImgId = append(pldImgId, oldIdInt) + // } + // } else { + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // } +} + + + + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113828.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113828.go new file mode 100644 index 0000000..76c9323 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113828.go @@ -0,0 +1,75 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // if v.Id != "" { + // oldIdInt, _ := strconv.ParseInt(v.Id, 10, 64) + // if publicmethod.IsInTrue[int64](oldIdInt, pldImgId) == false { + // pldImgId = append(pldImgId, oldIdInt) + // } + // } else { + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // } +} + + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113900.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113900.go new file mode 100644 index 0000000..5f3466b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113900.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // } else { + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // } +} + + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113903.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113903.go new file mode 100644 index 0000000..d8a3041 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113903.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // } +} + + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113906.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113906.go new file mode 100644 index 0000000..85b9465 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113906.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + // +} + + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113912.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113912.go new file mode 100644 index 0000000..606f792 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113912.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113916.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113916.go new file mode 100644 index 0000000..cd54a73 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113916.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + // var imgCont models.PhotosGallery + // imgCont.Url = v.Url //图片地址"` + // imgCont.ImgPath = v.Imgpath //物理地址"` + // imgCont.Name = v.Name //文档名称"` + // imgCont.FileSize = v.FileSize //文档大小"` + // imgCont.Time = time.Now().Unix() //创建时间"` + // imgCont.AscriptionId = honContOld.Id //归属"` + // imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + // imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + // imgUrlListNoId = append(imgUrlListNoId, imgCont) + // } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113922.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113922.go new file mode 100644 index 0000000..0640a79 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113922.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113923.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113923.go new file mode 100644 index 0000000..0640a79 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113923.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = v.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113928.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113928.go new file mode 100644 index 0000000..746d5f1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113928.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = v.Imgpath //物理地址"` + imgCont.Name = v.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113930.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113930.go new file mode 100644 index 0000000..c4f073a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113930.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = v.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113931.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113931.go new file mode 100644 index 0000000..045e6dc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113931.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113935.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113935.go new file mode 100644 index 0000000..045e6dc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113935.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113939.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113939.go new file mode 100644 index 0000000..045e6dc --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113939.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + } +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729113943.go b/.history/api/version1/honoraryArchives/operate_photo_20220729113943.go new file mode 100644 index 0000000..fce216d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729113943.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = honContOld.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114015.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114015.go new file mode 100644 index 0000000..d7d12ed --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114015.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = im.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114018.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114018.go new file mode 100644 index 0000000..a332fc1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114018.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = imgurl.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114022.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114022.go new file mode 100644 index 0000000..1ff6fc8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114022.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114025.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114025.go new file mode 100644 index 0000000..2bf9ddb --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114025.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = re //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114027.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114027.go new file mode 100644 index 0000000..bdef68e --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114027.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = requ //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114030.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114030.go new file mode 100644 index 0000000..872fb85 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114030.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114045.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114045.go new file mode 100644 index 0000000..c1bacab --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114045.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = stri requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114047.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114047.go new file mode 100644 index 0000000..c983496 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114047.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strig requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114053.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114053.go new file mode 100644 index 0000000..2efd446 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114053.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = stco requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114059.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114059.go new file mode 100644 index 0000000..9096e53 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114059.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv. requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114103.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114103.go new file mode 100644 index 0000000..f199c26 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114103.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.at requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114104.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114104.go new file mode 100644 index 0000000..9096e53 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114104.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv. requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114109.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114109.go new file mode 100644 index 0000000..c6971bd --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114109.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.int requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114120.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114120.go new file mode 100644 index 0000000..0953bf3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114120.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt() requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114122.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114122.go new file mode 100644 index 0000000..07a73bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114122.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114127.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114127.go new file mode 100644 index 0000000..d845728 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114127.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id,) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114133.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114133.go new file mode 100644 index 0000000..12d383b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114133.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id,10,) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114134.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114134.go new file mode 100644 index 0000000..3a0ce69 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114134.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id,10,64) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114135.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114135.go new file mode 100644 index 0000000..b047757 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114135.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id, 10, 64) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114147.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114147.go new file mode 100644 index 0000000..ec7bd67 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114147.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id, 64) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114232.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114232.go new file mode 100644 index 0000000..b047757 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114232.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = strconv.ParseInt(requestData.Id, 10, 64) //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114239.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114239.go new file mode 100644 index 0000000..be691ea --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114239.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114241.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114241.go new file mode 100644 index 0000000..3262704 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114241.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + strconv.ParseInt(requestData.Id, 10, 64) + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114246.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114246.go new file mode 100644 index 0000000..d92e6c2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114246.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + id,strconv.ParseInt(requestData.Id, 10, 64) + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114248.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114248.go new file mode 100644 index 0000000..51e6d38 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114248.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + id,err := strconv.ParseInt(requestData.Id, 10, 64) + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114259.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114259.go new file mode 100644 index 0000000..a506015 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114259.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114302.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114302.go new file mode 100644 index 0000000..fc59cf5 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114302.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + id,err := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114312.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114312.go new file mode 100644 index 0000000..15c85d8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114312.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + id,_ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114313.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114313.go new file mode 100644 index 0000000..15c85d8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114313.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + id,_ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114317.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114317.go new file mode 100644 index 0000000..d0efc3d --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114317.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + id, _ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + imgUrlListNoId = append(imgUrlListNoId, imgCont) + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114324.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114324.go new file mode 100644 index 0000000..d48066a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114324.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + id, _ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114331.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114331.go new file mode 100644 index 0000000..6df1380 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114331.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + AscriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114332.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114332.go new file mode 100644 index 0000000..ba89d40 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114332.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = id //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114337.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114337.go new file mode 100644 index 0000000..9b19f36 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114337.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114339.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114339.go new file mode 100644 index 0000000..97e26d1 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114339.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114342.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114342.go new file mode 100644 index 0000000..13c24af --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114342.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114350.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114350.go new file mode 100644 index 0000000..2b77a78 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114350.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114354.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114354.go new file mode 100644 index 0000000..5399101 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114354.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114545.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114545.go new file mode 100644 index 0000000..f261d1b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114545.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114555.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114555.go new file mode 100644 index 0000000..6f9a6b4 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114555.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114557.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114557.go new file mode 100644 index 0000000..f261d1b --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114557.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var imgCont models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114604.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114604.go new file mode 100644 index 0000000..6c75d31 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114604.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + imgCont.Url = value.Url //图片地址"` + imgCont.ImgPath = value.Imgpath //物理地址"` + imgCont.Name = value.Name //文档名称"` + imgCont.FileSize = value.FileSize //文档大小"` + imgCont.Time = time.Now().Unix() //创建时间"` + imgCont.AscriptionId = ascriptionId //归属"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114610.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114610.go new file mode 100644 index 0000000..0a8761a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114610.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114640.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114640.go new file mode 100644 index 0000000..7adb7bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114640.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114826.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114826.go new file mode 100644 index 0000000..0a8761a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114826.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114829.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114829.go new file mode 100644 index 0000000..7adb7bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114829.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114841.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114841.go new file mode 100644 index 0000000..0a8761a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114841.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114843.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114843.go new file mode 100644 index 0000000..c8da730 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114843.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114845.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114845.go new file mode 100644 index 0000000..18d2947 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114845.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114847.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114847.go new file mode 100644 index 0000000..7adb7bf --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114847.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114849.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114849.go new file mode 100644 index 0000000..1bc5ded --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114849.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + new + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114855.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114855.go new file mode 100644 index 0000000..0a8761a --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114855.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + + for _, value := range requestData.ImgUrl { + var newImage models.PhotosGallery + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114858.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114858.go new file mode 100644 index 0000000..79565be --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114858.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114901.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114901.go new file mode 100644 index 0000000..dad6693 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114901.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114904.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114904.go new file mode 100644 index 0000000..ab59c6f --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114904.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114907.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114907.go new file mode 100644 index 0000000..4deb121 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114907.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage. +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114909.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114909.go new file mode 100644 index 0000000..5645dff --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114909.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage.c +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114911.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114911.go new file mode 100644 index 0000000..9494597 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114911.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage.EiteCont() +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114941.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114941.go new file mode 100644 index 0000000..5a3bfc8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114941.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage.EiteCont(where,) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114945.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114945.go new file mode 100644 index 0000000..c9e475c --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114945.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage.EiteCont(where,new) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114947.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114947.go new file mode 100644 index 0000000..d12e8c0 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114947.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + newImage.EiteCont(where,newImage) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114951.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114951.go new file mode 100644 index 0000000..dcdd5f7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114951.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + oldImage.EiteCont(where,newImage) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114954.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114954.go new file mode 100644 index 0000000..5442e08 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114954.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + oldImage.EiteCont(where,newImage,) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220729114955.go b/.history/api/version1/honoraryArchives/operate_photo_20220729114955.go new file mode 100644 index 0000000..2ab7df3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220729114955.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + oldImage.EiteCont(where, newImage) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/.history/api/version1/honoraryArchives/type_20220727153717.go b/.history/api/version1/honoraryArchives/type_20220727153717.go new file mode 100644 index 0000000..e91463c --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220727153717.go @@ -0,0 +1,64 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092721.go b/.history/api/version1/honoraryArchives/type_20220729092721.go new file mode 100644 index 0000000..1b610b2 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092721.go @@ -0,0 +1,67 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092736.go b/.history/api/version1/honoraryArchives/type_20220729092736.go new file mode 100644 index 0000000..9293226 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092736.go @@ -0,0 +1,67 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 diff --git a/.history/api/version1/honoraryArchives/type_20220729092740.go b/.history/api/version1/honoraryArchives/type_20220729092740.go new file mode 100644 index 0000000..29472d8 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092740.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type pot \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092741.go b/.history/api/version1/honoraryArchives/type_20220729092741.go new file mode 100644 index 0000000..192df38 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092741.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092745.go b/.history/api/version1/honoraryArchives/type_20220729092745.go new file mode 100644 index 0000000..00317bc --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092745.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type po \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092752.go b/.history/api/version1/honoraryArchives/type_20220729092752.go new file mode 100644 index 0000000..c3fd9a3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092752.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type phoyo \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092754.go b/.history/api/version1/honoraryArchives/type_20220729092754.go new file mode 100644 index 0000000..2195bf6 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092754.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type photo \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092756.go b/.history/api/version1/honoraryArchives/type_20220729092756.go new file mode 100644 index 0000000..3212727 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092756.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + + +// 荣誉图片查询字段 +type photoList \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729092808.go b/.history/api/version1/honoraryArchives/type_20220729092808.go new file mode 100644 index 0000000..d34bd58 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092808.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092812.go b/.history/api/version1/honoraryArchives/type_20220729092812.go new file mode 100644 index 0000000..1f154fe --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092812.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092831.go b/.history/api/version1/honoraryArchives/type_20220729092831.go new file mode 100644 index 0000000..d34bd58 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092831.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092834.go b/.history/api/version1/honoraryArchives/type_20220729092834.go new file mode 100644 index 0000000..1f154fe --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092834.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092841.go b/.history/api/version1/honoraryArchives/type_20220729092841.go new file mode 100644 index 0000000..a0b6cbc --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092841.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + pho +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092843.go b/.history/api/version1/honoraryArchives/type_20220729092843.go new file mode 100644 index 0000000..1f154fe --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092843.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729092909.go b/.history/api/version1/honoraryArchives/type_20220729092909.go new file mode 100644 index 0000000..d34bd58 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729092909.go @@ -0,0 +1,68 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093133.go b/.history/api/version1/honoraryArchives/type_20220729093133.go new file mode 100644 index 0000000..1f154fe --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093133.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093136.go b/.history/api/version1/honoraryArchives/type_20220729093136.go new file mode 100644 index 0000000..e41425c --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093136.go @@ -0,0 +1,69 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093137.go b/.history/api/version1/honoraryArchives/type_20220729093137.go new file mode 100644 index 0000000..55c6323 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093137.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093153.go b/.history/api/version1/honoraryArchives/type_20220729093153.go new file mode 100644 index 0000000..680efb7 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093153.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + add +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093158.go b/.history/api/version1/honoraryArchives/type_20220729093158.go new file mode 100644 index 0000000..dcef676 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093158.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729093204.go b/.history/api/version1/honoraryArchives/type_20220729093204.go new file mode 100644 index 0000000..dcef676 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729093204.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105117.go b/.history/api/version1/honoraryArchives/type_20220729105117.go new file mode 100644 index 0000000..a853543 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105117.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} + + +//添加图片 \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729105120.go b/.history/api/version1/honoraryArchives/type_20220729105120.go new file mode 100644 index 0000000..5c1e38c --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105120.go @@ -0,0 +1,73 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} + + +//添加图片 diff --git a/.history/api/version1/honoraryArchives/type_20220729105124.go b/.history/api/version1/honoraryArchives/type_20220729105124.go new file mode 100644 index 0000000..37ee465 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105124.go @@ -0,0 +1,74 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} + + +//添加图片 +type pho \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729105127.go b/.history/api/version1/honoraryArchives/type_20220729105127.go new file mode 100644 index 0000000..12fb1fc --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105127.go @@ -0,0 +1,74 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} + + +//添加图片 +type photo \ No newline at end of file diff --git a/.history/api/version1/honoraryArchives/type_20220729105131.go b/.history/api/version1/honoraryArchives/type_20220729105131.go new file mode 100644 index 0000000..7e3403b --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105131.go @@ -0,0 +1,72 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} + + diff --git a/.history/api/version1/honoraryArchives/type_20220729105134.go b/.history/api/version1/honoraryArchives/type_20220729105134.go new file mode 100644 index 0000000..dcef676 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105134.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoListKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105154.go b/.history/api/version1/honoraryArchives/type_20220729105154.go new file mode 100644 index 0000000..7184a99 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105154.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type photoKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105209.go b/.history/api/version1/honoraryArchives/type_20220729105209.go new file mode 100644 index 0000000..56b29ad --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105209.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片查询字段 +type struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105212.go b/.history/api/version1/honoraryArchives/type_20220729105212.go new file mode 100644 index 0000000..e1dbaf3 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105212.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片字段 +type struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105218.go b/.history/api/version1/honoraryArchives/type_20220729105218.go new file mode 100644 index 0000000..92ecdfc --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105218.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片字段 +type photo struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729105338.go b/.history/api/version1/honoraryArchives/type_20220729105338.go new file mode 100644 index 0000000..c615c8b --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729105338.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片字段 +type photoKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/api/version1/honoraryArchives/type_20220729113126.go b/.history/api/version1/honoraryArchives/type_20220729113126.go new file mode 100644 index 0000000..bdfd389 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729113126.go @@ -0,0 +1,71 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片字段 +type photoKey struct { + publicmethod.PublicId + addHonorCont + +} diff --git a/.history/api/version1/honoraryArchives/type_20220729113148.go b/.history/api/version1/honoraryArchives/type_20220729113148.go new file mode 100644 index 0000000..edfd486 --- /dev/null +++ b/.history/api/version1/honoraryArchives/type_20220729113148.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +type ApiMethod struct{} + +//荣誉档案入口 +func (a *ApiMethod) Index(c *gin.Context) { + outputCont := publicmethod.MapOut[string]() + outputCont["index"] = "荣誉档案入口" + publicmethod.Result(0, outputCont, c) +} + +//荣誉列表查询字段 +type honorListKey struct { + publicmethod.PagesTurn + Name string `json:"name"` //名称 + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int `json:"carrier"` //载体 + AwardTimeBegin string `json:"awardtimebegin"` //获奖时间 + AwardTimeEnd string `json:"awardtimeend"` //获奖时间 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key +} + +//添加荣誉 +type addHonorCont struct { + addCarrierCont + IssuingAgency string `json:"issuingagency"` //发放单位 + Carrier int64 `json:"carrier"` //载体 + AwardTime string `json:"awardtime"` //获奖时间 + EfficientDate string `json:"efficientDate"` //有效期限 + Organize string `json:"organize"` //行政组织 + UserKey string `json:"userkey"` //人员Key + Remark string `json:"remark"` //备注 + ImgUrl []publicmethod.PubilcImageCont `json:"imgurl"` //图片集 +} + +//编辑荣誉 +type eidtHonorCont struct { + publicmethod.PublicId + addHonorCont +} + +//载体类型查询字段 +type carrierListKey struct { + publicmethod.PagesTurn + addCarrierCont +} + +//添加载体类型 +type addCarrierCont struct { + Name string `json:"name"` //名称 +} + +//编辑载体类型 +type eidyCarrierCont struct { + publicmethod.PublicId + addCarrierCont +} + +// 荣誉图片字段 +type photoKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220727153717.go b/.history/apirouter/v1/honorsRoute/honors_route_20220727153717.go new file mode 100644 index 0000000..8563465 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220727153717.go @@ -0,0 +1,28 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103606.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103606.go new file mode 100644 index 0000000..738237b --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103606.go @@ -0,0 +1,30 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103611.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103611.go new file mode 100644 index 0000000..9e1f6e7 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103611.go @@ -0,0 +1,30 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103614.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103614.go new file mode 100644 index 0000000..9b297db --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103614.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103615.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103615.go new file mode 100644 index 0000000..7857e91 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103615.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + api + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103618.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103618.go new file mode 100644 index 0000000..80cdd08 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103618.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.ge + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103624.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103624.go new file mode 100644 index 0000000..f412e3d --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103624.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST() + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103625.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103625.go new file mode 100644 index 0000000..ff5bd18 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103625.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103637.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103637.go new file mode 100644 index 0000000..ff5bd18 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103637.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103652.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103652.go new file mode 100644 index 0000000..1911331 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103652.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("ReviewImage") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103654.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103654.go new file mode 100644 index 0000000..02353aa --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103654.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewImage") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103656.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103656.go new file mode 100644 index 0000000..cebe5ef --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103656.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103700.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103700.go new file mode 100644 index 0000000..cefa794 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103700.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",me) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103704.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103704.go new file mode 100644 index 0000000..9f2b45c --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103704.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.R) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103705.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103705.go new file mode 100644 index 0000000..b3355b3 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103705.go @@ -0,0 +1,31 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103714.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103714.go new file mode 100644 index 0000000..4e991ea --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103714.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiro + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103720.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103720.go new file mode 100644 index 0000000..7d8da7e --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103720.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103724.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103724.go new file mode 100644 index 0000000..64af50f --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103724.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimgae") + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103725.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103725.go new file mode 100644 index 0000000..179863c --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103725.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimgae",) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103727.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103727.go new file mode 100644 index 0000000..0b1b4e2 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103727.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage",) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103734.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103734.go new file mode 100644 index 0000000..97a3520 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103734.go @@ -0,0 +1,32 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage",me) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103751.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103751.go new file mode 100644 index 0000000..eab08a2 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103751.go @@ -0,0 +1,33 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage",methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage",methodBinding.EditImage) // 编辑图片 + apiRouter.POST("delimage",me) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729103758.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729103758.go new file mode 100644 index 0000000..a0b6c5a --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729103758.go @@ -0,0 +1,33 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage", methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage", methodBinding.EditImage) // 编辑图片 + apiRouter.POST("delimage", methodBinding.DelImage) + } +} diff --git a/.history/apirouter/v1/honorsRoute/honors_route_20220729105457.go b/.history/apirouter/v1/honorsRoute/honors_route_20220729105457.go new file mode 100644 index 0000000..4aa89c3 --- /dev/null +++ b/.history/apirouter/v1/honorsRoute/honors_route_20220729105457.go @@ -0,0 +1,33 @@ +package honorsRoute + +import ( + "key_performance_indicators/api/version1" + + "github.com/gin-gonic/gin" +) + +//荣誉墙 +func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { + apiRouter := router.Group("honors") + + var methodBinding = version1.AppApiEntry.HonorsApi + { + apiRouter.GET("", methodBinding.Index) //入口 + apiRouter.POST("", methodBinding.Index) //入口 + apiRouter.POST("honorlist", methodBinding.HonorList) //荣誉列表 + apiRouter.POST("addhonorcont", methodBinding.AddHonorCont) //添加荣誉 + apiRouter.POST("eidyhonorcont", methodBinding.EidyHonorCont) //编辑荣誉 + apiRouter.POST("eidyhonorcontstate", methodBinding.EidyHonorContState) //编辑荣誉状态 + + //载体类型 + apiRouter.POST("carrierlist", methodBinding.CarrierList) //载体类型列表 + apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 + apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 + apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage", methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage", methodBinding.EditImage) // 编辑图片 + apiRouter.POST("delimage", methodBinding.DelImage) // 删除图片 + } +} diff --git a/.history/initialization/route/initRoute_20220729110249.go b/.history/initialization/route/initRoute_20220729110249.go new file mode 100644 index 0000000..1715ca7 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110249.go @@ -0,0 +1,65 @@ +package route + +import ( + "key_performance_indicators/apirouter" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + // VerifyIdentity := router.Group("") + // VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + // { + // //v1版本接口 + // version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + // version1Api.RouterGroup(VerifyIdentity) + // } + // //Token身份验证 + // VerifyIdentityToken := router.Group("") + // VerifyIdentityToken.Use(interceptor.IdentificationToken()) + // { + + // } + return router +} diff --git a/.history/initialization/route/initRoute_20220729110511.go b/.history/initialization/route/initRoute_20220729110511.go new file mode 100644 index 0000000..68e47e4 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110511.go @@ -0,0 +1,66 @@ +package route + +import ( + "key_performance_indicators/apirouter" + "key_performance_indicators/identification/interceptor" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + VerifyIdentity := router.Group("") + VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + { + //v1版本接口 + version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + version1Api.RouterGroup(VerifyIdentity) + } + //Token身份验证 + VerifyIdentityToken := router.Group("") + VerifyIdentityToken.Use(interceptor.IdentificationToken()) + { + + } + return router +} diff --git a/.history/initialization/route/initRoute_20220729110516.go b/.history/initialization/route/initRoute_20220729110516.go new file mode 100644 index 0000000..64ced05 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110516.go @@ -0,0 +1,66 @@ +package route + +import ( + "key_performance_indicators/apirouter" + "key_performance_indicators/identification/interceptor" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + VerifyIdentity := router.Group("") +// / VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + { + //v1版本接口 + version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + version1Api.RouterGroup(VerifyIdentity) + } + //Token身份验证 + VerifyIdentityToken := router.Group("") + VerifyIdentityToken.Use(interceptor.IdentificationToken()) + { + + } + return router +} diff --git a/.history/initialization/route/initRoute_20220729110518.go b/.history/initialization/route/initRoute_20220729110518.go new file mode 100644 index 0000000..7dcc5d7 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110518.go @@ -0,0 +1,66 @@ +package route + +import ( + "key_performance_indicators/apirouter" + "key_performance_indicators/identification/interceptor" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + VerifyIdentity := router.Group("") +// VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + { + //v1版本接口 + version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + version1Api.RouterGroup(VerifyIdentity) + } + //Token身份验证 + VerifyIdentityToken := router.Group("") + VerifyIdentityToken.Use(interceptor.IdentificationToken()) + { + + } + return router +} diff --git a/.history/initialization/route/initRoute_20220729110525.go b/.history/initialization/route/initRoute_20220729110525.go new file mode 100644 index 0000000..68e47e4 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110525.go @@ -0,0 +1,66 @@ +package route + +import ( + "key_performance_indicators/apirouter" + "key_performance_indicators/identification/interceptor" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + VerifyIdentity := router.Group("") + VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + { + //v1版本接口 + version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + version1Api.RouterGroup(VerifyIdentity) + } + //Token身份验证 + VerifyIdentityToken := router.Group("") + VerifyIdentityToken.Use(interceptor.IdentificationToken()) + { + + } + return router +} diff --git a/.history/initialization/route/initRoute_20220729110610.go b/.history/initialization/route/initRoute_20220729110610.go new file mode 100644 index 0000000..6ccd457 --- /dev/null +++ b/.history/initialization/route/initRoute_20220729110610.go @@ -0,0 +1,66 @@ +package route + +import ( + "key_performance_indicators/apirouter" + "key_performance_indicators/identification/interceptor" + + "github.com/gin-gonic/gin" +) + +//初始化主路由 +func InitialRouter() *gin.Engine { + var router = gin.Default() + + //app默认相应 + appLoadRouterGroup := router.Group("") + { + + // 跨域设置 + // router.Use(middleware.CrossDomainRequest()) // 如需跨域可以打开 + //app默认相应 + appLoadRouterGroup.GET("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + appLoadRouterGroup.POST("/", func(c *gin.Context) { + c.JSON(0, "通讯成功!") + }) + //实验路由 + + shiyanApi := apirouter.RouterGroupEntry.ShiyanApi + { + shiyanApi.RouterGroup(appLoadRouterGroup) + } + //OAuth 2.0 授权 + oAuthEmpowerApi := apirouter.RouterGroupEntry.EmpowerRouter + { + oAuthEmpowerApi.RouterGroup(appLoadRouterGroup) + } + //登录验证 + loginVerifyApi := apirouter.RouterGroupEntry.VerifyLogin + { + loginVerifyApi.RouterGroup(appLoadRouterGroup) + } + + // 自定义测试 + mytestapi := apirouter.RouterGroupEntry.MyTest + { + mytestapi.RouterGroup(appLoadRouterGroup) + } + } + + //验证身份接口 + VerifyIdentity := router.Group("") + // VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + { + //v1版本接口 + version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter + version1Api.RouterGroup(VerifyIdentity) + } + //Token身份验证 + VerifyIdentityToken := router.Group("") + VerifyIdentityToken.Use(interceptor.IdentificationToken()) + { + + } + return router +} diff --git a/.history/models/photos_gallery_20220727153717.go b/.history/models/photos_gallery_20220727153717.go new file mode 100644 index 0000000..224cdba --- /dev/null +++ b/.history/models/photos_gallery_20220727153717.go @@ -0,0 +1,47 @@ +package models + +import ( + "key_performance_indicators/overall" + "strings" +) + +//图片库 +type PhotosGallery struct { + Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:ID"` + Url string `json:"url" gorm:"column:url;type:varchar(255) unsigned;default:'';not null;comment:图片地址"` + ImgPath string `json:"imgpath" gorm:"column:img_path;type:varchar(255) unsigned;default:'';not null;comment:物理地址"` + Name string `json:"name" gorm:"column:name;type:varchar(255) unsigned;default:'';not null;comment:文档名称"` + FileSize string `json:"filesize" gorm:"column:file_size;type:varchar(255) unsigned;default:'';not null;comment:文档大小"` + Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` + AscriptionId int64 `json:"ascriptionid" gorm:"column:ascription_id;type:bigint(20) unsigned;default:0;not null;comment:归属"` + AscriptionDataSheet string `json:"ascriptiondatasheet" gorm:"column:ascription_data_sheet;type:varchar(255) unsigned;default:'';not null;comment:归属拿个数据表"` + State int `json:"state" gorm:"column:state;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` +} + +func (PhotosGallery *PhotosGallery) TableName() string { + return "photos_gallery" +} + +//编辑图片库内容 +func (cont *PhotosGallery) EiteCont(whereMap interface{}, saveData interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont).Where(whereMap).Updates(saveData).Error + return +} + +//获取图片库内容 +func (cont *PhotosGallery) GetCont(whereMap interface{}, field ...string) (err error) { + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont) + if len(field) > 0 { + fieldStr := strings.Join(field, ",") + gormDb = gormDb.Select(fieldStr) + } + gormDb = gormDb.Where(whereMap) + err = gormDb.First(&cont).Error + return +} + +//删除内容 +func (cont *PhotosGallery) DelCont(whereMap interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Where(whereMap).Delete(&cont).Error + return +} diff --git a/.history/models/photos_gallery_20220729094634.go b/.history/models/photos_gallery_20220729094634.go new file mode 100644 index 0000000..4c669e1 --- /dev/null +++ b/.history/models/photos_gallery_20220729094634.go @@ -0,0 +1,47 @@ +package models + +import ( + "key_performance_indicators/overall" + "strings" +) + +//图片库 +type PhotosGallery struct { + Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:ID"` + Url string `json:"url" gorm:"column:url;type:varchar(255) unsigned;default:'';not null;comment:图片地址"` + ImgPath string `json:"imgpath" gorm:"column:img_path;type:varchar(255) unsigned;default:'';not null;comment:物理地址"` + Name string `json:"name" gorm:"column:name;type:varchar(255) unsigned;default:'';not null;comment:文档名称"` + FileSize string `json:"filesize" gorm:"column:file_size;type:varchar(255) unsigned;default:'';not null;comment:文档大小"` + Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` + AscriptionId int64 `json:"ascriptionid" gorm:"column:ascription_id;type:bigint(20) unsigned;default:0;not null;comment:归属"` + AscriptionDataSheet string `json:"ascriptiondatasheet" gorm:"column:ascription_data_sheet;type:varchar(255) unsigned;default:'';not null;comment:归属哪个数据表"` + State int `json:"state" gorm:"column:state;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` +} + +func (PhotosGallery *PhotosGallery) TableName() string { + return "photos_gallery" +} + +//编辑图片库内容 +func (cont *PhotosGallery) EiteCont(whereMap interface{}, saveData interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont).Where(whereMap).Updates(saveData).Error + return +} + +//获取图片库内容 +func (cont *PhotosGallery) GetCont(whereMap interface{}, field ...string) (err error) { + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont) + if len(field) > 0 { + fieldStr := strings.Join(field, ",") + gormDb = gormDb.Select(fieldStr) + } + gormDb = gormDb.Where(whereMap) + err = gormDb.First(&cont).Error + return +} + +//删除内容 +func (cont *PhotosGallery) DelCont(whereMap interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Where(whereMap).Delete(&cont).Error + return +} diff --git a/.history/models/photos_gallery_20220729115022.go b/.history/models/photos_gallery_20220729115022.go new file mode 100644 index 0000000..4c669e1 --- /dev/null +++ b/.history/models/photos_gallery_20220729115022.go @@ -0,0 +1,47 @@ +package models + +import ( + "key_performance_indicators/overall" + "strings" +) + +//图片库 +type PhotosGallery struct { + Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:ID"` + Url string `json:"url" gorm:"column:url;type:varchar(255) unsigned;default:'';not null;comment:图片地址"` + ImgPath string `json:"imgpath" gorm:"column:img_path;type:varchar(255) unsigned;default:'';not null;comment:物理地址"` + Name string `json:"name" gorm:"column:name;type:varchar(255) unsigned;default:'';not null;comment:文档名称"` + FileSize string `json:"filesize" gorm:"column:file_size;type:varchar(255) unsigned;default:'';not null;comment:文档大小"` + Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` + AscriptionId int64 `json:"ascriptionid" gorm:"column:ascription_id;type:bigint(20) unsigned;default:0;not null;comment:归属"` + AscriptionDataSheet string `json:"ascriptiondatasheet" gorm:"column:ascription_data_sheet;type:varchar(255) unsigned;default:'';not null;comment:归属哪个数据表"` + State int `json:"state" gorm:"column:state;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` +} + +func (PhotosGallery *PhotosGallery) TableName() string { + return "photos_gallery" +} + +//编辑图片库内容 +func (cont *PhotosGallery) EiteCont(whereMap interface{}, saveData interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont).Where(whereMap).Updates(saveData).Error + return +} + +//获取图片库内容 +func (cont *PhotosGallery) GetCont(whereMap interface{}, field ...string) (err error) { + gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&cont) + if len(field) > 0 { + fieldStr := strings.Join(field, ",") + gormDb = gormDb.Select(fieldStr) + } + gormDb = gormDb.Where(whereMap) + err = gormDb.First(&cont).Error + return +} + +//删除内容 +func (cont *PhotosGallery) DelCont(whereMap interface{}) (err error) { + err = overall.CONSTANT_DB_MANAGE_ARCHIVES.Where(whereMap).Delete(&cont).Error + return +} diff --git a/api/base/loginVerify/login.go b/api/base/loginVerify/login.go index beb16d3..7a72e9d 100644 --- a/api/base/loginVerify/login.go +++ b/api/base/loginVerify/login.go @@ -32,7 +32,7 @@ func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { // return // } - userAgent := c.Request.Header.Get("User-Agent") + userAgent := c.Request.Header.Get("User-Agent") // 获取用户代理 // userAgent = "250" var md5JiaMiPwd publicmethod.Md5Encryption @@ -43,6 +43,7 @@ func (a *ApiMethod) ScanCodeLogin(c *gin.Context) { // if oldErr == nil { // //原知行学院管理员账号登录 // } + //新的登录认证方式 var userCont models.ManCont userErr := userCont.GetCont(map[string]interface{}{"number": requestData.Username, "password": md5TokenPwd}) diff --git a/api/version1/honoraryArchives/honors.go b/api/version1/honoraryArchives/honors.go index 1e46c3a..8e754d6 100644 --- a/api/version1/honoraryArchives/honors.go +++ b/api/version1/honoraryArchives/honors.go @@ -63,7 +63,7 @@ func (a *ApiMethod) HonorList(c *gin.Context) { //添加荣誉 func (a *ApiMethod) AddHonorCont(c *gin.Context) { - var requestData addHonorCont + var requestData addHonorCont //添加荣誉字段 c.ShouldBindJSON(&requestData) if requestData.Name == "" || requestData.IssuingAgency == "" || requestData.AwardTime == "" { publicmethod.Result(101, requestData, c) @@ -108,7 +108,7 @@ func (a *ApiMethod) AddHonorCont(c *gin.Context) { honorCont.Time = time.Now().Unix() //创建时间"` honorCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` if len(requestData.ImgUrl) > 0 { - var imgList []models.PhotosGallery + var imgList []models.PhotosGallery //图片档案 for _, v := range requestData.ImgUrl { var imgCont models.PhotosGallery imgCont.Url = v.Url //图片地址"` @@ -117,7 +117,7 @@ func (a *ApiMethod) AddHonorCont(c *gin.Context) { imgCont.FileSize = v.FileSize //文档大小"` imgCont.Time = time.Now().Unix() //创建时间"` imgCont.AscriptionId = uuId //归属"` - imgCont.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + imgCont.AscriptionDataSheet = "honorary_archives" //归属哪个数据表"` imgCont.State = 1 //状态(1:启用;2:禁用;3:删除)"` imgList = append(imgList, imgCont) } diff --git a/api/version1/honoraryArchives/operate_photo.go b/api/version1/honoraryArchives/operate_photo.go new file mode 100644 index 0000000..2ab7df3 --- /dev/null +++ b/api/version1/honoraryArchives/operate_photo.go @@ -0,0 +1,70 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + "strconv" + "time" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := photoGalleryByAscriptionId.GetCont(where) // 根据归属id获取图片 + if err != nil { + publicmethod.Result(107, err, c) + return + } + + photoUrl := photoGalleryByAscriptionId.Url + + // publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} + +// 编辑图片 +func (a *ApiMethod) EditImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(requestData) //进行Json绑定 + if requestData.Id == "" || len(requestData.ImgUrl) == 0 { + publicmethod.Result(101, requestData, c) + return + } + where := publicmethod.MapOut[string]() + where["id"] = requestData.Id + // 原始图片信息 + var oldImage models.PhotosGallery + err := oldImage.GetCont(where) + if err != nil { + publicmethod.Result(107, err, c) + return + } + ascriptionId, _ := strconv.ParseInt(requestData.Id, 10, 64) // 将id转为int64类型 + var newImage models.PhotosGallery + for _, value := range requestData.ImgUrl { + newImage.Url = value.Url //图片地址"` + newImage.ImgPath = value.Imgpath //物理地址"` + newImage.Name = value.Name //文档名称"` + newImage.FileSize = value.FileSize //文档大小"` + newImage.Time = time.Now().Unix() //创建时间"` + newImage.AscriptionId = ascriptionId //归属"` + newImage.AscriptionDataSheet = "honorary_archives" //归属拿个数据表"` + newImage.State = 1 //状态(1:启用;2:禁用;3:删除)"` + } + oldImage.EiteCont(where, newImage) +} + +// 删除图片 +func (a *ApiMethod) DelImage(c *gin.Context) { + +} diff --git a/api/version1/honoraryArchives/type.go b/api/version1/honoraryArchives/type.go index e91463c..edfd486 100644 --- a/api/version1/honoraryArchives/type.go +++ b/api/version1/honoraryArchives/type.go @@ -62,3 +62,9 @@ type eidyCarrierCont struct { publicmethod.PublicId addCarrierCont } + +// 荣誉图片字段 +type photoKey struct { + publicmethod.PublicId + addHonorCont +} diff --git a/apirouter/v1/honorsRoute/honors_route.go b/apirouter/v1/honorsRoute/honors_route.go index 8563465..4aa89c3 100644 --- a/apirouter/v1/honorsRoute/honors_route.go +++ b/apirouter/v1/honorsRoute/honors_route.go @@ -24,5 +24,10 @@ func (a *ApiRouter) RouterGroup(router *gin.RouterGroup) { apiRouter.POST("addcarrier", methodBinding.AddCarrier) //添加载体类型 apiRouter.POST("eidycarrier", methodBinding.EidyCarrier) //编辑载体类型 apiRouter.POST("eidycarrierstate", methodBinding.EidyCarrierState) //编辑载体类型状态 + + // 查看图片 + apiRouter.POST("reviewimage", methodBinding.ReviewImage) // 查看图片 + apiRouter.POST("editimage", methodBinding.EditImage) // 编辑图片 + apiRouter.POST("delimage", methodBinding.DelImage) // 删除图片 } } diff --git a/initialization/route/initRoute.go b/initialization/route/initRoute.go index 68e47e4..6ccd457 100644 --- a/initialization/route/initRoute.go +++ b/initialization/route/initRoute.go @@ -50,7 +50,7 @@ func InitialRouter() *gin.Engine { //验证身份接口 VerifyIdentity := router.Group("") - VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) + // VerifyIdentity.Use(interceptor.AuthenticateUser()).Use(interceptor.VerifyUrl()) { //v1版本接口 version1Api := apirouter.RouterGroupEntry.HonorsSouteRouter diff --git a/models/photos_gallery.go b/models/photos_gallery.go index 224cdba..4c669e1 100644 --- a/models/photos_gallery.go +++ b/models/photos_gallery.go @@ -14,7 +14,7 @@ type PhotosGallery struct { FileSize string `json:"filesize" gorm:"column:file_size;type:varchar(255) unsigned;default:'';not null;comment:文档大小"` Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` AscriptionId int64 `json:"ascriptionid" gorm:"column:ascription_id;type:bigint(20) unsigned;default:0;not null;comment:归属"` - AscriptionDataSheet string `json:"ascriptiondatasheet" gorm:"column:ascription_data_sheet;type:varchar(255) unsigned;default:'';not null;comment:归属拿个数据表"` + AscriptionDataSheet string `json:"ascriptiondatasheet" gorm:"column:ascription_data_sheet;type:varchar(255) unsigned;default:'';not null;comment:归属哪个数据表"` State int `json:"state" gorm:"column:state;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` }