Commit 87c933ee authored by daniel's avatar daniel

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

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