Commit 5b143105 by 王昆

dd

parent 18eb0f46
......@@ -36,12 +36,12 @@ class ObusinessmenService extends ServiceBase {
async queryObusinessmenByCreditCode(params) {
try {
let obj = await this.dao.findByCreditCode(this.trim(params.credit_code));
if(obj){
this.handleDate(obj, ["created_at", "assignTime","reg_date","tax_reg_day","updated_at"], null, -8);
if(obj && obj.length>0){
this.handleDate(obj[0], ["created_at", "assignTime","reg_date","tax_reg_day","updated_at"], null, -8);
}else{
obj = {};
}
return system.getResult(obj);
return system.getResult(obj[0]);
} catch (error) {
console.log(error);
return system.getResult(`系统错误 错误信息 ${error}`);
......
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