Commit 87c933ee authored by daniel's avatar daniel

fix(feedback): feedback 完善查询和信息展示

parent d6457ba4
......@@ -4,3 +4,5 @@ logs/
*.iml
*.ipr
*.iws
ai.md
Makefile
......@@ -53,6 +53,11 @@
<if test="isActive != null">
AND is_active = #{isActive}
</if>
<if test="keyword!= null and keyword!=''">
AND (
name LIKE CONCAT('%', #{keyword}, '%')
)
</if>
AND del_flag = 0 order by sort_order asc
</where>
</select>
......
......@@ -74,6 +74,9 @@
<if test="currentStatus != null and currentStatus != ''">
AND current_status = #{currentStatus}
</if>
<if test="keyword!= null and keyword!=''">
AND (content LIKE CONCAT('%', #{keyword}, '%') OR contactInfo LIKE CONCAT('%', #{keyword}, '%'))
</if>
AND del_flag = 0
</where>
order by id desc
......
......@@ -10,6 +10,7 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
......@@ -17,8 +18,9 @@ import java.util.Date;
@ApiModel(value = "反馈实体", description = "反馈实体类")
@Data
@Accessors(chain = true)
public class Feedback extends JaapRecord<BagDelivery> {
public class Feedback implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
@ApiModelProperty(value = "反馈编号,后台自主生成", notes = "反馈编号,后台自主生成")
private String feedbackNo; // 反馈编号,后台自主生成
@ApiModelProperty(value = "用户ID", notes = "用户ID")
......@@ -47,4 +49,5 @@ public class Feedback extends JaapRecord<BagDelivery> {
private Date createdAt;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt;
private Integer delFlag;
}
......@@ -11,14 +11,16 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "反馈分类实体", description = "反馈分类实体类")
@Data
@Accessors(chain = true)
public class FeedbackCategory extends JaapRecord<BagDelivery> {
public class FeedbackCategory implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
@ApiModelProperty(value = "用户id", notes = "用户id")
private Integer userId;
@ApiModelProperty(value = "赛事id", notes = "赛事id")
......@@ -35,4 +37,5 @@ public class FeedbackCategory extends JaapRecord<BagDelivery> {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间", notes = "更新时间")
private Date updatedAt;
private Integer delFlag;
}
......@@ -10,4 +10,5 @@ public class FeedbackCategoryQueryDTO extends PageDTO {
private Integer cmptId;
private String name;
private Integer isActive;
private String keyword;
}
......@@ -11,4 +11,5 @@ public class FeedbackQueryDTO extends PageDTO {
private Integer cmptId;
private String currentStatus;
private String feedbackNo;
private String keyword;
}
......@@ -27,8 +27,9 @@ public class FeedbackController {
@Resource
private CmptService cmptService;
@RequestMapping("index/{cmptId}")
@GetMapping("index/{cmptId}")
@PageView
@ApiOperation(value = "页面路径", notes = "页面路径")
public ModelAndView modulePage(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) {
Cmpt cmpt = cmptService.queryCmptBycmptId(cmptId);
......
......@@ -103,7 +103,7 @@
<n-tab-pane v-for="item in [{name:'全部',value:''},...statusOptions]" :name="item.value" :tab="item.name"></n-tab-pane>
</n-tabs>
</div>
<div class="ml-auto"><n-input placeholder="请输入搜索内容" /></div>
<div class="ml-auto"><n-input v-model:value="keyword" placeholder="请输入搜索内容" /></div>
<n-button type="primary">
搜索
</n-button>
......@@ -306,11 +306,12 @@
const showCategoryModal = ref(false)
const feedbackCategories = ref([])
const categoryFormValue = reactive({
id: 0,
id: undefined,
name: '',
sortOrder: 100,
isActive: 1,
})
const categoryIndex = ref(0)
const categoryRules = {
name: {
......@@ -325,6 +326,12 @@
pagination.value.page = 1
getFeedBacks()
}
const resetCategoryFormValue = () => {
categoryFormValue.id = undefined
categoryFormValue.name = ''
categoryFormValue.sortOrder = 100
categoryFormValue.isActive = 1
}
// 编辑分类
const onEditCategory = (item) => {
if (item) {
......@@ -392,7 +399,6 @@
// 使用fetch发起请求
const params = {
...categoryFormValue,
userId: getUId(),
cmptId: getCId()
}
loading.value = true
......@@ -412,10 +418,7 @@
if (data.code === 200) {
message.success('操作成功')
showCategoryModal.value = false
categoryFormValue.id = 0
categoryFormValue.name = ''
categoryFormValue.sortOrder = 100
categoryFormValue.isActive = 1
resetCategoryFormValue()
getCategories()
} else {
message.error(data.msg)
......@@ -439,7 +442,8 @@
vertical: true,
}, [
h(NText, {}, "反馈编号:" + row.feedbackNo),
h(NText, {}, "选手反馈:" + row.content),
h(NText, {}, "反馈内容:" + row.content),
h(NText, {}, "联系方式:" + row.contactInfo),
h(NText, {}, "反馈时间:" + row.createdAt),
h(NImageGroup, {}, [
...images.map((img) => h(NImage, {
......@@ -511,6 +515,7 @@
}
}]
const pagination = ref({ pageSize: 20, page: 1 })
const keyword = ref('')
// 文件列表
const fileList = ref([])
// 结果列表
......@@ -717,6 +722,7 @@
currentStatus: status.value ? undefined : status.value,
pageNum: pagination.value.page,
pageSize: pagination.value.pageSize,
keyword: keyword.value,
categoryId: feedbackCategories.value[categoryIndex.value].id
})
}).then(res => res.json()))
......@@ -766,6 +772,7 @@
feedbackRules,
updateFormattedValue,
resultFileList,
keyword,
// 反馈分类相关
feedbackCategories,
categoryIndex,
......
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