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
3fcb759b
Commit
3fcb759b
authored
Jun 24, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug and fix eslint
parent
f5327f8b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
25 deletions
+35
-25
center-order/app/base/api/impl/askfor/askfor.js
+2
-2
center-order/app/base/api/impl/askfor/collect.js
+2
-2
center-order/app/base/db/impl/askfor/askForDao.js
+11
-8
center-order/app/base/db/impl/askfor/collectDao.js
+11
-8
center-order/app/base/service/impl/askfor/askForSve.js
+2
-2
center-order/app/base/service/impl/askfor/collectSve.js
+2
-2
center-order/表的更新
+5
-1
No files found.
center-order/app/base/api/impl/askfor/askfor.js
View file @
3fcb759b
...
...
@@ -3,7 +3,7 @@ var system = require("../../../system");
class
AskForAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
askForSve
=
system
.
getObject
(
"service.askfor.
A
skForSve"
);
this
.
askForSve
=
system
.
getObject
(
"service.askfor.
a
skForSve"
);
}
async
tradeMark
(
pobj
,
qobj
,
req
)
{
...
...
@@ -16,7 +16,7 @@ class AskForAPI extends APIBase {
let
result
switch
(
pobj
.
actionType
)
{
case
"getByUid"
:
result
=
await
this
.
askForSve
.
getByUid
(
pobj
.
userInfo
.
id
,
pobj
.
actionBody
.
page
)
result
=
await
this
.
askForSve
.
getByUid
(
pobj
.
userInfo
.
id
,
pobj
.
actionBody
.
page
,
pobj
.
actionBody
.
offset
)
return
system
.
getResult2
(
result
)
case
'create'
:
let
param
=
{}
...
...
center-order/app/base/api/impl/askfor/collect.js
View file @
3fcb759b
...
...
@@ -16,9 +16,9 @@ class CollectAPI extends APIBase {
let
result
switch
(
pobj
.
actionType
)
{
case
'getByUid'
:
result
=
await
this
.
collectSve
.
getByUid
(
pobj
.
userInfo
.
id
,
pobj
.
actionBody
.
page
)
result
=
await
this
.
collectSve
.
getByUid
(
pobj
.
userInfo
.
id
,
pobj
.
actionBody
.
page
,
pobj
.
actionBody
.
offset
)
return
system
.
getResult2
(
result
)
case
'getByUidAndCollections'
:
result
=
await
this
.
collectSve
.
getByUidAndCollections
(
pobj
.
userInfo
.
id
,
pobj
.
actionBody
.
collections
)
return
system
.
getResult2
(
result
)
...
...
center-order/app/base/db/impl/askfor/askForDao.js
View file @
3fcb759b
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
AskForDao
extends
Dao
{
constructor
(){
constructor
()
{
super
(
Dao
.
getModelName
(
AskForDao
));
}
async
getByUid
(
uid
,
page
=
1
)
{
async
getByUid
(
uid
,
page
=
1
,
offset
=
11
)
{
return
await
this
.
model
.
findAndCountAll
({
where
:
{
user_id
:
uid
,
a_type
:
1
},
where
:
{
user_id
:
uid
,
a_type
:
1
},
limit
:
11
,
offset
:
(
page
-
1
)
*
11
offset
:
(
page
-
1
)
*
offset
})
}
...
...
@@ -17,9 +17,11 @@ class AskForDao extends Dao {
}
async
delete
(
id
)
{
return
await
this
.
model
.
destroy
({
where
:{
id
:
id
}})
return
await
this
.
model
.
destroy
({
where
:
{
id
:
id
}
})
}
}
module
.
exports
=
AskForDao
;
\ No newline at end of file
center-order/app/base/db/impl/askfor/collectDao.js
View file @
3fcb759b
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
CollectDao
extends
Dao
{
constructor
(){
constructor
()
{
super
(
Dao
.
getModelName
(
CollectDao
));
}
async
getByUid
(
uid
,
page
=
1
)
{
async
getByUid
(
uid
,
page
=
1
,
offset
=
12
)
{
return
await
this
.
model
.
findAndCountAll
({
where
:
{
user_id
:
uid
,
c_type
:
1
},
where
:
{
user_id
:
uid
,
c_type
:
1
},
limit
:
9
,
offset
:
(
page
-
1
)
*
9
offset
:
(
page
-
1
)
*
offset
})
}
...
...
@@ -31,9 +31,11 @@ class CollectDao extends Dao {
}
async
delete
(
id
)
{
return
await
this
.
model
.
destroy
({
where
:{
id
:
id
}})
return
await
this
.
model
.
destroy
({
where
:
{
id
:
id
}
})
}
}
module
.
exports
=
CollectDao
;
\ No newline at end of file
center-order/app/base/service/impl/askfor/askForSve.js
View file @
3fcb759b
...
...
@@ -4,8 +4,8 @@ class AskForService extends ServiceBase {
super
(
"askfor"
,
ServiceBase
.
getDaoName
(
AskForService
));
}
async
getByUid
(
uid
,
page
=
1
)
{
return
await
this
.
dao
.
getByUid
(
uid
,
page
);
async
getByUid
(
uid
,
page
=
1
,
offset
=
11
)
{
return
await
this
.
dao
.
getByUid
(
uid
,
page
,
offset
);
}
async
create
(
param
)
{
...
...
center-order/app/base/service/impl/askfor/collectSve.js
View file @
3fcb759b
...
...
@@ -4,8 +4,8 @@ class CollectService extends ServiceBase {
super
(
"askfor"
,
ServiceBase
.
getDaoName
(
CollectService
));
}
async
getByUid
(
uid
,
page
=
1
)
{
return
await
this
.
dao
.
getByUid
(
uid
,
page
);
async
getByUid
(
uid
,
page
=
1
,
offset
=
12
)
{
return
await
this
.
dao
.
getByUid
(
uid
,
page
,
offset
);
}
async
getByUidAndCollections
(
uid
,
collections
)
{
...
...
center-order/表的更新
View file @
3fcb759b
示例:--
--------------------------------开始--------------------------------------------------------------------
示例:--
--------------------------------开始--------------------------------------------------------------------
...
...
@@ -105,4 +105,7 @@ CREATE TABLE `c_collect` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `center_app`.`p_product_type`(`id`, `uapp_id`, `p_id`, `type_code`, `type_name`, `channel_type_code`, `channel_type_name`, `type_pic`, `type_desc`, `type_icon`, `is_enabled`, `created_at`, `updated_at`, `deleted_at`, `version`) VALUES (52, 22, 20, 'sbqm', '商标起名', 'sbqm', '商标起名', NULL, NULL, NULL, 1, '2020-06-24 10:31:33', '2020-06-24 10:31:37', NULL, 0);
----------------------------------结束--------------------------------------------------------------------
\ No newline at end of file
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