Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
306f0dc7
Commit
306f0dc7
authored
Jul 10, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
立案 详情 主页面
parent
a7e288ea
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
1 deletions
+101
-1
rej-reex/app/base/controller/impl/rejreex/trademarkcaseCtl.js
+35
-0
rej-reex/app/base/db/impl/common/connection.js
+4
-0
rej-reex/app/base/db/impl/rejreex/agentDao.js
+12
-0
rej-reex/app/base/db/impl/rejreex/applicantDao.js
+12
-0
rej-reex/app/base/db/models/rejreex/models/trademarkcase.js
+1
-1
rej-reex/app/base/service/impl/rejreex/trademarkcaseSve.js
+37
-0
No files found.
rej-reex/app/base/controller/impl/rejreex/trademarkcaseCtl.js
0 → 100644
View file @
306f0dc7
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctl.base"
);
class
TrademarkcaseCtl
extends
CtlBase
{
constructor
()
{
super
(
"rejreex"
,
CtlBase
.
getServiceName
(
TrademarkcaseCtl
));
}
async
test
()
{
console
.
log
(
'test------'
)
return
system
.
getResult
(
'test'
)
}
async
createRejReex
(
pobj
,
qobj
,
req
)
{
try
{
pobj
.
agents
.
caseId
=
pobj
.
applicant
.
caseId
=
pobj
.
case
.
caseId
await
this
.
service
.
createCase
(
pobj
)
return
system
.
getResultSuccess
(
'success'
)
}
catch
(
error
)
{
console
.
log
(
'err: '
,
error
)
return
system
.
getResultFail
(
error
.
message
)
}
}
async
getCase
(
pobj
,
qobj
,
req
)
{
try
{
let
caseId
=
pobj
.
caseId
let
result
=
await
this
.
service
.
getCase
(
caseId
)
return
system
.
getResultSuccess
(
result
)
}
catch
(
error
)
{
console
.
log
(
'err: '
,
error
)
return
system
.
getResultFail
(
error
.
message
)
}
}
}
module
.
exports
=
TrademarkcaseCtl
;
rej-reex/app/base/db/impl/common/connection.js
View file @
306f0dc7
...
@@ -31,6 +31,10 @@ class DbFactory {
...
@@ -31,6 +31,10 @@ class DbFactory {
/*建立用户和角色之间的关系*/
/*建立用户和角色之间的关系*/
this
.
db
.
models
.
user
.
belongsToMany
(
this
.
db
.
models
.
role
,
{
as
:
"Roles"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
this
.
db
.
models
.
user
.
belongsToMany
(
this
.
db
.
models
.
role
,
{
as
:
"Roles"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
this
.
db
.
models
.
role
.
belongsToMany
(
this
.
db
.
models
.
user
,
{
as
:
"Users"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
this
.
db
.
models
.
role
.
belongsToMany
(
this
.
db
.
models
.
user
,
{
as
:
"Users"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
/* 案例 代理人 申请人 */
this
.
db
.
models
.
trademarkcase
.
hasMany
(
this
.
db
.
models
.
agent
,
{
sourceKey
:
'caseId'
,
foreignKey
:
'caseId'
})
this
.
db
.
models
.
trademarkcase
.
hasMany
(
this
.
db
.
models
.
applicant
,
{
sourceKey
:
'caseId'
,
foreignKey
:
'caseId'
})
/*组织机构自引用*/
/*组织机构自引用*/
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
...
...
rej-reex/app/base/db/impl/rejreex/agentDao.js
0 → 100644
View file @
306f0dc7
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
AgentDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
AgentDao
));
}
extraWhere
(
qobj
,
qw
,
qc
){
qc
.
raw
=
true
;
return
qw
;
}
}
module
.
exports
=
AgentDao
;
rej-reex/app/base/db/impl/rejreex/applicantDao.js
0 → 100644
View file @
306f0dc7
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
ApplicantDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
ApplicantDao
));
}
extraWhere
(
qobj
,
qw
,
qc
){
qc
.
raw
=
true
;
return
qw
;
}
}
module
.
exports
=
ApplicantDao
;
rej-reex/app/base/db/models/rejreex/models/trademarkcase.js
View file @
306f0dc7
moule
.
exports
=
function
(
sequelize
,
DataTypes
)
{
mo
d
ule
.
exports
=
function
(
sequelize
,
DataTypes
)
{
return
sequelize
.
define
(
'trademarkcase'
,
{
return
sequelize
.
define
(
'trademarkcase'
,
{
caseId
:
DataTypes
.
STRING
,
caseId
:
DataTypes
.
STRING
,
orderId
:
DataTypes
.
STRING
,
orderId
:
DataTypes
.
STRING
,
...
...
rej-reex/app/base/service/impl/rejreex/trademarkcaseSve.js
0 → 100644
View file @
306f0dc7
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
class
TrademarkcaseService
extends
ServiceBase
{
constructor
()
{
super
(
"rejreex"
,
ServiceBase
.
getDaoName
(
TrademarkcaseService
))
this
.
agentDao
=
system
.
getObject
(
"db.rejreex.agentDao"
)
this
.
applicantDao
=
system
.
getObject
(
'db.rejreex.applicantDao'
)
}
async
createCase
(
params
)
{
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
await
this
.
dao
.
create
(
params
.
case
,
t
)
await
this
.
agentDao
.
create
(
params
.
agents
,
t
)
await
this
.
applicantDao
.
create
(
params
.
applicant
,
t
)
})
}
async
getCase
(
id
)
{
let
query
=
{
where
:
{
caseId
:
id
},
include
:
[{
model
:
this
.
agentDao
.
model
,
raw
:
true
},
{
model
:
this
.
applicantDao
.
model
,
raw
:
true
}]
}
let
result
=
await
this
.
dao
.
model
.
findOne
(
query
)
result
.
setDataValue
(
'agents'
,
result
.
agents
[
0
])
result
.
setDataValue
(
'applicants'
,
result
.
applicants
[
0
])
return
result
}
}
module
.
exports
=
TrademarkcaseService
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment