From 086c6cff1ebe0eb16db910753bf23dabb8056b17 Mon Sep 17 00:00:00 2001 From: lzx_mac <2602107437@qq.com> Date: Wed, 11 Dec 2024 15:23:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-pc/.env.development | 2 +- admin-pc/.env.production | 2 +- .../controller/AnswerAppletIndexController.java | 3 + .../api/controller/AnswerAppletPostController.java | 25 +++ .../api/service/AnswerAppletIndexService.java | 13 ++ .../service/impl/AnswerAppletIndexServiceImpl.java | 47 +++++- .../controller/AnswerListController.java | 171 +++++++++++++++++++ .../modules/answerList/entity/AnswerList.java | 62 +++++++ .../answerList/mapper/AnswerListMapper.java | 17 ++ .../answerList/mapper/xml/AnswerListMapper.xml | 5 + .../answerList/service/IAnswerListService.java | 14 ++ .../service/impl/AnswerListServiceImpl.java | 19 +++ .../modules/answerList/vue/AnswerListList.vue | 183 ++++++++++++++++++++ .../answerList/vue/modules/AnswerListForm.vue | 114 +++++++++++++ .../vue/modules/AnswerListModal.Style#Drawer.vue | 84 ++++++++++ .../answerList/vue/modules/AnswerListModal.vue | 60 +++++++ .../modules/answerList/vue3/AnswerList.api.ts | 61 +++++++ .../modules/answerList/vue3/AnswerList.data.ts | 43 +++++ .../modules/answerList/vue3/AnswerListList.vue | 162 ++++++++++++++++++ .../answerList/vue3/components/AnswerListModal.vue | 58 +++++++ .../controller/AnswerListLogController.java | 171 +++++++++++++++++++ .../answerListLog/entity/AnswerListLog.java | 67 ++++++++ .../answerListLog/mapper/AnswerListLogMapper.java | 17 ++ .../mapper/xml/AnswerListLogMapper.xml | 5 + .../service/IAnswerListLogService.java | 14 ++ .../service/impl/AnswerListLogServiceImpl.java | 19 +++ .../answerListLog/vue/AnswerListLogList.vue | 184 +++++++++++++++++++++ .../vue/modules/AnswerListLogForm.vue | 114 +++++++++++++ .../modules/AnswerListLogModal.Style#Drawer.vue | 84 ++++++++++ .../vue/modules/AnswerListLogModal.vue | 60 +++++++ .../answerListLog/vue3/AnswerListLog.api.ts | 61 +++++++ .../answerListLog/vue3/AnswerListLog.data.ts | 49 ++++++ .../answerListLog/vue3/AnswerListLogList.vue | 162 ++++++++++++++++++ .../vue3/components/AnswerListLogModal.vue | 58 +++++++ .../controller/AnswerReservationController.java | 2 +- .../entity/AnswerReservation.java | 9 +- .../mapper/AnswerReservationMapper.java | 2 +- .../service/IAnswerReservationService.java | 2 +- .../service/impl/AnswerReservationServiceImpl.java | 2 +- .../vue/AnswerReservationList.vue | 11 +- .../vue/modules/AnswerReservationForm.vue | 7 +- .../vue3/AnswerReservation.data.ts | 17 +- module-system/pom.xml | 13 -- 43 files changed, 2248 insertions(+), 27 deletions(-) create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/controller/AnswerListController.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/entity/AnswerList.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/AnswerListMapper.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/xml/AnswerListMapper.xml create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/IAnswerListService.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/impl/AnswerListServiceImpl.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/AnswerListList.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListForm.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.Style#Drawer.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.api.ts create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.data.ts create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerListList.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/components/AnswerListModal.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/controller/AnswerListLogController.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/entity/AnswerListLog.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/AnswerListLogMapper.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/xml/AnswerListLogMapper.xml create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/IAnswerListLogService.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/impl/AnswerListLogServiceImpl.java create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/AnswerListLogList.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogForm.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.Style#Drawer.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.api.ts create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.data.ts create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLogList.vue create mode 100644 applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/components/AnswerListLogModal.vue diff --git a/admin-pc/.env.development b/admin-pc/.env.development index 274c43f..e654654 100644 --- a/admin-pc/.env.development +++ b/admin-pc/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=https://admin.geniusjourneyclub.com/answer-api/ +VUE_APP_API_BASE_URL=http://localhost:8001/answer-api/ VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview diff --git a/admin-pc/.env.production b/admin-pc/.env.production index 3bd9afe..6baa5e6 100644 --- a/admin-pc/.env.production +++ b/admin-pc/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=https://admin.geniusjourneyclub.com/answer-api/ +VUE_APP_API_BASE_URL=http://localhost:8001/answer-api/ VUE_APP_CAS_BASE_URL=http://localhost:8888/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java b/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java index 3e8f3fe..9d2e327 100644 --- a/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java +++ b/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.api.service.AnswerAppletIndexService; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.jeecg.common.api.vo.Result; @@ -56,4 +57,6 @@ public class AnswerAppletIndexController { + + } diff --git a/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java b/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java index ec921c6..8bf43bc 100644 --- a/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java +++ b/applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java @@ -69,4 +69,29 @@ public class AnswerAppletPostController { } + //评论列表接口 + @ApiOperation(value="我的-评论列表接口", notes="我的-评论列表接口") + @GetMapping(value = "/queryAnswerList") + public Result queryAnswerList(@RequestHeader("X-Access-Token") String token){ + return answerAppletIndexService.queryAnswerList(token); + } + + + //回答评论接口 + @ApiOperation(value="我的-回答评论接口", notes="我的-回答评论接口") + @PostMapping(value = "/answerComment") + public Result answerComment(@RequestHeader("X-Access-Token") String token,String id,String answerId,String content){ + return answerAppletIndexService.answerComment(token,id,answerId,content); + } + + + //点击评论完成修改状态 + @ApiOperation(value="点击评论完成修改状态", notes="点击评论完成修改状态") + @GetMapping(value = "/commentStatus") + public Result commentStatus(@RequestHeader("X-Access-Token") String token,String id){ + return answerAppletIndexService.commentStatus(token,id); + } + + + } diff --git a/applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java b/applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java index ef689e9..cde0990 100644 --- a/applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java +++ b/applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java @@ -2,6 +2,7 @@ package org.jeecg.api.service; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.answerReservation.entity.AnswerReservation; +import org.springframework.web.bind.annotation.RequestHeader; public interface AnswerAppletIndexService { @@ -43,4 +44,16 @@ public interface AnswerAppletIndexService { //取消预约 Result cancelReservation(String token,String id); + + + + //评论列表相关 + Result queryAnswerList(String token); + + //回答评论接口 + Result answerComment(String token,String id,String topId,String content); + + + //点击评论完成修改状态 + Result commentStatus(String token,String id); } diff --git a/applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java b/applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java index da097d0..6a956a7 100644 --- a/applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java +++ b/applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java @@ -9,6 +9,10 @@ import org.jeecg.modules.answerArticle.entity.AnswerArticle; import org.jeecg.modules.answerArticle.service.IAnswerArticleService; import org.jeecg.modules.answerIntroduce.entity.AnswerIntroduce; import org.jeecg.modules.answerIntroduce.service.IAnswerIntroduceService; +import org.jeecg.modules.answerList.entity.AnswerList; +import org.jeecg.modules.answerList.service.IAnswerListService; +import org.jeecg.modules.answerListLog.entity.AnswerListLog; +import org.jeecg.modules.answerListLog.service.IAnswerListLogService; import org.jeecg.modules.answerReservation.entity.AnswerReservation; import org.jeecg.modules.answerReservation.service.IAnswerReservationService; import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog; @@ -53,7 +57,10 @@ public class AnswerAppletIndexServiceImpl implements AnswerAppletIndexService { //公共配置 @Resource private ICommonConfigService commonConfigService; - + @Resource + private IAnswerListService answerListService; + @Resource + private IAnswerListLogService answerListLogService; //首页-出现问题列表接口 @@ -145,6 +152,8 @@ public class AnswerAppletIndexServiceImpl implements AnswerAppletIndexService { return Result.error("请输入电话"); } bean.setUserId(hanHaiMember.getId()); + bean.setState(0); + bean.setCreateTime(new Date()); answerReservationService.save(bean); return Result.OK(); } @@ -173,7 +182,43 @@ public class AnswerAppletIndexServiceImpl implements AnswerAppletIndexService { @Override public Result cancelReservation(String token,String id){ AnswerReservation answerReservation = answerReservationService.getById(id); + answerReservation.setState(3); answerReservationService.updateById(answerReservation); return Result.OK(); } + + + //评论列表相关 + @Override + public Result queryAnswerList(String token){ + List list = answerListService + .lambdaQuery() + .orderByDesc(AnswerList::getSort) + .list(); + return Result.OK(list); + } + + + //回答评论接口 + @Override + public Result answerComment(String token,String id,String topId,String content){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + AnswerListLog answerListLog = new AnswerListLog(); + answerListLog.setUserId(hanHaiMember.getId()); + answerListLog.setAnswerId(topId); + answerListLog.setContext(content); + answerListLogService.save(answerListLog); + return Result.OK("评论成功"); + } + + + //点击评论完成修改状态 + @Override + public Result commentStatus(String token,String id){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + AnswerReservation answerReservation = answerReservationService.getById(id); + answerReservation.setState(2); + answerReservationService.updateById(answerReservation); + return Result.OK("评论成功"); + } } diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/controller/AnswerListController.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/controller/AnswerListController.java new file mode 100644 index 0000000..18a0966 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/controller/AnswerListController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.answerList.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.answerList.entity.AnswerList; +import org.jeecg.modules.answerList.service.IAnswerListService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 评论配置 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Api(tags="评论配置") +@RestController +@RequestMapping("/answerList/answerList") +@Slf4j +public class AnswerListController extends JeecgController { + @Autowired + private IAnswerListService answerListService; + + /** + * 分页列表查询 + * + * @param answerList + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "评论配置-分页列表查询") + @ApiOperation(value="评论配置-分页列表查询", notes="评论配置-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(AnswerList answerList, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(answerList, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = answerListService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param answerList + * @return + */ + @AutoLog(value = "评论配置-添加") + @ApiOperation(value="评论配置-添加", notes="评论配置-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody AnswerList answerList) { + answerListService.save(answerList); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param answerList + * @return + */ + @AutoLog(value = "评论配置-编辑") + @ApiOperation(value="评论配置-编辑", notes="评论配置-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody AnswerList answerList) { + answerListService.updateById(answerList); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "评论配置-通过id删除") + @ApiOperation(value="评论配置-通过id删除", notes="评论配置-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + answerListService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "评论配置-批量删除") + @ApiOperation(value="评论配置-批量删除", notes="评论配置-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.answerListService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "评论配置-通过id查询") + @ApiOperation(value="评论配置-通过id查询", notes="评论配置-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + AnswerList answerList = answerListService.getById(id); + if(answerList==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(answerList); + } + + /** + * 导出excel + * + * @param request + * @param answerList + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, AnswerList answerList) { + return super.exportXls(request, answerList, AnswerList.class, "评论配置"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, AnswerList.class); + } + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/entity/AnswerList.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/entity/AnswerList.java new file mode 100644 index 0000000..2daa2cc --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/entity/AnswerList.java @@ -0,0 +1,62 @@ +package org.jeecg.modules.answerList.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 评论配置 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Data +@TableName("answer_list") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="answer_list对象", description="评论配置") +public class AnswerList implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**题目*/ + @Excel(name = "题目", width = 15) + @ApiModelProperty(value = "题目") + private java.lang.String title; + /**答案*/ + @Excel(name = "答案", width = 15) + @ApiModelProperty(value = "答案") + private java.lang.String answer; + /**排序*/ + @Excel(name = "排序", width = 15) + @ApiModelProperty(value = "排序") + private java.lang.Integer sort; +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/AnswerListMapper.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/AnswerListMapper.java new file mode 100644 index 0000000..012e853 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/AnswerListMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.answerList.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.answerList.entity.AnswerList; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 评论配置 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +public interface AnswerListMapper extends BaseMapper { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/xml/AnswerListMapper.xml b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/xml/AnswerListMapper.xml new file mode 100644 index 0000000..7073670 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/mapper/xml/AnswerListMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/IAnswerListService.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/IAnswerListService.java new file mode 100644 index 0000000..f041b11 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/IAnswerListService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.answerList.service; + +import org.jeecg.modules.answerList.entity.AnswerList; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 评论配置 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +public interface IAnswerListService extends IService { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/impl/AnswerListServiceImpl.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/impl/AnswerListServiceImpl.java new file mode 100644 index 0000000..0db73c9 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/service/impl/AnswerListServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.answerList.service.impl; + +import org.jeecg.modules.answerList.entity.AnswerList; +import org.jeecg.modules.answerList.mapper.AnswerListMapper; +import org.jeecg.modules.answerList.service.IAnswerListService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 评论配置 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Service +public class AnswerListServiceImpl extends ServiceImpl implements IAnswerListService { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/AnswerListList.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/AnswerListList.vue new file mode 100644 index 0000000..65c61b1 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/AnswerListList.vue @@ -0,0 +1,183 @@ + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListForm.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListForm.vue new file mode 100644 index 0000000..b911c44 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListForm.vue @@ -0,0 +1,114 @@ + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.Style#Drawer.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.Style#Drawer.vue new file mode 100644 index 0000000..ab8b29b --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.vue new file mode 100644 index 0000000..2eb5f63 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue/modules/AnswerListModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.api.ts b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.api.ts new file mode 100644 index 0000000..9536e46 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/answerList/answerList/list', + save='/answerList/answerList/add', + edit='/answerList/answerList/edit', + deleteOne = '/answerList/answerList/delete', + deleteBatch = '/answerList/answerList/deleteBatch', + importExcel = '/answerList/answerList/importExcel', + exportXls = '/answerList/answerList/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.data.ts b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.data.ts new file mode 100644 index 0000000..0e03ca8 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerList.data.ts @@ -0,0 +1,43 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '题目', + align:"center", + dataIndex: 'title' + }, + { + title: '答案', + align:"center", + dataIndex: 'answer' + }, + { + title: '排序', + align:"center", + dataIndex: 'sort' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '题目', + field: 'title', + component: 'InputTextArea',//TODO 注意string转换问题 + }, + { + label: '答案', + field: 'answer', + component: 'InputTextArea',//TODO 注意string转换问题 + }, + { + label: '排序', + field: 'sort', + component: 'InputNumber', + }, +]; diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerListList.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerListList.vue new file mode 100644 index 0000000..73ca546 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/AnswerListList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/components/AnswerListModal.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/components/AnswerListModal.vue new file mode 100644 index 0000000..c623669 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerList/vue3/components/AnswerListModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/controller/AnswerListLogController.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/controller/AnswerListLogController.java new file mode 100644 index 0000000..9b703ef --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/controller/AnswerListLogController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.answerListLog.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.answerListLog.entity.AnswerListLog; +import org.jeecg.modules.answerListLog.service.IAnswerListLogService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 评论记录 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Api(tags="评论记录") +@RestController +@RequestMapping("/answerListLog/answerListLog") +@Slf4j +public class AnswerListLogController extends JeecgController { + @Autowired + private IAnswerListLogService answerListLogService; + + /** + * 分页列表查询 + * + * @param answerListLog + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "评论记录-分页列表查询") + @ApiOperation(value="评论记录-分页列表查询", notes="评论记录-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(AnswerListLog answerListLog, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(answerListLog, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = answerListLogService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param answerListLog + * @return + */ + @AutoLog(value = "评论记录-添加") + @ApiOperation(value="评论记录-添加", notes="评论记录-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody AnswerListLog answerListLog) { + answerListLogService.save(answerListLog); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param answerListLog + * @return + */ + @AutoLog(value = "评论记录-编辑") + @ApiOperation(value="评论记录-编辑", notes="评论记录-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody AnswerListLog answerListLog) { + answerListLogService.updateById(answerListLog); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "评论记录-通过id删除") + @ApiOperation(value="评论记录-通过id删除", notes="评论记录-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + answerListLogService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "评论记录-批量删除") + @ApiOperation(value="评论记录-批量删除", notes="评论记录-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.answerListLogService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "评论记录-通过id查询") + @ApiOperation(value="评论记录-通过id查询", notes="评论记录-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + AnswerListLog answerListLog = answerListLogService.getById(id); + if(answerListLog==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(answerListLog); + } + + /** + * 导出excel + * + * @param request + * @param answerListLog + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, AnswerListLog answerListLog) { + return super.exportXls(request, answerListLog, AnswerListLog.class, "评论记录"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, AnswerListLog.class); + } + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/entity/AnswerListLog.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/entity/AnswerListLog.java new file mode 100644 index 0000000..c5080f2 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/entity/AnswerListLog.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.answerListLog.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 评论记录 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Data +@TableName("answer_list_log") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="answer_list_log对象", description="评论记录") +public class AnswerListLog implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**用户*/ + @Excel(name = "用户", width = 15, dictTable = "answer_list", dicText = "title", dicCode = "id") + @Dict(dictTable = "answer_list", dicText = "title", dicCode = "id") + @ApiModelProperty(value = "用户") + private java.lang.String userId; + /**评论*/ + @Excel(name = "评论", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id") + @Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id") + @ApiModelProperty(value = "评论") + private java.lang.String answerId; + /**答案*/ + @Excel(name = "答案", width = 15) + @ApiModelProperty(value = "答案") + private java.lang.String context; +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/AnswerListLogMapper.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/AnswerListLogMapper.java new file mode 100644 index 0000000..a0a115f --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/AnswerListLogMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.answerListLog.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.answerListLog.entity.AnswerListLog; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 评论记录 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +public interface AnswerListLogMapper extends BaseMapper { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/xml/AnswerListLogMapper.xml b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/xml/AnswerListLogMapper.xml new file mode 100644 index 0000000..8fea4e8 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/mapper/xml/AnswerListLogMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/IAnswerListLogService.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/IAnswerListLogService.java new file mode 100644 index 0000000..ada8ef5 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/IAnswerListLogService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.answerListLog.service; + +import org.jeecg.modules.answerListLog.entity.AnswerListLog; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 评论记录 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +public interface IAnswerListLogService extends IService { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/impl/AnswerListLogServiceImpl.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/impl/AnswerListLogServiceImpl.java new file mode 100644 index 0000000..7acf975 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/service/impl/AnswerListLogServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.answerListLog.service.impl; + +import org.jeecg.modules.answerListLog.entity.AnswerListLog; +import org.jeecg.modules.answerListLog.mapper.AnswerListLogMapper; +import org.jeecg.modules.answerListLog.service.IAnswerListLogService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 评论记录 + * @Author: jeecg-boot + * @Date: 2024-12-09 + * @Version: V1.0 + */ +@Service +public class AnswerListLogServiceImpl extends ServiceImpl implements IAnswerListLogService { + +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/AnswerListLogList.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/AnswerListLogList.vue new file mode 100644 index 0000000..8faa675 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/AnswerListLogList.vue @@ -0,0 +1,184 @@ + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogForm.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogForm.vue new file mode 100644 index 0000000..3de9344 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogForm.vue @@ -0,0 +1,114 @@ + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.Style#Drawer.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.Style#Drawer.vue new file mode 100644 index 0000000..835f944 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.vue new file mode 100644 index 0000000..54e510a --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue/modules/AnswerListLogModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.api.ts b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.api.ts new file mode 100644 index 0000000..ee0c8ff --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/answerListLog/answerListLog/list', + save='/answerListLog/answerListLog/add', + edit='/answerListLog/answerListLog/edit', + deleteOne = '/answerListLog/answerListLog/delete', + deleteBatch = '/answerListLog/answerListLog/deleteBatch', + importExcel = '/answerListLog/answerListLog/importExcel', + exportXls = '/answerListLog/answerListLog/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.data.ts b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.data.ts new file mode 100644 index 0000000..631d07d --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLog.data.ts @@ -0,0 +1,49 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '用户', + align:"center", + dataIndex: 'userId_dictText' + }, + { + title: '评论', + align:"center", + dataIndex: 'answerId_dictText' + }, + { + title: '答案', + align:"center", + dataIndex: 'context' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '用户', + field: 'userId', + component: 'JSearchSelect', + componentProps:{ + dict:"answer_list,title,id" + }, + }, + { + label: '评论', + field: 'answerId', + component: 'JSearchSelect', + componentProps:{ + dict:"han_hai_member,nick_name,id" + }, + }, + { + label: '答案', + field: 'context', + component: 'InputTextArea',//TODO 注意string转换问题 + }, +]; diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLogList.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLogList.vue new file mode 100644 index 0000000..bb6ac11 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/AnswerListLogList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/components/AnswerListLogModal.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/components/AnswerListLogModal.vue new file mode 100644 index 0000000..ab7a205 --- /dev/null +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerListLog/vue3/components/AnswerListLogModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/controller/AnswerReservationController.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/controller/AnswerReservationController.java index 6ea1d5f..e03970f 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/controller/AnswerReservationController.java +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/controller/AnswerReservationController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 预约记录表 * @Author: jeecg-boot - * @Date: 2024-11-19 + * @Date: 2024-12-09 * @Version: V1.0 */ @Api(tags="预约记录表") diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/entity/AnswerReservation.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/entity/AnswerReservation.java index e64ec01..f9fba74 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/entity/AnswerReservation.java +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/entity/AnswerReservation.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 预约记录表 * @Author: jeecg-boot - * @Date: 2024-11-19 + * @Date: 2024-12-09 * @Version: V1.0 */ @Data @@ -84,11 +84,16 @@ public class AnswerReservation implements Serializable { @ApiModelProperty(value = "详细地址") private java.lang.String address; /**用户昵称*/ - @Excel(name = "用户昵称", width = 15) + @Excel(name = "用户昵称", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id") + @Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id") @ApiModelProperty(value = "用户昵称") private java.lang.String userId; /**备注*/ @Excel(name = "备注", width = 15) @ApiModelProperty(value = "备注") private java.lang.String remarks; + /**预约状态*/ + @Excel(name = "预约状态", width = 15) + @ApiModelProperty(value = "预约状态") + private java.lang.Integer state; } diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/mapper/AnswerReservationMapper.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/mapper/AnswerReservationMapper.java index 1c5e0c1..0b90f8e 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/mapper/AnswerReservationMapper.java +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/mapper/AnswerReservationMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 预约记录表 * @Author: jeecg-boot - * @Date: 2024-11-19 + * @Date: 2024-12-09 * @Version: V1.0 */ public interface AnswerReservationMapper extends BaseMapper { diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/IAnswerReservationService.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/IAnswerReservationService.java index c6c00b8..96b30b2 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/IAnswerReservationService.java +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/IAnswerReservationService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 预约记录表 * @Author: jeecg-boot - * @Date: 2024-11-19 + * @Date: 2024-12-09 * @Version: V1.0 */ public interface IAnswerReservationService extends IService { diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/impl/AnswerReservationServiceImpl.java b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/impl/AnswerReservationServiceImpl.java index 7e0257e..0f4a1ea 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/impl/AnswerReservationServiceImpl.java +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/service/impl/AnswerReservationServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 预约记录表 * @Author: jeecg-boot - * @Date: 2024-11-19 + * @Date: 2024-12-09 * @Version: V1.0 */ @Service diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/AnswerReservationList.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/AnswerReservationList.vue index 121dfec..91b4dae 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/AnswerReservationList.vue +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/AnswerReservationList.vue @@ -99,6 +99,7 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import AnswerReservationModal from './modules/AnswerReservationModal' + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' export default { name: 'AnswerReservationList', @@ -169,13 +170,18 @@ { title:'用户昵称', align:"center", - dataIndex: 'userId' + dataIndex: 'userId_dictText' }, { title:'备注', align:"center", dataIndex: 'remarks' }, + { + title:'预约状态', + align:"center", + dataIndex: 'state' + }, { title: '操作', dataIndex: 'action', @@ -219,8 +225,9 @@ fieldList.push({type:'string',value:'city',text:'市',dictCode:''}) fieldList.push({type:'string',value:'area',text:'区',dictCode:''}) fieldList.push({type:'string',value:'address',text:'详细地址',dictCode:''}) - fieldList.push({type:'string',value:'userId',text:'用户昵称',dictCode:''}) + fieldList.push({type:'sel_search',value:'userId',text:'用户昵称',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'}) fieldList.push({type:'string',value:'remarks',text:'备注',dictCode:''}) + fieldList.push({type:'int',value:'state',text:'预约状态',dictCode:''}) this.superFieldList = fieldList } } diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/modules/AnswerReservationForm.vue b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/modules/AnswerReservationForm.vue index 10b1a40..da5a7fc 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/modules/AnswerReservationForm.vue +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue/modules/AnswerReservationForm.vue @@ -50,7 +50,7 @@ - + @@ -58,6 +58,11 @@ + + + + + diff --git a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue3/AnswerReservation.data.ts b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue3/AnswerReservation.data.ts index 4383ef8..eeb5c1e 100644 --- a/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue3/AnswerReservation.data.ts +++ b/applet-answer-api/src/main/java/org/jeecg/modules/answerReservation/vue3/AnswerReservation.data.ts @@ -52,13 +52,18 @@ export const columns: BasicColumn[] = [ { title: '用户昵称', align:"center", - dataIndex: 'userId' + dataIndex: 'userId_dictText' }, { title: '备注', align:"center", dataIndex: 'remarks' }, + { + title: '预约状态', + align:"center", + dataIndex: 'state' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -113,11 +118,19 @@ export const formSchema: FormSchema[] = [ { label: '用户昵称', field: 'userId', - component: 'Input', + component: 'JSearchSelect', + componentProps:{ + dict:"han_hai_member,nick_name,id" + }, }, { label: '备注', field: 'remarks', component: 'Input', }, + { + label: '预约状态', + field: 'state', + component: 'InputNumber', + }, ]; diff --git a/module-system/pom.xml b/module-system/pom.xml index 643e46c..3f824e3 100644 --- a/module-system/pom.xml +++ b/module-system/pom.xml @@ -83,20 +83,7 @@ - - - org.jeecgframework.boot - applet-home-api - ${jeecgboot.version} - - - - - org.jeecgframework.boot - applet-rice-api - ${jeecgboot.version} -