Commit 75055007 by linboxuan

diagnosis uupdate

parent a1838014
...@@ -16,6 +16,15 @@ class diagnosisDao extends Dao { ...@@ -16,6 +16,15 @@ class diagnosisDao extends Dao {
where: { where: {
channel_user_Id: uid channel_user_Id: uid
}, },
attributes: [
"diagnosis_no",
"corporate_name",
"publish_mobile",
"publish_name",
"diagnosis_result",
"qualifications_pic",
"brand_pic",
"industry_pic"],
order: [ order: [
["updated_at", "desc"] ["updated_at", "desc"]
], ],
......
...@@ -67,7 +67,13 @@ class DiagnosisService extends ServiceBase { ...@@ -67,7 +67,13 @@ class DiagnosisService extends ServiceBase {
} }
let where = {} let where = {}
if (actionBody.diagnosisNo) { if (actionBody.diagnosisNo) {
where.diagnosis_no = { [this.db.Op.like]: `%${actionBody.diagnosis_no}%` } where.diagnosis_no = { [this.db.Op.like]: `%${actionBody.diagnosisNo}%` }
}
if (actionBody.diagnosisTypeName) {
where.diagnosis_type_name = { [this.db.Op.like]: `%${actionBody.diagnosisTypeName}%` }
}
if (actionBody.publishMobile) {
where.publish_mobile = { [this.db.Op.like]: `%${actionBody.publishMobile}%` }
} }
if (actionBody.status) { if (actionBody.status) {
where.status = actionBody.status where.status = actionBody.status
...@@ -76,10 +82,10 @@ class DiagnosisService extends ServiceBase { ...@@ -76,10 +82,10 @@ class DiagnosisService extends ServiceBase {
where.publish_name = { [this.db.Op.like]: `%${actionBody.publish_name}%` } where.publish_name = { [this.db.Op.like]: `%${actionBody.publish_name}%` }
} }
if (actionBody.stdate && actionBody.endate) { if (actionBody.stdate && actionBody.endate) {
where.updatedAt = { [this.db.Op.between]: [actionBody.stdate, actionBody.endate]} where.updated_at = { [this.db.Op.between]: [actionBody.stdate, actionBody.endate]}
} }
if (actionBody.corporateType) { if (actionBody.corporateTypeName) {
where.corporate_type = actionBody.corporateType where.corporate_type_name = actionBody.corporateTypeName
} }
if (Object.keys(where).length > 0) { if (Object.keys(where).length > 0) {
query.where = where query.where = where
...@@ -90,7 +96,15 @@ class DiagnosisService extends ServiceBase { ...@@ -90,7 +96,15 @@ class DiagnosisService extends ServiceBase {
async enterpriseInfo(pobj) { async enterpriseInfo(pobj) {
let diagnosisResult = await this.dao.findOneOrderByCreateAt(pobj.userInfo.channel_userid) let diagnosisResult = await this.dao.findOneOrderByCreateAt(pobj.userInfo.channel_userid)
if(diagnosisResult) {
diagnosisResult.auth_result_name = "未认证"
if(diagnosisResult.diagnosis_result == "tg") {
diagnosisResult.auth_result_name = "已认证"
}
return system.getResultSuccess(diagnosisResult); return system.getResultSuccess(diagnosisResult);
} else {
return system.getResultSuccess();
}
} }
} }
module.exports = DiagnosisService; module.exports = DiagnosisService;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment