Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
871c5d01
Commit
871c5d01
authored
Mar 21, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传藏品
parent
bbbfac84
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
0 deletions
+85
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+2
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/CollectionBookController.java
...wwdz/ch/wx/web/distribution/CollectionBookController.java
+58
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SupplierItemController.java
...m/wwdz/ch/wx/web/distribution/SupplierItemController.java
+25
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
871c5d01
...
@@ -472,6 +472,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -472,6 +472,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setImages
(
dto
.
getImages
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
supplierItem
.
setVideos
(
dto
.
getVideos
());
supplierItem
.
setSort
(
1
);
supplierItem
.
setSort
(
1
);
supplierItem
.
setBuyLimitNum
(
1
);
supplierItem
.
setStock
(
1
);
Date
now
=
new
Date
();
Date
now
=
new
Date
();
supplierItem
.
setCreateTime
(
now
);
supplierItem
.
setCreateTime
(
now
);
supplierItem
.
setUpdateTime
(
now
);
supplierItem
.
setUpdateTime
(
now
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/CollectionBookController.java
0 → 100644
View file @
871c5d01
package
com.wwdz.ch.wx.web.distribution
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.AuctionRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
com.wwdz.ch.wx.service.distribution.CollectionBookService
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/wx/collectionBook"
)
public
class
CollectionBookController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CollectionBookController
.
class
);
@Autowired
CollectionBookService
collectionBookService
;
@ApiOperation
(
value
=
"新建藏品标签"
)
@PostMapping
(
"/create"
)
public
Result
create
(
@RequestBody
CollectionBookRequestDto
dto
)
{
logger
.
info
(
"新建藏品标签,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
collectionBookService
.
create
(
dto
);
}
@ApiOperation
(
value
=
"查询藏品标签"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
CollectionBookRequestDto
dto
)
{
logger
.
info
(
"查询藏品标签,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
collectionBookService
.
findList
(
dto
);
}
@ApiOperation
(
value
=
"删除藏品标签"
)
@PostMapping
(
"/delete"
)
public
Result
delete
(
@RequestBody
CollectionBookRequestDto
dto
)
{
logger
.
info
(
"删除藏品标签,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
collectionBookService
.
delete
(
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/SupplierItemController.java
View file @
871c5d01
...
@@ -80,4 +80,29 @@ public class SupplierItemController {
...
@@ -80,4 +80,29 @@ public class SupplierItemController {
}
}
return
supplierItemService
.
findAuctionDetail
(
dto
);
return
supplierItemService
.
findAuctionDetail
(
dto
);
}
}
@ApiOperation
(
value
=
"上传藏品"
)
@PostMapping
(
"/upload"
)
public
Result
upload
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"上传藏品,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"name"
,
"商品名称"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
validator
.
getErrorInfo
());
}
return
supplierItemService
.
create
(
dto
);
}
@ApiOperation
(
value
=
"更新上传藏品"
)
@PostMapping
(
"/updateItem"
)
public
Result
updateItem
(
@RequestBody
SupplierItemRequestDto
dto
)
{
logger
.
info
(
"更新上传藏品,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
supplierItemService
.
update
(
dto
);
}
}
}
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