|
@@ -79,7 +79,7 @@ func (this *EntService) CreateEnt(data *userCenter.EntAuthReq) (int64, string, i
|
|
|
entinfo.Id = int(id)
|
|
|
entinfo.Phone = phone //更换注册人手机号为管理员手机号
|
|
|
if entinfo.Update() {
|
|
|
- return 1, OKMSG, 1, int64(entinfo.Id)
|
|
|
+ return entity.SuccessCode, OKMSG, 1, int64(entinfo.Id)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -95,7 +95,7 @@ func (this *EntService) CreateEnt(data *userCenter.EntAuthReq) (int64, string, i
|
|
|
//该企业下员工 可以重新认证
|
|
|
if ent_name != entinfo.Name { //企业名称不同 创建全新企业
|
|
|
if ok, entid := entinfo.Add(); ok {
|
|
|
- return 1, OKMSG, 1, entid
|
|
|
+ return entity.SuccessCode, OKMSG, 1, entid
|
|
|
}
|
|
|
}
|
|
|
if audit_status == 1 {
|
|
@@ -111,20 +111,20 @@ func (this *EntService) CreateEnt(data *userCenter.EntAuthReq) (int64, string, i
|
|
|
entinfo.Id = int(id)
|
|
|
entinfo.Phone = phone //更换注册人手机号为管理员手机号
|
|
|
if entinfo.Update() {
|
|
|
- return 1, OKMSG, 1, int64(entinfo.Id)
|
|
|
+ return entity.SuccessCode, OKMSG, 1, int64(entinfo.Id)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if ok, id := entinfo.Add(); ok {
|
|
|
- return 1, OKMSG, 1, id
|
|
|
+ return entity.SuccessCode, OKMSG, 1, id
|
|
|
}
|
|
|
return entity.ErrorCode, "", entity.ErrorCode, 0
|
|
|
}
|
|
|
|
|
|
//机构审核
|
|
|
-func (this *EntService) Examinet(data *userCenter.ExamineReq) (int64, string) {
|
|
|
+func (this *EntService) Examinet(data *userCenter.ExamineReq) (int64, string, int64) {
|
|
|
if data.EntId == 0 || data.ExamineId == "" {
|
|
|
- return -1, "参数异常"
|
|
|
+ return -1, "参数异常", 0
|
|
|
}
|
|
|
info := &entity.Examine{
|
|
|
ExamineId: data.ExamineId,
|
|
@@ -136,10 +136,10 @@ func (this *EntService) Examinet(data *userCenter.ExamineReq) (int64, string) {
|
|
|
ResourceLib: entity.ResourceLib,
|
|
|
}
|
|
|
if info.EntExamine() {
|
|
|
- return 1, ""
|
|
|
+ return 1, "", 0
|
|
|
}
|
|
|
//修改状态
|
|
|
- return -1, "修改失败"
|
|
|
+ return -1, "修改失败", -1
|
|
|
}
|
|
|
|
|
|
//企业列表
|
|
@@ -176,7 +176,7 @@ func (this *EntService) EntList(data *userCenter.EntListReq) (int64, string, *us
|
|
|
FrozenStatus: common.Int64All(v["frozenStatus"]),
|
|
|
})
|
|
|
}
|
|
|
- return 1, "", &userCenter.EntData{
|
|
|
+ return 0, "", &userCenter.EntData{
|
|
|
Count: count,
|
|
|
PageSize: int64(i_pageSize),
|
|
|
List: list,
|
|
@@ -213,20 +213,20 @@ func (this *EntService) ExamineList(data *userCenter.ExamineListReq) (int64, str
|
|
|
RegPhone: common.ObjToString(v["regPhone"]),
|
|
|
})
|
|
|
}
|
|
|
- return 1, "", &userCenter.ExamineListData{
|
|
|
+ return 0, "", &userCenter.ExamineListData{
|
|
|
Count: count,
|
|
|
PageSize: int64(i_pageSize),
|
|
|
List: list,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (this *EntService) CheckEnt(data *userCenter.CheckEntReq) (int64, int64, string) {
|
|
|
+func (this *EntService) CheckEnt(data *userCenter.CheckEntReq) (int64, int64, string, int64) {
|
|
|
info := &entity.CheckEnt{
|
|
|
EntId: data.EntId,
|
|
|
Mysql: entity.Mysql,
|
|
|
}
|
|
|
authStatus, frozenStatus, msg := info.Check()
|
|
|
- return authStatus, frozenStatus, msg
|
|
|
+ return authStatus, frozenStatus, msg, common.Int64All(common.If(msg == "", entity.SuccessCode, entity.ErrorCode))
|
|
|
}
|
|
|
|
|
|
//企业信息
|
|
@@ -252,7 +252,7 @@ func (this *EntService) Info(data *userCenter.CheckEntReq) (int64, string, *user
|
|
|
ContactPhone: rdata.ContactPhone,
|
|
|
AuthType: rdata.AuthType,
|
|
|
}
|
|
|
- return 1, "", entInfoData
|
|
|
+ return 0, "", entInfoData
|
|
|
}
|
|
|
|
|
|
func (this *EntService) UpdateEnt(data *userCenter.EntUpdateReq) (int64, string, int64) {
|
|
@@ -263,7 +263,7 @@ func (this *EntService) UpdateEnt(data *userCenter.EntUpdateReq) (int64, string,
|
|
|
ResourceLib: entity.ResourceLib,
|
|
|
}
|
|
|
status, msg := info.UpdateEnt()
|
|
|
- return 1, msg, status
|
|
|
+ return 0, msg, status
|
|
|
}
|
|
|
|
|
|
func (this *EntService) ExamineInfo(data *userCenter.CheckExamineReq) (int64, string, *userCenter.EntInfoData) {
|
|
@@ -289,5 +289,5 @@ func (this *EntService) ExamineInfo(data *userCenter.CheckExamineReq) (int64, st
|
|
|
AuditUser: rdata.AuditUser,
|
|
|
AuditTime: rdata.AuditTime,
|
|
|
}
|
|
|
- return 1, "", entInfoData
|
|
|
+ return 0, "", entInfoData
|
|
|
}
|