diff --git a/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskGroupMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskGroupMapper.xml index d0b5919..f8df072 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskGroupMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskGroupMapper.xml @@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{examCode}, #{groupCode}, - (select nvl(max(order_id),0) + 1 from exam_task_group where exam_code = #{examCode}), + (select ifnull(max(order_id),0) + 1 from exam_task_group where exam_code = #{examCode}), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskManagerMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskManagerMapper.xml index 5c5075b..19ead06 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskManagerMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/exam/ExamTaskManagerMapper.xml @@ -30,13 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select a.exam_code, a.questions_code, a.questions_number,b.questions_type,b.questions_score,c.questions_answer,nvl(c.is_mark,1) as is_mark,nvl(c.is_current,1) as is_current from exam_task_questions a + select a.exam_code, a.questions_code, a.questions_number,b.questions_type,b.questions_score,c.questions_answer,ifnull(c.is_mark,1) as is_mark,ifnull(c.is_current,1) as is_current from exam_task_questions a left join exam_questions_property b on b.questions_code = a.questions_code left join exam_task_answer c on c.exam_code = a.exam_code and c.questions_code = a.questions_code and c.user_code = #{userCode} where a.exam_code = #{examCode} diff --git a/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamTitleDataMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamTitleDataMapper.xml index b66103b..ed29ced 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamTitleDataMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamTitleDataMapper.xml @@ -29,11 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamUserScoreMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamUserScoreMapper.xml index dab90c1..9598f2a 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamUserScoreMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/onlineexam/ExamUserScoreMapper.xml @@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into exam_user_score - select a.exam_code, a.user_code, b.start_time, sysdate as end_time, d.questions_score, a.exam_score,c.exam_number,a.answered_number,c.exam_number - a.answered_number as not_answered, 0 as status from + select a.exam_code, a.user_code, b.start_time, now() as end_time, d.questions_score, a.exam_score,c.exam_number,a.answered_number,c.exam_number - a.answered_number as not_answered, 0 as status from ( select exam_code, user_code, sum(exam_score) as exam_score,count(questions_code) as answered_number from exam_finish_answer where exam_code = #{examCode} and user_code = #{userCode} group by exam_code,user_code diff --git a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamBankPictureMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamBankPictureMapper.xml index 6d10e90..021dcbb 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamBankPictureMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamBankPictureMapper.xml @@ -46,14 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status, - (select nvl(max(photo_id),0) + 1 from exam_bank_picture), + (select ifnull(max(photo_id),0) + 1 from exam_bank_picture), #{photoCode}, #{photoPath}, #{photoUrl}, #{fileName}, #{originalName}, #{createBy}, - sysdate, + now(), 0, diff --git a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsAnswerMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsAnswerMapper.xml index 967de49..d020bd8 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsAnswerMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsAnswerMapper.xml @@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{isRight}, #{orderId}, - (select nvl(max(order_id),0) + 1 from exam_questions_answer where questions_code = #{questionsCode}), + (select ifnull(max(order_id),0) + 1 from exam_questions_answer where questions_code = #{questionsCode}), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsBankMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsBankMapper.xml index 4614cf3..3cf1033 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsBankMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsBankMapper.xml @@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select a.bank_id, a.bank_code, a.bank_name, a.bank_describe, a.bank_version, a.exam_type, b.type_name,a.online_date, a.picture_url, nvl(c.judge_number,0) as judge_number,nvl(d.radio_number,0) as radio_number,nvl(e.choice_number,0) as choice_number,a.radio_score, a.choice_score, a.judge_score, a.status, a.create_by, a.create_dept, a.create_time from exam_questions_bank a + select a.bank_id, a.bank_code, a.bank_name, a.bank_describe, a.bank_version, a.exam_type, b.type_name,a.online_date, a.picture_url, ifnull(c.judge_number,0) as judge_number,ifnull(d.radio_number,0) as radio_number,ifnull(e.choice_number,0) as choice_number,a.radio_score, a.choice_score, a.judge_score, a.status, a.create_by, a.create_dept, a.create_time from exam_questions_bank a left join exam_type b on b.type_id = a.exam_type left join ( @@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, - (select nvl(max(bank_id),0) + 1 from exam_questions_bank), + (select ifnull(max(bank_id),0) + 1 from exam_questions_bank), #{bankCode}, #{bankName}, #{bankDescribe}, @@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 0, #{createBy}, #{createDept}, - sysdate, + now(), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsListMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsListMapper.xml index c1cf62d..97894c1 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsListMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamQuestionsListMapper.xml @@ -23,12 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select rownum, bank_code, bank_name, questions_id, questions_code, questions_title, questions_type, questions_score, rate_number, right_answer, answer_analyse, status, create_by, create_dept, create_time from + select @rownum := @rownum + 1 as rownum, bank_code, bank_name, questions_id, questions_code, questions_title, questions_type, questions_score, rate_number, right_answer, answer_analyse, status, create_by, create_dept, create_time from ( - select a.bank_code, b.bank_name, a.questions_id, a.questions_code, substr(a.questions_title,1,50) as questions_title, a.questions_type, a.questions_score, a.rate_number, a.right_answer, a.answer_analyse, a.status, a.create_by, a.create_dept, a.create_time from exam_questions_property a + select a.bank_code, b.bank_name, a.questions_id, a.questions_code, substring(a.questions_title,1,50) as questions_title, a.questions_type, a.questions_score, a.rate_number, a.right_answer, a.answer_analyse, a.status, a.create_by, a.create_dept, a.create_time from exam_questions_property a left join exam_questions_bank b on b.bank_code = a.bank_code - order by a.questions_type, a.bank_code, a.questions_id - ) + order by a.questions_type, a.bank_code, a.questions_id + ) t, (select @rownum := 0) r @@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{bankCode}, - (select nvl(max(questions_id),0) + 1 from exam_questions_property), + (select ifnull(max(questions_id),0) + 1 from exam_questions_property), #{questionsCode}, #{questionsTitle}, #{questionsType}, @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 0, #{createBy}, #{createDept}, - sysdate, + now(), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamTypeMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamTypeMapper.xml index 2d500fd..40a275f 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamTypeMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/questions/ExamTypeMapper.xml @@ -44,14 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, - (select nvl(max(type_id),0) + 1 from exam_type), + (select ifnull(max(type_id),0) + 1 from exam_type), #{parentId}, #{typeCode}, #{typeName}, #{orderId}, 0, #{createBy}, - sysdate, + now(), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupMapper.xml index fdcc781..bb18144 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupMapper.xml @@ -59,13 +59,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, - (select nvl(max(group_id),0) + 1 from sys_group), + (select ifnull(max(group_id),0) + 1 from sys_group), #{groupCode}, #{groupName}, #{groupDescribe}, 0, #{createBy}, - sysdate, + now(), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupPersonMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupPersonMapper.xml index 123b7b8..01b32e8 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupPersonMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/system/SysGroupPersonMapper.xml @@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{groupCode}, #{personCode}, - (select nvl(max(order_id),0) + 1 from sys_group_person where group_code = #{groupCode}), + (select ifnull(max(order_id),0) + 1 from sys_group_person where group_code = #{groupCode}), diff --git a/exam-online-api/hig-application/src/main/resources/mapper/system/TempUserChoiceMapper.xml b/exam-online-api/hig-application/src/main/resources/mapper/system/TempUserChoiceMapper.xml index f3208c9..3b899ee 100644 --- a/exam-online-api/hig-application/src/main/resources/mapper/system/TempUserChoiceMapper.xml +++ b/exam-online-api/hig-application/src/main/resources/mapper/system/TempUserChoiceMapper.xml @@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{choiceCode}, #{userCode}, - (select nvl(max(order_id),0) + 1 from temp_user_choice where choice_code = #{choiceCode}), + (select ifnull(max(order_id),0) + 1 from temp_user_choice where choice_code = #{choiceCode}), diff --git a/exam-online-api/ruoyi-admin/pom.xml b/exam-online-api/ruoyi-admin/pom.xml index 9ad362c..73c4912 100644 --- a/exam-online-api/ruoyi-admin/pom.xml +++ b/exam-online-api/ruoyi-admin/pom.xml @@ -8,7 +8,7 @@ 3.6.0 4.0.0 - war + jar ruoyi-admin @@ -98,11 +98,11 @@ 3.1.0 false - exam-online-api + examapi - exam-online-api + examapi \ No newline at end of file diff --git a/exam-online-api/ruoyi-admin/src/main/resources/application-druid.yml b/exam-online-api/ruoyi-admin/src/main/resources/application-druid.yml index 39637f9..b5c70b3 100644 --- a/exam-online-api/ruoyi-admin/src/main/resources/application-druid.yml +++ b/exam-online-api/ruoyi-admin/src/main/resources/application-druid.yml @@ -7,9 +7,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://192.168.126.19:3306/yanzhu_exam?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 + url: jdbc:mysql://62.234.3.186:3306/yanzhu_exam?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8 username: root - password: hadoopspring123 + password: Sxyanzhu@cf123 #url: jdbc:oracle:thin:@127.0.0.1:1521/xchwdb #username: exam_user @@ -37,7 +37,7 @@ spring: # 配置一个连接在池中最大生存的时间,单位是毫秒 maxEvictableIdleTimeMillis: 900000 # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL + validationQuery: SELECT 1 testWhileIdle: true testOnBorrow: false testOnReturn: false diff --git a/exam-online-api/ruoyi-admin/src/main/resources/application.yml b/exam-online-api/ruoyi-admin/src/main/resources/application.yml index 6315061..62a9ad4 100644 --- a/exam-online-api/ruoyi-admin/src/main/resources/application.yml +++ b/exam-online-api/ruoyi-admin/src/main/resources/application.yml @@ -22,7 +22,7 @@ server: port: 8040 servlet: # 应用的访问路径 - context-path: /exam-online-api + context-path: /examapi tomcat: # tomcat的URI编码 uri-encoding: UTF-8 @@ -124,12 +124,10 @@ mybatis: configLocation: classpath:mybatis/mybatis-config.xml # PageHelper分页插件 -pagehelper: - # helperDialect: mysql - helperDialect: oracle - reasonable: true +pagehelper: + helperDialect: mysql supportMethodsArguments: true - params: count=countSql + params: count=countSql # Swagger配置 swagger: diff --git a/exam-online-api/ruoyi-admin/src/main/resources/config.json b/exam-online-api/ruoyi-admin/src/main/resources/config.json index 0bf0721..92aeb5b 100644 --- a/exam-online-api/ruoyi-admin/src/main/resources/config.json +++ b/exam-online-api/ruoyi-admin/src/main/resources/config.json @@ -8,7 +8,7 @@ "imageCompressEnable": true, "imageCompressBorder": 1600, "imageInsertAlign": "none", - "imageUrlPrefix": "http://127.0.0.1:8080/exam-online-api", + "imageUrlPrefix": "http://127.0.0.1:8080/examapi", "imagePathFormat": "/photo/ueditor/{yyyy}{mm}{dd}/{time}{rand:6}", @@ -35,7 +35,7 @@ "videoActionName": "uploadvideo", "videoFieldName": "upfile", "videoPathFormat": "/photo/ueditor/{yyyy}{mm}{dd}/{time}{rand:6}", - "videoUrlPrefix": "http://127.0.0.1:8080/exam-online-api", + "videoUrlPrefix": "http://127.0.0.1:8080/examapi", "videoMaxSize": 102400000, "videoAllowFiles": [ ".mp4", ".ogg", ".webm"], diff --git a/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 024f71f..562712b 100644 --- a/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select nvl(max(column_id),0) + 1 from gen_table_column + select ifnull(max(column_id),0) + 1 from gen_table_column insert into gen_table_column ( column_id, @@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(column_id),0) + 1 from gen_table_column), + (select ifnull(max(column_id),0) + 1 from gen_table_column), #{tableId}, #{columnName}, #{columnComment}, @@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{dictType}, #{sort}, #{createBy}, - sysdate + now() ) @@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dict_type = #{dictType,jdbcType=VARCHAR}, sort = #{sort}, update_by = #{updateBy,jdbcType=VARCHAR}, - update_time = sysdate + update_time = now() where column_id = #{columnId} diff --git a/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml index 4c9ec58..0b9062b 100644 --- a/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/exam-online-api/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -61,10 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND lower(table_name) like lower('%' || #{tableName} || '%') + AND lower(table_name) like lower(concat('%', #{tableName}, '%')) - AND lower(table_comment) like lower('%' || #{tableComment} || '%') + AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) @@ -78,11 +78,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND dt.table_name NOT LIKE 'QRTZ_%' AND dt.table_name NOT LIKE 'GEN_%' AND lower(dt.table_name) NOT IN (select table_name from gen_table) - AND lower(dt.table_name) like lower('%' || #{tableName} || '%') - - - AND lower(dtc.comments) like lower( '%' || #{tableComment} || '%') - + AND lower(dt.table_name) like lower(concat('%', #{tableName}, '%')) + + + AND lower(dtc.comments) like lower(concat('%', #{tableComment}, '%')) + order by create_time desc @@ -136,12 +136,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select nvl(max(table_id),0) + 1 from gen_table + select ifnull(max(table_id),0) + 1 from gen_table insert into gen_table ( table_id, @@ -160,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(table_id),0) + 1 from gen_table), + (select ifnull(max(table_id),0) + 1 from gen_table), #{tableName}, #{tableComment}, #{className}, @@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{genPath}, #{remark}, #{createBy}, - sysdate + now() ) @@ -201,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" options = #{options}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate + update_time = now() where table_id = #{tableId} @@ -213,4 +213,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - \ No newline at end of file + \ No newline at end of file diff --git a/exam-online-api/ruoyi-generator/src/main/resources/vm/sql/sql.vm b/exam-online-api/ruoyi-generator/src/main/resources/vm/sql/sql.vm index d37636f..c7af436 100644 --- a/exam-online-api/ruoyi-generator/src/main/resources/vm/sql/sql.vm +++ b/exam-online-api/ruoyi-generator/src/main/resources/vm/sql/sql.vm @@ -1,22 +1,18 @@ -- 菜单 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate, '', null, '${functionName}菜单'); +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', now(), '', null, '${functionName}菜单'); -- 按钮父菜单ID SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', sysdate, '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', sysdate, '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate, '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate, '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate, '', null, ''); \ No newline at end of file +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', now(), '', null, ''); +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', now(), '', null, ''); +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '', null, ''); +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '', null, ''); +insert into sys_menu (menu_id, menu_name, parent_id, order_num, menu_name_key, path, `component`, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', now(), '', null, ''); \ No newline at end of file diff --git a/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml index 12d615f..1a7e8d4 100644 --- a/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml +++ b/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml @@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND job_name like '%' || #{jobName} || '%' + AND job_name like concat('%', #{jobName}, '%') AND job_group = #{jobGroup} @@ -33,13 +33,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND status = #{status} - AND invoke_target like '%' || #{invokeTarget} || '%' + AND invoke_target like concat('%', #{invokeTarget}, '%') - AND to_char(create_time,'yyyy-mm-dd hh24:mi:ss') >= to_char(#{params.beginTime},'yyyy-mm-dd hh24:mi:ss') + AND date_format(create_time,'%Y-%m-%d %H:%i:%s') >= #{params.beginTime} - AND to_char(create_time,'yyyy-mm-dd hh24:mi:ss') <= to_char(#{params.endTime},'yyyy-mm-dd hh24:mi:ss') + AND date_format(create_time,'%Y-%m-%d %H:%i:%s') <= #{params.endTime} @@ -86,8 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{jobMessage}, #{status}, #{exceptionInfo}, - sysdate + now() ) - \ No newline at end of file + \ No newline at end of file diff --git a/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml index d53b3cb..a4dbe21 100644 --- a/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml +++ b/exam-online-api/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml @@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where job_id = #{jobId} @@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate + now() ) diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml index 22bd12b..6f5c259 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml @@ -42,19 +42,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND config_name like '%' || #{configName} || '%' + AND config_name like concat('%', #{configName}, '%') AND config_type = #{configType} - AND config_key like '%' || #{configKey} || '%' + AND config_key like concat('%', #{configKey}, '%') - AND to_char(create_time,'yyyy-MM-dd') >= #{params.beginTime} + AND date_format(create_time,'%Y-%m-%d') >= #{params.beginTime} - AND to_char(create_time,'yyyy-MM-dd') <= #{params.endTime} + AND date_format(create_time,'%Y-%m-%d') <= #{params.endTime} @@ -75,14 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, create_time )values( - (select nvl(max(config_id),0) + 1 from sys_config), + (select ifnull(max(config_id),0) + 1 from sys_config), #{configName}, #{configKey}, #{configValue}, #{configType}, #{createBy}, #{remark}, - sysdate + now() ) @@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" config_type = #{configType}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate + update_time = now() where config_id = #{configId} diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 6a8fd4e..5e4c3ab 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(dept_id),0) + 1 from sys_dept), + (select ifnull(max(dept_id),0) + 1 from sys_dept), #{parentId}, #{deptCode}, #{deptName}, @@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, '0', #{createBy}, - sysdate + now() ) @@ -128,7 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, status = #{status}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where dept_id = #{deptId} diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml index dd69cc4..3866585 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where dict_code = #{dictCode} @@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(config_id),0) + 1 from sys_config), + (select ifnull(max(config_id),0) + 1 from sys_config), #{dictSort}, #{dictLabel}, #{dictValue}, @@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - sysdate + now() ) diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml index 54626a1..517eaeb 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -24,19 +24,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - AND dict_name like '%' || #{dictName} || '%' + AND dict_name like concat('%', #{dictName}, '%') AND status = #{status} - AND dict_type like '%' || #{dictType} || '%' + AND dict_type like concat('%', #{dictType}, '%') - AND to_char(create_time,'yyyy-MM-dd') >= #{params.beginTime} + AND date_format(create_time,'%Y-%m-%d') >= #{params.beginTime} - AND to_char(create_time,'yyyy-MM-dd') <= #{params.endTime} + AND date_format(create_time,'%Y-%m-%d') <= #{params.endTime} @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where dict_id = #{dictId} @@ -94,14 +94,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(dict_id),0) + 1 from sys_dict_type), + (select ifnull(max(dict_id),0) + 1 from sys_dict_type), #{dictName}, #{dictType}, #{status}, #{remark}, #{createBy}, - sysdate + now() ) - \ No newline at end of file + \ No newline at end of file diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml index f7dbe1c..471f7dc 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml @@ -18,26 +18,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into sys_logininfor (info_id,user_name, status, ipaddr, login_location, browser, os, msg, login_time) - values ((select nvl(max(info_id),0) + 1 from sys_logininfor),#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate) + values ((select ifnull(max(info_id),0) + 1 from sys_logininfor),#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, now()) - AND title like '%' || #{title} || '%' + AND title like concat('%', #{title}, '%') AND business_type = #{businessType} @@ -52,13 +52,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND status = #{status} - AND oper_name like '%' || #{operName} || '%' + AND oper_name like concat('%', #{operName}, '%') - AND to_char(oper_time,'yyyy-MM-dd') >= #{params.beginTime} + AND date_format(oper_time,'%Y-%m-%d') >= #{params.beginTime} - AND to_char(oper_time,'yyyy-MM-dd') <= #{params.endTime} + AND date_format(oper_time,'%Y-%m-%d') <= #{params.endTime} order by oper_id desc @@ -80,4 +80,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" truncate table sys_oper_log - \ No newline at end of file + \ No newline at end of file diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index c7cacf1..61704ec 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where post_id = #{postId} @@ -97,14 +97,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(post_id),0) + 1 from sys_post), + (select ifnull(max(post_id),0) + 1 from sys_post), #{postCode}, #{postName}, #{postSort}, #{status}, #{remark}, #{createBy}, - sysdate + now() ) diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index 5833bef..95f3ddd 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -34,19 +34,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where r.del_flag = '0' - AND r.role_name like like '%' || #{roleName} || '%' + AND r.role_name like concat('%', #{roleName}, '%') AND r.status = #{status} - AND r.role_key like like '%' || #{roleKey} || '%' + AND r.role_key like concat('%', #{roleKey}, '%') - AND to_char(r.create_time,'yyyy-MM-dd') >= #{params.beginTime} + AND date_format(r.create_time,'%Y-%m-%d') >= #{params.beginTime} - AND to_char(r.create_time,'yyyy-MM-dd') <= #{params.endTime} + AND date_format(r.create_time,'%Y-%m-%d') <= #{params.endTime} ${params.dataScope} @@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by, create_time )values( - (select nvl(max(role_id),0) + 1 from sys_role), + (select ifnull(max(role_id),0) + 1 from sys_role), #{roleName}, #{roleKey}, #{roleSort}, @@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" '0', #{remark}, #{createBy}, - sysdate + now() ) @@ -136,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, - update_time = sysdate + update_time = now() where role_id = #{roleId} @@ -152,4 +152,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - \ No newline at end of file + \ No newline at end of file diff --git a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 38ecc4e..4e5b6dc 100644 --- a/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/exam-online-api/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -61,19 +61,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select u.user_id, u.user_code,u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u left join sys_dept d on u.dept_id = d.dept_id - AND u.nick_name like '%' || #{nickName} || '%' + AND u.nick_name like concat('%', #{nickName}, '%') AND u.status = #{status} - AND u.phonenumber like '%' || #{phonenumber} || '%' + AND u.phonenumber like concat('%', #{phonenumber}, '%') - AND to_char(u.create_time,'yyyy-MM-dd') >= #{params.beginTime} + AND date_format(u.create_time,'%Y-%m-%d') >= #{params.beginTime} - AND to_char(u.create_time,'yyyy-MM-dd') <= #{params.endTime} + AND date_format(u.create_time,'%Y-%m-%d') <= #{params.endTime} AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE dept_id = #{deptId} )) @@ -93,10 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_role r on r.role_id = ur.role_id where u.del_flag = '0' and r.role_id = #{roleId} - AND u.nick_name like '%' || #{nickName} || '%' + AND u.nick_name like concat('%', #{nickName}, '%') - AND u.phonenumber like '%' || #{phonenumber} || '%' + AND u.phonenumber like concat('%', #{phonenumber}, '%') ${params.dataScope} @@ -111,10 +111,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL) and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId}) - AND u.nick_name like '%' || #{nickName} || '%' + AND u.nick_name like concat('%', #{nickName}, '%') - AND u.phonenumber like '%' || #{phonenumber} || '%' + AND u.phonenumber like concat('%', #{phonenumber}, '%') AND u.dept_id = #{deptId} @@ -173,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark, create_time )values( - (select nvl(max(user_id),0) + 1 from sys_user), + (select ifnull(max(user_id),0) + 1 from sys_user), #{deptId}, #{userName}, #{userCode}, @@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" '0', #{createBy}, #{remark}, - sysdate + now() ) @@ -207,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" login_date = #{loginDate}, update_by = #{updateBy}, remark = #{remark}, - update_time = sysdate + update_time = now() where user_id = #{userId} @@ -235,4 +235,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - \ No newline at end of file + \ No newline at end of file diff --git a/exam_online_ui/.env.development b/exam_online_ui/.env.development index 9c0daea..c59835e 100644 --- a/exam_online_ui/.env.development +++ b/exam_online_ui/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 在线考试系统 ENV = 'development' # 管理系统/开发环境 -VUE_APP_BASE_API = '/exam-online-api' +VUE_APP_BASE_API = '/examapi' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/exam_online_ui/.env.production b/exam_online_ui/.env.production index 205a50f..36ba0e5 100644 --- a/exam_online_ui/.env.production +++ b/exam_online_ui/.env.production @@ -5,4 +5,4 @@ VUE_APP_TITLE = 在线考试系统 ENV = 'production' # 管理系统/生产环境 -VUE_APP_BASE_API = '/exam-online-api' +VUE_APP_BASE_API = '/examapi' diff --git a/exam_online_ui/.env.staging b/exam_online_ui/.env.staging index 2c98b43..c71b74d 100644 --- a/exam_online_ui/.env.staging +++ b/exam_online_ui/.env.staging @@ -7,4 +7,4 @@ NODE_ENV = production ENV = 'staging' # 管理系统/测试环境 -VUE_APP_BASE_API = '/exam-online-api' +VUE_APP_BASE_API = '/examapi' diff --git a/exam_online_ui/package.json b/exam_online_ui/package.json index 150fa81..b1da563 100644 --- a/exam_online_ui/package.json +++ b/exam_online_ui/package.json @@ -37,53 +37,54 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", - "axios": "0.21.0", - "clipboard": "2.0.6", - "core-js": "3.8.1", + "axios": "^1.7.9", + "clipboard": "^2.0.11", + "core-js": "^3.39.0", "echarts": "4.9.0", "element-ui": "^2.15.13", - "file-saver": "2.0.4", - "fuse.js": "6.4.3", - "highlight.js": "9.18.5", - "js-beautify": "1.13.0", - "js-cookie": "2.2.1", - "js-pinyin": "^0.1.9", - "jsencrypt": "3.0.0-rc.1", - "nprogress": "0.2.0", - "quill": "1.3.7", - "screenfull": "5.0.2", - "sortablejs": "1.10.2", + "file-saver": "^2.0.5", + "fuse.js": "^7.0.0", + "highlight.js": "^9.18.5", + "js-beautify": "^1.15.1", + "js-cookie": "^3.0.5", + "js-pinyin": "^0.2.7", + "jsencrypt": "^3.3.2", + "nprogress": "^0.2.0", + "quill": "^1.3.7", + "screenfull": "^5.2.0", + "sortablejs": "^1.15.6", "spark-md5": "^3.0.2", - "vue": "2.6.12", - "vue-count-to": "1.0.13", - "vue-cropper": "0.5.5", + "vue": "^2.7.16", + "vue-count-to": "^1.0.13", + "vue-cropper": "^0.6.5", "vue-meta": "^2.4.0", - "vue-router": "3.4.9", + "vue-router": "^3.6.5", "vue-simple-uploader": "^0.7.6", - "vuedraggable": "2.24.3", - "vuex": "3.6.0" + "vuedraggable": "^2.24.3", + "vuex": "^3.6.2" }, "devDependencies": { - "@vue/cli-plugin-babel": "4.4.6", - "@vue/cli-plugin-eslint": "4.4.6", - "@vue/cli-service": "4.4.6", - "babel-eslint": "10.1.0", - "chalk": "4.1.0", - "connect": "3.6.6", + "@vue/cli-plugin-babel": "^4.5.19", + "@vue/cli-plugin-eslint": "^4.5.19", + "@vue/cli-service": "^4.5.19", + "babel-eslint": "^10.1.0", + "chalk": "^4.1.2", + "connect": "^3.7.0", "vue-ueditor-wrap": "^2.5.6", - "eslint": "7.15.0", - "eslint-plugin-vue": "7.2.0", - "lint-staged": "10.5.3", - "runjs": "4.4.2", - "sass": "1.32.0", - "sass-loader": "10.1.0", - "script-ext-html-webpack-plugin": "2.1.5", - "svg-sprite-loader": "5.1.1", - "vue-template-compiler": "2.6.12" + "eslint": "^7.32.0", + "eslint-plugin-vue": "^7.20.0", + "lint-staged": "^10.5.4", + "runjs": "^4.4.2", + "sass": "^1.90.0", + "sass-loader": "^10.5.2", + "script-ext-html-webpack-plugin": "^2.1.5", + "svg-sprite-loader": "^5.2.1", + "vue-template-compiler": "^2.7.16" }, "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" + "node": ">=14.0.0", + "npm": ">= 6.0.0", + "yarn": ">= 1.22.0" }, "browserslist": [ "> 1%", diff --git a/exam_online_ui/package.json.backup b/exam_online_ui/package.json.backup new file mode 100644 index 0000000..a2e0861 --- /dev/null +++ b/exam_online_ui/package.json.backup @@ -0,0 +1,92 @@ +{ + "name": "ruoyi", + "version": "3.6.0", + "description": "若依管理系统", + "author": "若依", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.21.0", + "clipboard": "2.0.6", + "core-js": "3.8.1", + "echarts": "4.9.0", + "element-ui": "^2.15.13", + "file-saver": "2.0.4", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "2.2.1", + "js-pinyin": "^0.1.9", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "1.3.7", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "spark-md5": "^3.0.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-meta": "^2.4.0", + "vue-router": "3.4.9", + "vue-simple-uploader": "^0.7.6", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-plugin-eslint": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-eslint": "10.1.0", + "chalk": "4.1.0", + "connect": "3.6.6", + "vue-ueditor-wrap": "^2.5.6", + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "runjs": "4.4.2", + "sass": "1.32.0", + "sass-loader": "10.1.0", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} \ No newline at end of file diff --git a/exam_online_ui/package2.json b/exam_online_ui/package2.json new file mode 100644 index 0000000..a2e0861 --- /dev/null +++ b/exam_online_ui/package2.json @@ -0,0 +1,92 @@ +{ + "name": "ruoyi", + "version": "3.6.0", + "description": "若依管理系统", + "author": "若依", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.21.0", + "clipboard": "2.0.6", + "core-js": "3.8.1", + "echarts": "4.9.0", + "element-ui": "^2.15.13", + "file-saver": "2.0.4", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "2.2.1", + "js-pinyin": "^0.1.9", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "1.3.7", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "spark-md5": "^3.0.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-meta": "^2.4.0", + "vue-router": "3.4.9", + "vue-simple-uploader": "^0.7.6", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-plugin-eslint": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-eslint": "10.1.0", + "chalk": "4.1.0", + "connect": "3.6.6", + "vue-ueditor-wrap": "^2.5.6", + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "runjs": "4.4.2", + "sass": "1.32.0", + "sass-loader": "10.1.0", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} \ No newline at end of file diff --git a/exam_online_ui/public/UEditor/ueditor.config.js b/exam_online_ui/public/UEditor/ueditor.config.js index da59e30..dca4119 100644 --- a/exam_online_ui/public/UEditor/ueditor.config.js +++ b/exam_online_ui/public/UEditor/ueditor.config.js @@ -19,7 +19,7 @@ * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。 * window.UEDITOR_HOME_URL = "/xxxx/xxxx/"; */ - window.UEDITOR_HOME_URL = "/exam_online_ui/UEditor/"; + window.UEDITOR_HOME_URL = "/examui/UEditor/"; var URL = window.UEDITOR_HOME_URL || getUEBasePath(); /** @@ -32,7 +32,7 @@ // 服务器统一请求接口路径 , serverUrl: URL + "jsp/controller.jsp" - // , serverUrl: 'http://10.200.121.66:8080/exam_online_ui/ueditor/config' + // , serverUrl: 'http://10.200.121.66:8080/examui/ueditor/config' //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 , toolbars: [[ 'fullscreen', 'source', '|', 'undo', 'redo', '|', diff --git a/exam_online_ui/src/config/sysinfo.js b/exam_online_ui/src/config/sysinfo.js index c522e23..bd22248 100644 --- a/exam_online_ui/src/config/sysinfo.js +++ b/exam_online_ui/src/config/sysinfo.js @@ -1,10 +1,10 @@ // 本地运行用这个 -export var baseApiUrl = 'http://localhost:8080/exam-online-api' -export var uiUrl = 'http://localhost:8081/exam_online_ui' +export var baseApiUrl = 'http://localhost:8080/examapi' +export var uiUrl = 'http://localhost:8081/examui' // 测试环境使用内网环境 -/* export var baseApiUrl = 'http://127.0.0.1:8080/exam-online-api' -export var uiUrl = 'http://127.0.0.1:8080/exam_online_ui' */ +/* export var baseApiUrl = 'http://127.0.0.1:8080/examapi' +export var uiUrl = 'http://127.0.0.1:8080/examui' */ diff --git a/exam_online_ui/src/layout/components/Navbar.vue b/exam_online_ui/src/layout/components/Navbar.vue index 019af80..dd4db0e 100644 --- a/exam_online_ui/src/layout/components/Navbar.vue +++ b/exam_online_ui/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ export default { type: 'warning' }).then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = '/exam_online_ui/'; + location.href = '/examui/'; }) }).catch(() => {}); } diff --git a/exam_online_ui/src/router/index.js b/exam_online_ui/src/router/index.js index 241ae4e..2751a1e 100644 --- a/exam_online_ui/src/router/index.js +++ b/exam_online_ui/src/router/index.js @@ -150,7 +150,7 @@ export const constantRoutes = [ export default new Router({ // mode: 'history', // 去掉url中的# - base: '/exam_online_ui/', + base: '/examui/', scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) diff --git a/exam_online_ui/src/utils/request.js b/exam_online_ui/src/utils/request.js index 97f4ca1..858e552 100644 --- a/exam_online_ui/src/utils/request.js +++ b/exam_online_ui/src/utils/request.js @@ -8,8 +8,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 - baseURL: 'http://localhost:8080/exam-online-api', // 本地后端加路径 - // baseURL: 'http://127.0.0.1:8080/exam-online-api', // 发服务器使用内网 + baseURL: '/examapi', // 本地后端加路径 + // baseURL: 'http://127.0.0.1:8080/examapi', // 发服务器使用内网 timeout: 180000 }) @@ -62,7 +62,7 @@ service.interceptors.response.use(res => { } ).then(() => { store.dispatch('LogOut').then(() => { - location.href = '/exam_online_ui/'; + location.href = '/examui/'; }) }).catch(() => {}); } else if (code === 500) { diff --git a/exam_online_ui/src/views/questions/examquestions/examQuestions.vue b/exam_online_ui/src/views/questions/examquestions/examQuestions.vue index acfd095..070e009 100644 --- a/exam_online_ui/src/views/questions/examquestions/examQuestions.vue +++ b/exam_online_ui/src/views/questions/examquestions/examQuestions.vue @@ -190,7 +190,7 @@ export default { // 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!) serverUrl: baseApiUrl + '/ueditor/config', // UEditor 资源文件的存放路径,如果你使用的是 vue-cli 生成的项目,通常不需要设置该选项,vue-ueditor-wrap 会自动处理常见的情况,如果需要特殊配置,参考下方的常见问题2 - UEDITOR_HOME_URL: '/exam_online_ui/UEditor/' + UEDITOR_HOME_URL: '/examui/UEditor/' }, Ueditor: null, isNew: false, diff --git a/exam_online_ui/vue.config.js b/exam_online_ui/vue.config.js index 5ed0ab1..dbf9808 100644 --- a/exam_online_ui/vue.config.js +++ b/exam_online_ui/vue.config.js @@ -16,7 +16,7 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口 module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 - publicPath: '/exam_online_ui/', + publicPath: '/examui/', // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) @@ -25,6 +25,21 @@ module.exports = { lintOnSave: process.env.NODE_ENV === 'development', // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, + devServer: { + host: '0.0.0.0', + port: port, + open: true, + proxy: { + '/examapi': { + target: `http://127.0.0.1:8040`, + changeOrigin: true, + pathRewrite: { + '^/examapi': '/examapi' + } + } + }, + disableHostCheck: true + }, configureWebpack: { name: name, resolve: {