Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
8a1444e4
Commit
8a1444e4
authored
Nov 19, 2020
by
wuwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论添加,app标签查询
parent
62dcbd8f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
3 deletions
+98
-3
AppraiseLabeInfoDTO.java
...ithub/wxiaoqi/security/admin/dto/AppraiseLabeInfoDTO.java
+4
-0
UserCommentFindDTO.java
...github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
+9
-0
AppraiseLabelInfo.java
...thub/wxiaoqi/security/admin/entity/AppraiseLabelInfo.java
+4
-3
UserComment.java
...com/github/wxiaoqi/security/admin/entity/UserComment.java
+29
-0
UserCommentBiz.java
...com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
+24
-0
AppUserCommentController.java
...wxiaoqi/security/admin/rest/AppUserCommentController.java
+13
-0
AppraiseLabelInfoController.java
...aoqi/security/admin/rest/AppraiseLabelInfoController.java
+9
-0
AppraiseLabelInfoMapper.xml
...min/src/main/resources/mapper/AppraiseLabelInfoMapper.xml
+6
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppraiseLabeInfoDTO.java
View file @
8a1444e4
...
@@ -4,6 +4,8 @@ package com.github.wxiaoqi.security.admin.dto;
...
@@ -4,6 +4,8 @@ package com.github.wxiaoqi.security.admin.dto;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* @author libin
* @author libin
* @version 1.0
* @version 1.0
...
@@ -18,4 +20,6 @@ public class AppraiseLabeInfoDTO extends PageParam {
...
@@ -18,4 +20,6 @@ public class AppraiseLabeInfoDTO extends PageParam {
private
Integer
type
;
private
Integer
type
;
private
Integer
enable
;
private
Integer
enable
;
private
List
<
Integer
>
types
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
View file @
8a1444e4
...
@@ -3,6 +3,7 @@ package com.github.wxiaoqi.security.admin.dto;
...
@@ -3,6 +3,7 @@ package com.github.wxiaoqi.security.admin.dto;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -40,4 +41,12 @@ public class UserCommentFindDTO extends PageParam{
...
@@ -40,4 +41,12 @@ public class UserCommentFindDTO extends PageParam{
private
Integer
companyId
;
private
Integer
companyId
;
private
Integer
isDesc
;
private
Integer
isDesc
;
private
String
orderNo
;
private
String
appraiseJson
;
private
Integer
point
;
private
Integer
isAnonymous
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppraiseLabelInfo.java
View file @
8a1444e4
...
@@ -42,10 +42,10 @@ public class AppraiseLabelInfo implements Serializable {
...
@@ -42,10 +42,10 @@ public class AppraiseLabelInfo implements Serializable {
private
Integer
point
;
private
Integer
point
;
/**
/**
*
1-全部,2-房车,3-机车,4-游艇,5
豪车
*
0-全部,1-房车,2-机车,3-游艇,4
豪车
*/
*/
@Column
(
name
=
"type"
)
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"
1-全部,2-房车,3-机车,4-游艇,5
豪车"
)
@ApiModelProperty
(
value
=
"
0-全部,1-房车,2-机车,3-游艇,4
豪车"
)
private
Integer
type
;
private
Integer
type
;
/**
/**
...
@@ -90,5 +90,6 @@ public class AppraiseLabelInfo implements Serializable {
...
@@ -90,5 +90,6 @@ public class AppraiseLabelInfo implements Serializable {
@ApiModelProperty
(
value
=
"排序"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
private
Integer
sort
;
@Column
(
name
=
"tag_type"
)
private
Integer
tagType
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/UserComment.java
View file @
8a1444e4
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
...
@@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author libin
* @author libin
...
@@ -96,4 +98,31 @@ public class UserComment {
...
@@ -96,4 +98,31 @@ public class UserComment {
@Transient
@Transient
private
Integer
isCompany
;
private
Integer
isCompany
;
/**
* 订单编号
*/
@Column
(
name
=
"order_no"
)
private
String
orderNo
;
/**
* 评论详情
*/
@Column
(
name
=
"appraise_json"
)
private
String
appraiseJson
;
/**
* 评价总分
*/
@Column
(
name
=
"point"
)
private
Integer
point
;
/**
* 是否匿名0-不匿名,1-匿名
*/
@Column
(
name
=
"is_anonymous"
)
private
Integer
isAnonymous
;
@Transient
private
List
<
JSONObject
>
jsonList
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
View file @
8a1444e4
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
cn.hutool.core.map.MapUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO
;
...
@@ -138,5 +141,26 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
...
@@ -138,5 +141,26 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
return
dataVO
;
return
dataVO
;
}
}
/**
* 处理维度
* 总分
* @param userComment
*/
public
void
saveComment
(
UserComment
userComment
){
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
userComment
.
getAppraiseJson
());
if
(
jsonArray
==
null
||
jsonArray
.
size
()
==
0
){
throw
new
BaseException
(
"评论维度不能为空"
,
ResultCode
.
FAILED_CODE
);
}
Integer
point
=
0
;
//处理维度和总分
//[{"id":1,"name":"配送标签","point":10,"star":1},{"id":2,"name":"配送标签","point":20,"star":2}]
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++){
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
point
+=
jsonObject
.
getInteger
(
"point"
);
}
userComment
.
setPoint
(
point
);
addOrUpd
(
userComment
);
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserCommentController.java
View file @
8a1444e4
...
@@ -95,5 +95,18 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
...
@@ -95,5 +95,18 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
}
}
@PostMapping
(
"saveComment"
)
@ApiModelProperty
(
"评论"
)
public
ObjectRestResponse
saveComment
(
@RequestBody
UserComment
userComment
)
{
userComment
.
setUserId
(
getCurrentUserIdInt
());
baseBiz
.
saveComment
(
userComment
);
return
ObjectRestResponse
.
succ
();
}
@GetMapping
(
"app/unauth/selectCommentList"
)
@ApiModelProperty
(
"列表"
)
@IgnoreUserToken
public
ObjectRestResponse
selectCommentList
(
UserCommentFindDTO
commentFindDTO
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
commentFindDTO
));
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppraiseLabelInfoController.java
View file @
8a1444e4
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.admin.dto.AppraiseLabeInfoDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.admin.biz.AppraiseLabelInfoBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppraiseLabelInfoBiz
;
import
com.github.wxiaoqi.security.admin.entity.AppraiseLabelInfo
;
import
com.github.wxiaoqi.security.admin.entity.AppraiseLabelInfo
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -11,4 +15,9 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -11,4 +15,9 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"app/appraiseLabelInfo"
)
@RequestMapping
(
"app/appraiseLabelInfo"
)
public
class
AppraiseLabelInfoController
extends
BaseController
<
AppraiseLabelInfoBiz
,
AppraiseLabelInfo
>
{
public
class
AppraiseLabelInfoController
extends
BaseController
<
AppraiseLabelInfoBiz
,
AppraiseLabelInfo
>
{
@GetMapping
(
"tag/selectList"
)
@ApiModelProperty
(
"标签列表"
)
public
ObjectRestResponse
applySelectList
(
AppraiseLabeInfoDTO
appraiseLabeInfoDTO
)
{
return
baseBiz
.
selectList
(
appraiseLabeInfoDTO
);
}
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/resources/mapper/AppraiseLabelInfoMapper.xml
View file @
8a1444e4
...
@@ -31,6 +31,12 @@
...
@@ -31,6 +31,12 @@
<if
test=
"enable != null"
>
<if
test=
"enable != null"
>
AND a.enable = #{enable}
AND a.enable = #{enable}
</if>
</if>
<if
test=
"types != null and types.size() > 0"
>
and a.type in
<foreach
collection=
"types"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
</if>
order by a.upd_time DESC
order by a.upd_time DESC
</select>
</select>
</mapper>
</mapper>
\ 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