Merge pull request '1' (#2) from develop into main

main
prxhap34i 1 month ago
commit bca0ae2ec7

2
.gitignore vendored

@ -4,7 +4,7 @@ node_modules/
# 忽略Logs # 忽略Logs
logs logs
*.log *.log
#
# 忽略/dist目录相对.gitignore文件所在目录 # 忽略/dist目录相对.gitignore文件所在目录
/dist /dist

@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* *
*/ */

@ -1,7 +1,6 @@
package com.annotation; package com.annotation;
import java.lang.annotation.*; import java.lang.annotation.*;
/** /**
* Token * Token
*/ */

@ -4,7 +4,6 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* *
*/ */

@ -5,7 +5,6 @@ import java.util.Date;
import org.apache.ibatis.reflection.MetaObject; import org.apache.ibatis.reflection.MetaObject;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler; import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
/** /**
* *
*/ */

@ -6,7 +6,6 @@ import org.springframework.context.annotation.Configuration;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler; import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
import com.baomidou.mybatisplus.plugins.PaginationInterceptor; import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
/** /**
* mybatis-plus * mybatis-plus
*/ */

@ -31,7 +31,6 @@ import com.service.*;
import com.utils.PageUtils; import com.utils.PageUtils;
import com.utils.R; import com.utils.R;
import com.alibaba.fastjson.*; import com.alibaba.fastjson.*;
/** /**
* 线 * 线
* *
@ -60,7 +59,6 @@ public class ChatController {
@Autowired @Autowired
private YishengService yishengService; private YishengService yishengService;
/** /**
* *
*/ */
@ -87,7 +85,6 @@ public class ChatController {
} }
return R.ok().put("data", page); return R.ok().put("data", page);
} }
/** /**
* *
*/ */
@ -99,13 +96,13 @@ public class ChatController {
//entity转view //entity转view
ChatView view = new ChatView(); ChatView view = new ChatView();
BeanUtils.copyProperties( chat , view );//把实体数据重构到view中 BeanUtils.copyProperties( chat , view );//把实体数据重构到view中
//级联表 //级联表
YonghuEntity yonghu = yonghuService.selectById(chat.getYonghuId()); YonghuEntity yonghu = yonghuService.selectById(chat.getYonghuId());
if(yonghu != null){ if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段 BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId()); view.setYonghuId(yonghu.getId());
} }
//修改对应字典表字段 //修改对应字典表字段
dictionaryService.dictionaryConvert(view, request); dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view); return R.ok().put("data", view);
@ -114,7 +111,6 @@ public class ChatController {
} }
} }
/** /**
* *
*/ */
@ -146,7 +142,6 @@ public class ChatController {
return R.error(511,"表中有相同数据"); return R.error(511,"表中有相同数据");
} }
} }
/** /**
* *
*/ */
@ -159,6 +154,7 @@ public class ChatController {
// return R.error(511,"永远不会进入"); // return R.error(511,"永远不会进入");
// else if("用户".equals(role)) // else if("用户".equals(role))
// chat.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")))); // chat.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
//根据字段查询是否有相同数据 //根据字段查询是否有相同数据
Wrapper<ChatEntity> queryWrapper = new EntityWrapper<ChatEntity>() Wrapper<ChatEntity> queryWrapper = new EntityWrapper<ChatEntity>()
.notIn("id",chat.getId()) .notIn("id",chat.getId())
@ -180,6 +176,7 @@ public class ChatController {
} }
} }
/** /**
* *
*/ */
@ -191,6 +188,7 @@ public class ChatController {
} }
/** /**
* *
*/ */
@ -219,20 +217,15 @@ public class ChatController {
for(List<String> data:dataList){ for(List<String> data:dataList){
//循环 //循环
ChatEntity chatEntity = new ChatEntity(); ChatEntity chatEntity = new ChatEntity();
// chatEntity.setYonghuId(Integer.valueOf(data.get(0))); //提问用户 要改的
// chatEntity.setChatIssue(data.get(0)); //问题 要改的
// chatEntity.setIssueTime(new Date(data.get(0))); //问题时间 要改的
// chatEntity.setChatReply(data.get(0)); //回复 要改的
// chatEntity.setReplyTime(new Date(data.get(0))); //回复时间 要改的
// chatEntity.setZhuangtaiTypes(Integer.valueOf(data.get(0))); //状态 要改的
// chatEntity.setChatTypes(Integer.valueOf(data.get(0))); //数据类型 要改的
// chatEntity.setInsertTime(date);//时间
chatList.add(chatEntity); chatList.add(chatEntity);
//把要查询是否重复的字段放入map中 //把要查询是否重复的字段放入map中
} }
//查询是否重复 //查询是否重复
chatService.insertBatch(chatList); chatService.insertBatch(chatList);
return R.ok(); return R.ok();
@ -248,6 +241,7 @@ public class ChatController {
/** /**
* *
*/ */
@ -255,13 +249,11 @@ public class ChatController {
@RequestMapping("/list") @RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
// 没有指定排序字段就默认id倒序 // 没有指定排序字段就默认id倒序
if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){ if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
params.put("orderBy","id"); params.put("orderBy","id");
} }
PageUtils page = chatService.queryPage(params); PageUtils page = chatService.queryPage(params);
//字典表数据转换 //字典表数据转换
List<ChatView> list =(List<ChatView>)page.getList(); List<ChatView> list =(List<ChatView>)page.getList();
for(ChatView c:list) for(ChatView c:list)
@ -269,6 +261,7 @@ public class ChatController {
return R.ok().put("data", page); return R.ok().put("data", page);
} }
/** /**
* *
*/ */
@ -278,17 +271,18 @@ public class ChatController {
ChatEntity chat = chatService.selectById(id); ChatEntity chat = chatService.selectById(id);
if(chat !=null){ if(chat !=null){
//entity转view //entity转view
ChatView view = new ChatView(); ChatView view = new ChatView();
BeanUtils.copyProperties( chat , view );//把实体数据重构到view中 BeanUtils.copyProperties( chat , view );//把实体数据重构到view中
//级联表 //级联表
YonghuEntity yonghu = yonghuService.selectById(chat.getYonghuId()); YonghuEntity yonghu = yonghuService.selectById(chat.getYonghuId());
if(yonghu != null){ if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段 BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId()); view.setYonghuId(yonghu.getId());
} }
//修改对应字典表字段 //修改对应字典表字段
dictionaryService.dictionaryConvert(view, request); dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view); return R.ok().put("data", view);
@ -298,6 +292,7 @@ public class ChatController {
} }
/** /**
* *
*/ */

@ -35,6 +35,7 @@ import com.utils.BaiduUtil;
import com.utils.FileUtil; import com.utils.FileUtil;
import com.utils.R; import com.utils.R;
/** /**
* *
*/ */
@ -65,7 +66,6 @@ public class CommonController{
/** /**
* *
*
* @param face1 1 * @param face1 1
* @param face2 2 * @param face2 2
* @return * @return
@ -106,6 +106,7 @@ public class CommonController{
return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString())); return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString()));
} }
/** /**
* tablecolumn() * tablecolumn()
* @return * @return
@ -126,6 +127,7 @@ public class CommonController{
return R.ok().put("data", data); return R.ok().put("data", data);
} }
/** /**
* tablecolumn * tablecolumn
* @return * @return
@ -141,6 +143,7 @@ public class CommonController{
return R.ok().put("data", result); return R.ok().put("data", result);
} }
/** /**
* tablesfsh * tablesfsh
* @param map * @param map
@ -153,6 +156,7 @@ public class CommonController{
return R.ok(); return R.ok();
} }
/** /**
* *
* @param tableName * @param tableName
@ -194,6 +198,7 @@ public class CommonController{
return R.ok().put("count", count); return R.ok().put("count", count);
} }
/** /**
* *
*/ */
@ -206,6 +211,7 @@ public class CommonController{
} }
/** /**
* *
*/ */
@ -219,6 +225,7 @@ public class CommonController{
return R.ok().put("data", result); return R.ok().put("data", result);
} }
/** /**
* *
*/ */
@ -232,6 +239,7 @@ public class CommonController{
return R.ok().put("data", result); return R.ok().put("data", result);
} }
/** /**
* *
*/ */
@ -247,12 +255,7 @@ public class CommonController{
} }
/**
*
*
*
*
*/
/** /**
* *
@ -269,12 +272,12 @@ public class CommonController{
} }
/** /**
tableName tableName
condition1 1 condition1 1
condition1Value 1 condition1Value 1
average average
Number(res.data.value.toFixed(1)) Number(res.data.value.toFixed(1))
if(res.data){} if(res.data){}
@ -287,6 +290,7 @@ public class CommonController{
return R.ok().put("data", queryScore); return R.ok().put("data", queryScore);
} }
/** /**
* *
* tableName * tableName
@ -300,7 +304,6 @@ public class CommonController{
return R.ok().put("data", result); return R.ok().put("data", result);
} }
/** /**
* *
* tableName * tableName
@ -326,9 +329,9 @@ public class CommonController{
return R.ok().put("data", result); return R.ok().put("data", result);
} }
/** /**
* * 1
*
* tableName * tableName
* groupColumn * groupColumn
* dateFormatType 1: 2: 3: * dateFormatType 1: 2: 3:

Loading…
Cancel
Save