From 67a6a13b1d1ab8d43099cf151417fb10fd9f3292 Mon Sep 17 00:00:00 2001 From: Haixing Hu Date: Sun, 23 Feb 2025 15:30:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=AC=AC4=E9=A2=98=E7=9A=84=E9=80=89=E6=8B=A9=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=9D=A5=E5=86=B3=E5=AE=9A=E8=B7=B3=E8=BD=AC=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=90=8E=E7=AB=AF=E5=B7=A5=E4=BD=9C=E9=A2=86?= =?UTF-8?q?=E5=9F=9F=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursorrules | 2 + .../ltd/qubit/survey/dao/QuestionDao.java | 9 - .../java/ltd/qubit/survey/dao/UserDao.java | 8 - .../survey/mapper/SurveyResponseMapper.xml | 1 - .../java/ltd/qubit/survey/model/Question.java | 8 +- .../qubit/survey/service/QuestionService.java | 9 - .../ltd/qubit/survey/service/UserService.java | 9 - .../service/impl/QuestionServiceImpl.java | 46 ++-- .../impl/SurveyResponseServiceImpl.java | 2 +- .../survey/service/impl/UserServiceImpl.java | 6 - .../mybatis/mapper/QuestionMapper.xml | 24 +- .../resources/mybatis/mapper/UserMapper.xml | 8 - .../ltd/qubit/survey/dao/QuestionDao.class | Bin 860 -> 662 bytes .../ltd/qubit/survey/dao/UserDao.class | Bin 649 -> 455 bytes .../ltd/qubit/survey/model/Question.class | Bin 5657 -> 6234 bytes .../classes/ltd/qubit/survey/model/User.class | Bin 4402 -> 3828 bytes .../survey/service/QuestionService.class | Bin 1420 -> 1222 bytes .../qubit/survey/service/UserService.class | Bin 974 -> 780 bytes .../service/impl/QuestionServiceImpl$1.class | Bin 916 -> 0 bytes .../service/impl/QuestionServiceImpl.class | Bin 6887 -> 6066 bytes .../impl/SurveyResponseServiceImpl.class | Bin 6893 -> 6885 bytes .../survey/service/impl/UserServiceImpl.class | Bin 3268 -> 2959 bytes .../classes/mybatis/mapper/OptionMapper.xml | 52 ++-- .../classes/mybatis/mapper/QuestionMapper.xml | 63 +++-- .../mybatis/mapper/SurveyResponseMapper.xml | 48 ++-- .../classes/mybatis/mapper/UserMapper.xml | 40 ++- .../compile/default-compile/createdFiles.lst | 1 - database/init_database.sql | 116 +++++---- frontend/src/api/survey.js | 21 +- frontend/src/stores/survey.js | 62 +++-- frontend/src/stores/user.js | 7 +- frontend/src/views/SurveyView.vue | 231 +++++++++++++----- 32 files changed, 426 insertions(+), 347 deletions(-) delete mode 100644 backend/src/main/java/ltd/qubit/survey/mapper/SurveyResponseMapper.xml delete mode 100644 backend/target/classes/ltd/qubit/survey/service/impl/QuestionServiceImpl$1.class diff --git a/.cursorrules b/.cursorrules index e27756b..e462219 100644 --- a/.cursorrules +++ b/.cursorrules @@ -20,6 +20,8 @@ - WAR包目录:`$DOCKER_DATA_DIR/tomcat/webapps` - 应用上下文路径:`/llm-survey-api` - 复制文件时,使用 `command cp` 命令 +- 查看日志始终只查看应用的业务日志 +- 部署完成后应该稍等几秒查看下业务日志看看发布有没有错误 ## 4. 数据库规则 - 数据库名称:`llm_survey` diff --git a/backend/src/main/java/ltd/qubit/survey/dao/QuestionDao.java b/backend/src/main/java/ltd/qubit/survey/dao/QuestionDao.java index b4071d2..bd5cea4 100644 --- a/backend/src/main/java/ltd/qubit/survey/dao/QuestionDao.java +++ b/backend/src/main/java/ltd/qubit/survey/dao/QuestionDao.java @@ -3,7 +3,6 @@ package ltd.qubit.survey.dao; import java.util.List; import java.util.Optional; import ltd.qubit.survey.model.Question; -import ltd.qubit.survey.model.WorkArea; /** * 问题DAO接口 @@ -17,14 +16,6 @@ public interface QuestionDao extends BaseDao { */ Optional findByQuestionNumber(Integer questionNumber); - /** - * 根据工作领域查询问题列表 - * - * @param workArea 工作领域 - * @return 问题列表 - */ - List findByWorkArea(WorkArea workArea); - /** * 查询通用问题列表(不针对特定工作领域) * diff --git a/backend/src/main/java/ltd/qubit/survey/dao/UserDao.java b/backend/src/main/java/ltd/qubit/survey/dao/UserDao.java index 99916f2..7e12669 100644 --- a/backend/src/main/java/ltd/qubit/survey/dao/UserDao.java +++ b/backend/src/main/java/ltd/qubit/survey/dao/UserDao.java @@ -16,12 +16,4 @@ public interface UserDao extends BaseDao { * @return 用户对象 */ Optional findByPhone(String phone); - - /** - * 根据工作领域查询用户列表 - * - * @param workArea 工作领域 - * @return 用户列表 - */ - List findByWorkArea(WorkArea workArea); } \ No newline at end of file diff --git a/backend/src/main/java/ltd/qubit/survey/mapper/SurveyResponseMapper.xml b/backend/src/main/java/ltd/qubit/survey/mapper/SurveyResponseMapper.xml deleted file mode 100644 index aecc2ca..0000000 --- a/backend/src/main/java/ltd/qubit/survey/mapper/SurveyResponseMapper.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/backend/src/main/java/ltd/qubit/survey/model/Question.java b/backend/src/main/java/ltd/qubit/survey/model/Question.java index 163c795..142ce7b 100644 --- a/backend/src/main/java/ltd/qubit/survey/model/Question.java +++ b/backend/src/main/java/ltd/qubit/survey/model/Question.java @@ -1,6 +1,7 @@ package ltd.qubit.survey.model; import java.time.Instant; +import java.util.Map; import lombok.Data; /** @@ -41,7 +42,12 @@ public class Question { /** * 跳转逻辑(JSON格式) */ - private String next; + private Map next; + + /** + * 是否是最后一题 + */ + private Boolean isLast; /** * 创建时间 diff --git a/backend/src/main/java/ltd/qubit/survey/service/QuestionService.java b/backend/src/main/java/ltd/qubit/survey/service/QuestionService.java index 9901aec..758534a 100644 --- a/backend/src/main/java/ltd/qubit/survey/service/QuestionService.java +++ b/backend/src/main/java/ltd/qubit/survey/service/QuestionService.java @@ -3,7 +3,6 @@ package ltd.qubit.survey.service; import java.util.List; import java.util.Optional; import ltd.qubit.survey.model.Question; -import ltd.qubit.survey.model.WorkArea; import org.springframework.transaction.annotation.Transactional; /** @@ -19,14 +18,6 @@ public interface QuestionService extends BaseService { */ Optional findByQuestionNumber(Integer questionNumber); - /** - * 根据工作领域查询问题列表 - * - * @param workArea 工作领域 - * @return 问题列表 - */ - List findByWorkArea(WorkArea workArea); - /** * 查询通用问题列表(不针对特定工作领域) * diff --git a/backend/src/main/java/ltd/qubit/survey/service/UserService.java b/backend/src/main/java/ltd/qubit/survey/service/UserService.java index af07437..81515cd 100644 --- a/backend/src/main/java/ltd/qubit/survey/service/UserService.java +++ b/backend/src/main/java/ltd/qubit/survey/service/UserService.java @@ -3,7 +3,6 @@ package ltd.qubit.survey.service; import java.util.List; import java.util.Optional; import ltd.qubit.survey.model.User; -import ltd.qubit.survey.model.WorkArea; import org.springframework.transaction.annotation.Transactional; /** @@ -19,14 +18,6 @@ public interface UserService extends BaseService { */ Optional findByPhone(String phone); - /** - * 根据工作领域查询用户列表 - * - * @param workArea 工作领域 - * @return 用户列表 - */ - List findByWorkArea(WorkArea workArea); - /** * 用户注册 * diff --git a/backend/src/main/java/ltd/qubit/survey/service/impl/QuestionServiceImpl.java b/backend/src/main/java/ltd/qubit/survey/service/impl/QuestionServiceImpl.java index b02522f..d157a6e 100644 --- a/backend/src/main/java/ltd/qubit/survey/service/impl/QuestionServiceImpl.java +++ b/backend/src/main/java/ltd/qubit/survey/service/impl/QuestionServiceImpl.java @@ -11,7 +11,6 @@ import lombok.RequiredArgsConstructor; import ltd.qubit.survey.dao.QuestionDao; import ltd.qubit.survey.model.Question; import ltd.qubit.survey.model.User; -import ltd.qubit.survey.model.WorkArea; import ltd.qubit.survey.service.QuestionService; import ltd.qubit.survey.service.UserService; import org.springframework.stereotype.Service; @@ -29,8 +28,8 @@ public class QuestionServiceImpl implements QuestionService { @Override public Question create(Question question) { // 如果没有指定问题序号,则自动生成 - if (question.getQuestionNumber() == null) { - question.setQuestionNumber(questionDao.getNextQuestionNumber()); + if (question.getNumber() == null) { + question.setNumber(questionDao.getNextQuestionNumber()); } question.setCreatedAt(Instant.now()); questionDao.insert(question); @@ -63,11 +62,6 @@ public class QuestionServiceImpl implements QuestionService { return questionDao.findByQuestionNumber(questionNumber); } - @Override - public List findByWorkArea(WorkArea workArea) { - return questionDao.findByWorkArea(workArea); - } - @Override public List findCommonQuestions() { return questionDao.findCommonQuestions(); @@ -75,6 +69,11 @@ public class QuestionServiceImpl implements QuestionService { @Override public Optional getNextQuestion(Long userId, Integer currentQuestionNumber, List selectedOptions) { + // 如果当前问题序号为0,返回第一个问题 + if (currentQuestionNumber == 0) { + return findByQuestionNumber(1); + } + // 获取当前问题 Optional currentQuestion = findByQuestionNumber(currentQuestionNumber); if (currentQuestion.isEmpty()) { @@ -82,21 +81,17 @@ public class QuestionServiceImpl implements QuestionService { } // 如果当前问题有跳转逻辑,则根据选项判断下一个问题 - String nextQuestionLogic = currentQuestion.get().getNextQuestionLogic(); - if (nextQuestionLogic != null && !nextQuestionLogic.isEmpty()) { - try { - // 解析跳转逻辑JSON - Map logic = objectMapper.readValue(nextQuestionLogic, - new TypeReference>() {}); - - // 根据选项确定下一个问题序号 - for (String option : selectedOptions) { - if (logic.containsKey(option)) { - return findByQuestionNumber(logic.get(option)); - } + Map next = currentQuestion.get().getNext(); + if (next != null && !next.isEmpty() && selectedOptions != null && !selectedOptions.isEmpty()) { + // 根据选项确定下一个问题序号 + for (String option : selectedOptions) { + if (next.containsKey(option)) { + return findByQuestionNumber(next.get(option)); } - } catch (Exception e) { - // JSON解析错误,继续使用默认的下一个问题 + } + // 如果有通配符跳转规则 + if (next.containsKey("*")) { + return findByQuestionNumber(next.get("*")); } } @@ -115,13 +110,10 @@ public class QuestionServiceImpl implements QuestionService { } // 添加通用问题 - questions.addAll(findCommonQuestions()); - - // 添加针对用户工作领域的问题 - questions.addAll(findByWorkArea(user.get().getWorkArea())); + questions.addAll(findAll()); // 按问题序号排序 - questions.sort((q1, q2) -> q1.getQuestionNumber().compareTo(q2.getQuestionNumber())); + questions.sort((q1, q2) -> q1.getNumber().compareTo(q2.getNumber())); return questions; } diff --git a/backend/src/main/java/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.java b/backend/src/main/java/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.java index d3e831b..3b6fb0c 100644 --- a/backend/src/main/java/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.java +++ b/backend/src/main/java/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.java @@ -89,7 +89,7 @@ public class SurveyResponseServiceImpl implements SurveyResponseService { .anyMatch(response -> response.getQuestionId().equals(question.getId())); if (!answered) { throw new IllegalArgumentException( - String.format("问题 %d 为必答题,请填写答案", question.getQuestionNumber())); + String.format("问题 %d 为必答题,请填写答案", question.getNumber())); } } } diff --git a/backend/src/main/java/ltd/qubit/survey/service/impl/UserServiceImpl.java b/backend/src/main/java/ltd/qubit/survey/service/impl/UserServiceImpl.java index 88ee60f..f149c3e 100644 --- a/backend/src/main/java/ltd/qubit/survey/service/impl/UserServiceImpl.java +++ b/backend/src/main/java/ltd/qubit/survey/service/impl/UserServiceImpl.java @@ -6,7 +6,6 @@ import java.util.Optional; import lombok.RequiredArgsConstructor; import ltd.qubit.survey.dao.UserDao; import ltd.qubit.survey.model.User; -import ltd.qubit.survey.model.WorkArea; import ltd.qubit.survey.service.UserService; import org.springframework.stereotype.Service; @@ -51,11 +50,6 @@ public class UserServiceImpl implements UserService { return userDao.findByPhone(phone); } - @Override - public List findByWorkArea(WorkArea workArea) { - return userDao.findByWorkArea(workArea); - } - @Override public User register(User user) { // 检查手机号是否已注册 diff --git a/backend/src/main/resources/mybatis/mapper/QuestionMapper.xml b/backend/src/main/resources/mybatis/mapper/QuestionMapper.xml index 79c07ed..93e87dd 100644 --- a/backend/src/main/resources/mybatis/mapper/QuestionMapper.xml +++ b/backend/src/main/resources/mybatis/mapper/QuestionMapper.xml @@ -7,22 +7,23 @@ - + - `id`, `number`, `content`, `type`, `work_area`, `is_required`, `next`, `created_at` + `id`, `number`, `content`, `type`, `is_required`, `next`, `is_last`, `created_at` - INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `next`) - VALUES (#{number}, #{content}, #{type}, #{workArea}, #{isRequired}, - #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}) + INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `next`, `is_last`) + VALUES (#{number}, #{content}, #{type}, #{isRequired}, + #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, + #{isLast}) @@ -31,9 +32,9 @@ SET `number` = #{number}, `content` = #{content}, `type` = #{type}, - `work_area` = #{workArea}, `is_required` = #{isRequired}, - `next` = #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler} + `next` = #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, + `is_last` = #{isLast} WHERE `id` = #{id} @@ -63,19 +64,10 @@ WHERE `number` = #{number} - - - diff --git a/backend/src/main/resources/mybatis/mapper/UserMapper.xml b/backend/src/main/resources/mybatis/mapper/UserMapper.xml index 431e6fd..43db318 100644 --- a/backend/src/main/resources/mybatis/mapper/UserMapper.xml +++ b/backend/src/main/resources/mybatis/mapper/UserMapper.xml @@ -55,12 +55,4 @@ FROM `user` WHERE `phone` = #{phone} - - - \ No newline at end of file diff --git a/backend/target/classes/ltd/qubit/survey/dao/QuestionDao.class b/backend/target/classes/ltd/qubit/survey/dao/QuestionDao.class index 9da36f77a099cd9ea473829c32092d39da2e2f6b..0d2eb01478e549a119378b8013c447168d7df52d 100644 GIT binary patch delta 66 zcmcb^HjS0*)W2Q(7#J9A8ALa7DKT!o&Zxr3$UONElaewc12<5DiGiPmkwJh#5X^>% K2r&qQc_IJ-UkVQZ delta 177 zcmbQndWVhc)W2Q(7#J9A86-DyDKQH3rDf)&I8}z{7iBvZr6w{m7;8-az$l>!6R_6w z$x19s)GsZ`%+dGBEH1HTWZ)==s}2LJ=7g)B9LZ?5S%*=Dk&$I`Ad`|E69XsEGFCAeV-N@PBmfAJBvb$Z diff --git a/backend/target/classes/ltd/qubit/survey/dao/UserDao.class b/backend/target/classes/ltd/qubit/survey/dao/UserDao.class index 60e72fc284375f7934102a49dfe69ccd0824132b..0f1583fc8361d9b2cd8cfa5be58758913348c37e 100644 GIT binary patch delta 48 zcmeBVJff$?3=9mm3<4Xu*cc~oXY6ETob1RXEyTdYzzvjOV&G-q1JnEfHk}B@ delta 175 zcmX@k+{wyy>ff$?3=9mm3?du3*cgTR(lYZ>oGQcfi?SVyQWF^&j5Q`ZGD>K|1gtfE zvJ%S@^-D`KbM$>Oi%YB-892(}s)N9)C2^{r?7%2DnTN5Lk!kWQMrmCZMh0F6J_aTR cPM{N585#J26gLnvF$e%LgeAxz1Qrnn08D2nN&o-= diff --git a/backend/target/classes/ltd/qubit/survey/model/Question.class b/backend/target/classes/ltd/qubit/survey/model/Question.class index c94dc66956d5a2fb634e55b874fdd158eb25c90b..c8a21b072a2e7152a32deaf16e84e53cc22bab4d 100644 GIT binary patch literal 6234 zcmb_g>vJ1d75`mX((1ADL$;GHO_PQwjUP!31(If!G)+vLIyg>hhXh(4+1OiKu`DIh zDs9T6ZOZ#u-l4o-4U|AzXjAAg41A!>@QDxk1Yh6};0wbH!we<-?!CLxN?AK*h8bIX z_MYGG+;i_e=iDRx;XkkZ8o*w>m_ZC(2I3|XNDB0xan3tqWv8+*cJ%Zacg_VM=NwGA41N0wUTdf zor(3hMIi27IO_^*ow|v4#|cw2yw1d}*dUO4xLRA0x7Qx+H;3hk9X z(&F#~68uIJci~L}i3Qi2q}%zS;Sf|ElMIfxnAj<8Cb>SRT$jwdP3(qEm&ly<4{xxI z9UPxT?=cx?44<5wC$vrNj9{ZA<6aZ{B}3YuR2v~j$4$Hy2f5cA9S88d_7PNm7=iAbA7|D-r`t zQIc{bg-c1B-$5hS=m|FeoibC{#otrK(BTG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2GL4@T(>}w>lRA| z2`a{*LaEpR8MnCpfkax-Iq3}@m#)t5;5mGcfgHns@I3QW24(ycFR*QZ-{Aj%N6Wxt zcn7PrO#1r+YP7PbidEmvseahqSM>$C>(KEGxIS`Plj zG<=m-0sp2lHfR;;4?L}7mVF0B3--qtw~*nVEk4EpZRY+bvvYQzqc{xtPfDyenUG{U zFr_MFl#fms7oszPL zXKuneejBG=knJ8^@vsxE3wk?fM$>6&%3sw>;=qVhEBglnlTiY{hZ zoi5k4RhQlEq7=zGm@bTG^$Ox858(IMM1$)y@fJc_8E)m9*kTw47|EA$jh2B^+}b8B z6HieZEm~PbnB^md@j5d}o0cs%R~&`&DH{w6wh-J<2=OVM_39bfFb1;&=wOWgrWlq@ zzc<&N`7tpe z1trD9r^09UT|C0#gf3hb@8KM<^HxlLgG_X{^}5pg_i=-zP4_?I^8@^xwLGnt@k_jd F(r5k@TfG1P diff --git a/backend/target/classes/ltd/qubit/survey/service/QuestionService.class b/backend/target/classes/ltd/qubit/survey/service/QuestionService.class index b8db983a77f2915f5bad93ec0135bde145a00de4..4d918e0dd6158763a126b7a7b84c8921420166be 100644 GIT binary patch delta 137 zcmeC-KE}y)>ff$?3=9mm3ff$?3=9mm3@RJBj2MOa(lYZ>oGQcfi?SVyQWF^&j5Q|rF-d5`1gtfE zvJ%S@^-D`KbM$>Oi%YB-892(}s>8slIbf=bc zejvpS#7qnVEQ}0-3_=WyP`)sbFTx-SlmRK_Wo8fqQsO`?0mKk3l0YR=4AM{~K+`}< iAW||6%utprgB(zli9w!00W8bNpvb_+$eff$?3=9mm43g{&OpFXFlQ%L+PSpIq`8Z=WBO~)ff$?3=9mm46+-!#2AJ7(lYZ>oGQcfi?SVyQWF^&j5Q|ym(Yaqtu=kJ z63Y_xOG`3y^nEgmORO0gILhIQgFuQUaVp;UZ!RMv%j7vs`Z3%Wf}L|Sy>+>&raZFJ}fth9HI1YWlPql7%LxNpZyw-#wb zgKRP)cc?}wBkPfkReGeH&h1OEn0GAjV)*{e%lXfx72baxhjchh_> zRmwe82Rx*2tq%f?zA@zXQ{_E*Z1b#FdF(~AnNNGJ@ma++#;>#1V_9HX-+lZYV)q9s z-`FZ(jqmcz_Y<0|-Jiw%}VY~ns1&5%uO Lv8*#~o|4yJ-4+9~ diff --git a/backend/target/classes/ltd/qubit/survey/service/impl/QuestionServiceImpl.class b/backend/target/classes/ltd/qubit/survey/service/impl/QuestionServiceImpl.class index e55237586b892e0665d343ac6c5969f08c372b22..3f92959e2d12e732c20ea40392ff4e7167368e6f 100644 GIT binary patch delta 2549 zcmb7FX?Rmb6g@B7%Q7t?jXo0c| z_!VEduU3Mw!mmvBR@eC?XfrYk%XtP>uQAX~-~^ARtKB@KQsj*$5Isa>`Knc|(_!AnF+wVvz*H;0k|* zLduaelTD<>tqe=Bl;_HB!|lkD5#saZEX%cm;GGP2;cmW3?q#-7R+cl|i~IOMW4f^v zD;OTYO71iEN?nC|84q1RaO|8)UzsA{S2L^u=UKX8$&a?Fpr)%Z;4c@sc#I(%kMje@ z9MgJ+OgtfBBtL0!aI48>c#2^Ip62$QR_pUBK9SYU4A0?tzRZ-adqF}5 zuhBW04w}wN+|8EqV=Q3pa8a80xP-1!8h0k9@xuv&c~yeDNuT(a#%>)R2q;0N)>~8L zQ|1Nc2CevtJ38j{_(m}Nmf<5Dx8isQ1HL!o2mC1G6vJu!)a2`Ell1sSLN9K$bxRDU z6$S!Tbu}`6mC#+7JV9a{F(QSqRzboRXkmi|j5M_g@zs`8qP7G1X`9esD?e{@PkNDT zouH@x9+1%!c3gw5NJVd?;U(3lq5lkQ!^_l)-gdk~7!B0dLb78Ab@UQhK~~aIMP8ZI zZKyyt(+H%w1kTDMfqU4f8?VN^OhEpqc(VFP)S}AS>C``udF2`x$rJP2@bBa+4iR}qa zyRk=bqAaeV)<|KRvs>U^59ZYE!VN7L(cmP*2#?O8Yr)8MkauBBgXkCUho%KLd-M+d zA=EkaVN8~=9#uJqP@WUUR56%Io#_%h28SVx*%H>lC3-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nv@A7GRhkr> zdSp`8ea9C#opIO;1)oA4+U2&1BWt@%?)H<1SU%hMowFE^%5w9S=QF@(PhSDbVYKyy z?uR;qRs{vL_Z>uM0Vm5+-wYN8u(@v^Y3uM={@=-qGGHN8O6|ZII0@anQ#lid>~A(t zd=8)IFLK92_yXmAk?(a-I`A-G8WgUAs~jO+ZC1J3Xs*a^ioBOJ0b8OR?|~5Q>hnp_ zic&Nj#+S&?Wq#OZ&VkouzS?Ep>M}puv&YXpOz!9UxVIL$x4JfzsLlzT28knAxZGP@ z?x6q$dzv>=E8s#O->W;D z;TrFjYG`_XrKT%tX!!up~msIj!RfGTI_}VQ0$BX>G&PCon zRrkbTr6;0C^u#ytO-EDZ4nnw@Quc)U3%F>ozN@}~<#$0nh*kUK{jx&{6c8J1=xTTv ziLQnMuDBalF#sc74G&`Tme2ugDd6fuhz~Xn%z&kPQ0-!Hb||D4~l@?gYVgCBx~Piz$NMS;0gSIUQ=02euy8To)Rtmm|Pn06MkRFZw|Mg zy4;??&x-UvC%vTpDQJ8e^Hr>P7E4vER}oi{I{zsIR;t+T;HtHb(m}bPL=RuTVEliH zUpZ0ZdL8)z(FbwsmIHXz8V2Nc)~DA6uy()>U_<}D{!jsLoWYxzsW~4~F{oLk;!s$L*nk{TP|8lTNic!KZ0QQPU2)D@Y;fu=|1pw?nQssm;TD zr~g~nBJSYdCbYE;$>p~zd@-Lw-W=*Xgbx?+(enD%X-jkpP_rvhc(TwRZUcGs(v6NG zCA^qpA3p|O581r#!yl{hqF(owdty$#4%F0Z|1s(nlo^O2lVDv;{ls4yp{PiEE#Tli z{Oz{>ong{0)ESQ+E7=&wui-p6{FSFTRPppJDL+ Yji>OmBH(D}j?H}XpVFYHN;A6t51s5y_y7O^ diff --git a/backend/target/classes/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.class b/backend/target/classes/ltd/qubit/survey/service/impl/SurveyResponseServiceImpl.class index c7f603cadbaf8a7349e3847eade565dcaa26b9e8..6475d511ce3b2f1d8d9aa793a195bd5d04284133 100644 GIT binary patch delta 17 YcmaEB`qXs8PBs?K^wg5gN7*z)07ZfZvj6}9 delta 25 gcmaEA`qp&APBtFF^wg5T($wOT%>2B~d)YKZ0F9Xn6951J diff --git a/backend/target/classes/ltd/qubit/survey/service/impl/UserServiceImpl.class b/backend/target/classes/ltd/qubit/survey/service/impl/UserServiceImpl.class index 9b40fe516b9d2ef816fd0ce2f7d7d43240ff9886..546c175ecf185676fc1e26f1b178ba3768ee2459 100644 GIT binary patch literal 2959 zcmbW3Yf~Fl7{~vITVUCQkOH<+(9&81NY|FCt)Ulgt!OAnTC`ZDOL7Pc$!^?isC)ru z9G&rXXME)=XY_?vuysa#?e~E3Q#d~7>`7SIKu2dFn{)d;|L3+RfBp0HcL3K=($Ij$ z2%2;>qlKY!-P|+{&nj|b#x8rN?J+dk&Lf8IMevpAH?(nU2&#>#25hp*w;e9naw;!|CHTGqhMXaY=QzQe80Z zyfL@3&a+->a7MtM*U>9T8hOk;KCv~E6VrV<`o(lhrIaJr#ng*B&R~F{b=9(SVjn}Y z9@dXf#j^^=T*+bl@g=XAV;^W>{IKVBfO6V>d<&1tLb$&E=JgBW6H_YKXjIW|9J zE91GAolmLc9<(L0`-+YcTp+D^?y2)#Rbw&+3ZPNiUe$3Cm#B)YvfR4B^Q45koE$t5 zx2n;l2re@W$hwlSnL>f*&BC~wuN1lMO@ET*((zWjPKdqFKHvN5>F$?1yE{Mr{q?td zKYg?N=@%MCaYe^fyh$-0vuw+|euT9}p>a&7vZoy_Sy_n;W65xx>{l%XCR7-KRSh>W z9>Ii;NlZ~1q$dZ0$k0a7aCw>BpLS9$fPV{od?>L60 zN$PKgjmW|bL?a7e50dOe*YGoq;(`oaeT zxu8(aa&OJa&6}=Sqz-h+R)a;g7xx=UR+tPGB_(6!ZPTl`q;)zRggTu!cC7L1r1E05 zFKSKr>@&?Jzb6v`iK;soZU==`d***hYjssCGDI_;ncbK*ODZX6>ePSmJvm6#aG=<# zFTH?bHFc=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i>TzicZLIVbYL(X%$XLy(WtI+ z=a#Wrp_##)T{J2M!!gBJO&)O9%{qe~4rvqK?vTik8F5N591m{{-=Me`>GDp{ zI~_c9f4@hgMS6D8b13~Q*ft^)KO>%gh(ldiPJd7HU3g#a>8AgO5y25+9K{DT8u9kw zLwrOdB47muu~+H6htU8upeCnf!q63Z3PYN*aFi_kKx5B<_&EVO9AY>bfNMTnLlLDG zyhw}bqV~O*SMa!kAKNS6qn{@FnE*ZR)8p-=)8U40DgCmd#}xf!7h0j|B_W{OvK5k; z&y9subLsLLZK9i)xFR$cXe1y}!GDO;EQFtwc+Fd-@E)m5b97aAQ2KmW=~M@$>o5tW zlDAH3JpMhJq@>cHPXrN!Uy`Bj><{5-CZ9Z?9Q6X|W}+nD+i@!xRq&fu#% z$owHDFN?@`2a0lrvU(ZARMM>sjQSZERhhNrE;ihBaD~Q9{6ZfD?$z+xq z`jo;>DQy2l`cK^0#^U~xOiHR(GyRIH(pyY|SSN759jk8}`TxLLk*sAn?O3Gi_I_`l dsw>-3mrQ;zAx~hDE>cvN8FbO0rwH~Y@GmS7&>{c; diff --git a/backend/target/classes/mybatis/mapper/OptionMapper.xml b/backend/target/classes/mybatis/mapper/OptionMapper.xml index a0533ce..da7f3c3 100644 --- a/backend/target/classes/mybatis/mapper/OptionMapper.xml +++ b/backend/target/classes/mybatis/mapper/OptionMapper.xml @@ -2,7 +2,7 @@ - + @@ -13,18 +13,18 @@ - id, question_id, option_code, content, requires_text, created_at + `id`, `question_id`, `option_code`, `content`, `requires_text`, `created_at` - INSERT INTO options (question_id, option_code, content, requires_text) + INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (#{questionId}, #{optionCode}, #{content}, #{requiresText}) - INSERT INTO options (question_id, option_code, content, requires_text) + INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (#{item.questionId}, #{item.optionCode}, #{item.content}, #{item.requiresText}) @@ -33,51 +33,51 @@ - UPDATE options - SET question_id = #{questionId}, - option_code = #{optionCode}, - content = #{content}, - requires_text = #{requiresText} - WHERE id = #{id} + UPDATE `option` + SET `question_id` = #{questionId}, + `option_code` = #{optionCode}, + `content` = #{content}, + `requires_text` = #{requiresText} + WHERE `id` = #{id} - DELETE FROM options WHERE id = #{id} + DELETE FROM `option` WHERE `id` = #{id} - DELETE FROM options WHERE question_id = #{questionId} + DELETE FROM `option` WHERE `question_id` = #{questionId} - SELECT - FROM options - WHERE id = #{id} + FROM `option` + WHERE `id` = #{id} - SELECT - FROM options - ORDER BY question_id, option_code + FROM `option` + ORDER BY `question_id`, `option_code` - SELECT - FROM options - WHERE question_id = #{questionId} - ORDER BY option_code + FROM `option` + WHERE `question_id` = #{questionId} + ORDER BY `option_code` - SELECT - FROM options - WHERE question_id = #{questionId} - AND option_code = #{optionCode} + FROM `option` + WHERE `question_id` = #{questionId} + AND `option_code` = #{optionCode} \ No newline at end of file diff --git a/backend/target/classes/mybatis/mapper/QuestionMapper.xml b/backend/target/classes/mybatis/mapper/QuestionMapper.xml index 4d3d902..93e87dd 100644 --- a/backend/target/classes/mybatis/mapper/QuestionMapper.xml +++ b/backend/target/classes/mybatis/mapper/QuestionMapper.xml @@ -4,83 +4,76 @@ - + - - + - + + - id, question_number, content, question_type, work_area, is_required, next_question_logic, created_at + `id`, `number`, `content`, `type`, `is_required`, `next`, `is_last`, `created_at` - INSERT INTO questions (question_number, content, question_type, work_area, is_required, next_question_logic) - VALUES (#{questionNumber}, #{content}, #{questionType}, #{workArea}, #{isRequired}, #{nextQuestionLogic}) + INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `next`, `is_last`) + VALUES (#{number}, #{content}, #{type}, #{isRequired}, + #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, + #{isLast}) - UPDATE questions - SET question_number = #{questionNumber}, - content = #{content}, - question_type = #{questionType}, - work_area = #{workArea}, - is_required = #{isRequired}, - next_question_logic = #{nextQuestionLogic} - WHERE id = #{id} + UPDATE `question` + SET `number` = #{number}, + `content` = #{content}, + `type` = #{type}, + `is_required` = #{isRequired}, + `next` = #{next,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, + `is_last` = #{isLast} + WHERE `id` = #{id} - DELETE FROM questions WHERE id = #{id} + DELETE FROM `question` WHERE `id` = #{id} - - - \ No newline at end of file diff --git a/backend/target/classes/mybatis/mapper/SurveyResponseMapper.xml b/backend/target/classes/mybatis/mapper/SurveyResponseMapper.xml index a3b78aa..c954675 100644 --- a/backend/target/classes/mybatis/mapper/SurveyResponseMapper.xml +++ b/backend/target/classes/mybatis/mapper/SurveyResponseMapper.xml @@ -13,18 +13,18 @@ - id, user_id, question_id, selected_options, text_answer, created_at + `id`, `user_id`, `question_id`, `selected_options`, `text_answer`, `created_at` - INSERT INTO survey_responses (user_id, question_id, selected_options, text_answer) + INSERT INTO `survey_response` (`user_id`, `question_id`, `selected_options`, `text_answer`) VALUES (#{userId}, #{questionId}, #{selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, #{textAnswer}) - INSERT INTO survey_responses (user_id, question_id, selected_options, text_answer) + INSERT INTO `survey_response` (`user_id`, `question_id`, `selected_options`, `text_answer`) VALUES (#{item.userId}, #{item.questionId}, @@ -35,59 +35,59 @@ - UPDATE survey_responses - SET user_id = #{userId}, - question_id = #{questionId}, - selected_options = #{selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, - text_answer = #{textAnswer} - WHERE id = #{id} + UPDATE `survey_response` + SET `user_id` = #{userId}, + `question_id` = #{questionId}, + `selected_options` = #{selectedOptions,typeHandler=ltd.qubit.survey.common.mybatis.JsonTypeHandler}, + `text_answer` = #{textAnswer} + WHERE `id` = #{id} - DELETE FROM survey_responses WHERE id = #{id} + DELETE FROM `survey_response` WHERE `id` = #{id} - DELETE FROM survey_responses WHERE user_id = #{userId} + DELETE FROM `survey_response` WHERE `user_id` = #{userId} \ No newline at end of file diff --git a/backend/target/classes/mybatis/mapper/UserMapper.xml b/backend/target/classes/mybatis/mapper/UserMapper.xml index da8010d..43db318 100644 --- a/backend/target/classes/mybatis/mapper/UserMapper.xml +++ b/backend/target/classes/mybatis/mapper/UserMapper.xml @@ -6,63 +6,53 @@ - - id, name, phone, work_area, position_type, created_at + `id`, `name`, `phone`, `position_type`, `created_at` - INSERT INTO users (name, phone, work_area, position_type) - VALUES (#{name}, #{phone}, #{workArea}, #{positionType}) + INSERT INTO `user` (`name`, `phone`, `position_type`) + VALUES (#{name}, #{phone}, #{positionType}) - UPDATE users - SET name = #{name}, - phone = #{phone}, - work_area = #{workArea}, - position_type = #{positionType} - WHERE id = #{id} + UPDATE `user` + SET `name` = #{name}, + `phone` = #{phone}, + `position_type` = #{positionType} + WHERE `id` = #{id} - DELETE FROM users WHERE id = #{id} + DELETE FROM `user` WHERE `id` = #{id} - - - \ No newline at end of file diff --git a/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 2b1fcaa..a92df7b 100644 --- a/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -15,7 +15,6 @@ ltd/qubit/survey/utils/CustomObjectMapper.class ltd/qubit/survey/model/User.class ltd/qubit/survey/service/QuestionService.class ltd/qubit/survey/common/mybatis/JsonTypeHandler.class -ltd/qubit/survey/service/impl/QuestionServiceImpl$1.class ltd/qubit/survey/service/UserService.class ltd/qubit/survey/dao/BaseDao.class ltd/qubit/survey/service/impl/OptionServiceImpl.class diff --git a/database/init_database.sql b/database/init_database.sql index fc6597a..a13e2c7 100644 --- a/database/init_database.sql +++ b/database/init_database.sql @@ -3,6 +3,12 @@ CREATE DATABASE IF NOT EXISTS `llm_survey` DEFAULT CHARACTER SET utf8mb4 COLLATE USE `llm_survey`; +-- 删除旧表(如果存在) +DROP TABLE IF EXISTS `survey_response`; +DROP TABLE IF EXISTS `option`; +DROP TABLE IF EXISTS `question`; +DROP TABLE IF EXISTS `user`; + -- 创建用户表 CREATE TABLE IF NOT EXISTS `user` ( `id` BIGINT PRIMARY KEY AUTO_INCREMENT, @@ -22,6 +28,7 @@ CREATE TABLE IF NOT EXISTS `question` ( `work_area` VARCHAR(20) DEFAULT NULL COMMENT '针对的工作领域', `is_required` BOOLEAN NOT NULL DEFAULT TRUE COMMENT '是否必答', `next` JSON DEFAULT NULL COMMENT '跳转逻辑', + `is_last` BOOLEAN NOT NULL DEFAULT FALSE COMMENT '是否是最后一题', `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', UNIQUE KEY `uk_number` (`number`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='问题表'; @@ -59,8 +66,8 @@ TRUNCATE TABLE `user`; SET FOREIGN_KEY_CHECKS = 1; -- 插入通用认知问题 -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (1, '您对大模型(如ChatGPT、通义千问、DeepSeek)的了解程度:', 'SINGLE_CHOICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (1, '您对大模型(如ChatGPT、通义千问、DeepSeek)的了解程度:', 'SINGLE_CHOICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`) VALUES (LAST_INSERT_ID(), 'A', '从未接触过'), @@ -68,8 +75,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`) VALUES (LAST_INSERT_ID(), 'C', '在工作中尝试过基础应用'), (LAST_INSERT_ID(), 'D', '深度研究过技术原理'); -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (2, '您觉得大模型可以做到下面哪些事?', 'MULTIPLE_CHOICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (2, '您觉得大模型可以做到下面哪些事?', 'MULTIPLE_CHOICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '精准知识问答', FALSE), @@ -80,8 +87,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'F', '流程自动化', FALSE), (LAST_INSERT_ID(), 'G', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (3, '您最关注大模型应用的哪些风险?', 'MULTIPLE_CHOICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (3, '您最关注大模型应用的哪些风险?', 'MULTIPLE_CHOICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '数据隐私泄露', FALSE), @@ -90,8 +97,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '技术使用门槛高', FALSE), (LAST_INSERT_ID(), 'E', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (4, '您的主要工作内容是:', 'SINGLE_CHOICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (4, '您的主要工作内容是:', 'SINGLE_CHOICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`) VALUES (LAST_INSERT_ID(), 'A', '研发(产品、开发、算法、测试、运维等)'), @@ -106,8 +113,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`) VALUES (LAST_INSERT_ID(), 'J', '公司高管(战略规划、组织架构、制度建设等)'); -- 研发部门专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (5, '您在开发过程中最耗时的重复性工作:', 'MULTIPLE_CHOICE', 'RD', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (5, '您在开发过程中最耗时的重复性工作:', 'MULTIPLE_CHOICE', 'RD', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '文档编写(如需求文档、技术文档等)', FALSE), @@ -117,8 +124,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'E', '系统监控与维护', FALSE), (LAST_INSERT_ID(), 'F', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (6, '您希望大模型如何与现有系统集成:', 'MULTIPLE_CHOICE', 'RD', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (6, '您希望大模型如何与现有系统集成:', 'MULTIPLE_CHOICE', 'RD', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '回答技术问题', FALSE), @@ -131,8 +138,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'H', '其他', TRUE); -- 项目管理专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (7, '项目管理中最常遇到的挑战是:', 'MULTIPLE_CHOICE', 'PROJECT', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (7, '项目管理中最常遇到的挑战是:', 'MULTIPLE_CHOICE', 'PROJECT', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '项目进度跟踪与更新', FALSE), @@ -140,8 +147,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '项目报告生成', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (8, '您希望如何利用大模型提升项目管理效率:', 'MULTIPLE_CHOICE', 'PROJECT', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (8, '您希望如何利用大模型提升项目管理效率:', 'MULTIPLE_CHOICE', 'PROJECT', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动生成立项报告、进度报告、总结报告等', FALSE), @@ -151,8 +158,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'E', '其他', TRUE); -- 保险专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (9, '理赔处理中的主要瓶颈是:', 'MULTIPLE_CHOICE', 'INSURANCE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (9, '理赔处理中的主要瓶颈是:', 'MULTIPLE_CHOICE', 'INSURANCE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '理赔文档处理', FALSE), @@ -161,8 +168,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '理赔规则理解与应用', FALSE), (LAST_INSERT_ID(), 'E', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (10, '大模型可以优化哪些保险工作环节:', 'MULTIPLE_CHOICE', 'INSURANCE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (10, '大模型可以优化哪些保险工作环节:', 'MULTIPLE_CHOICE', 'INSURANCE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '新员工入职培训', FALSE), @@ -173,8 +180,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'F', '其他', TRUE); -- 财务专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (11, '日常工作中最重复的任务是:', 'MULTIPLE_CHOICE', 'FINANCE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (11, '日常工作中最重复的任务是:', 'MULTIPLE_CHOICE', 'FINANCE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '财务数据整理与报表生成', FALSE), @@ -182,8 +189,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '财务审计与合规检查', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (12, '大模型能如何协助提升财务工作效率:', 'MULTIPLE_CHOICE', 'FINANCE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (12, '大模型能如何协助提升财务工作效率:', 'MULTIPLE_CHOICE', 'FINANCE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '各种报表格式的自动转换', FALSE), @@ -193,8 +200,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'E', '其他', TRUE); -- 客服专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (13, '客户咨询中最常遇到的重复性问题:', 'MULTIPLE_CHOICE', 'CUSTOMER_SERVICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (13, '客户咨询中最常遇到的重复性问题:', 'MULTIPLE_CHOICE', 'CUSTOMER_SERVICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '参保资格咨询', FALSE), @@ -202,8 +209,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '材料补交通知', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (14, '您希望大模型如何辅助客服工作:', 'MULTIPLE_CHOICE', 'CUSTOMER_SERVICE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (14, '您希望大模型如何辅助客服工作:', 'MULTIPLE_CHOICE', 'CUSTOMER_SERVICE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动生成客户回复模板', FALSE), @@ -212,8 +219,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '其他', TRUE); -- 运营专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (15, '在运营工作中,最需要自动化支持的任务是:', 'MULTIPLE_CHOICE', 'OPERATION', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (15, '在运营工作中,最需要自动化支持的任务是:', 'MULTIPLE_CHOICE', 'OPERATION', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '热点讯息的获取和跟踪', FALSE), @@ -222,8 +229,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '活动效果评估与预测', FALSE), (LAST_INSERT_ID(), 'E', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (16, '大模型可以如何帮助提升运营效率:', 'MULTIPLE_CHOICE', 'OPERATION', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (16, '大模型可以如何帮助提升运营效率:', 'MULTIPLE_CHOICE', 'OPERATION', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动抓取热点讯息', FALSE), @@ -233,8 +240,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'E', '其他', TRUE); -- 市场拓展专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (17, '在市场拓展和商务沟通中,您最常遇到的挑战是:', 'MULTIPLE_CHOICE', 'MARKET', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (17, '在市场拓展和商务沟通中,您最常遇到的挑战是:', 'MULTIPLE_CHOICE', 'MARKET', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '市场分析和竞争对手跟踪', FALSE), @@ -242,8 +249,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '商务沟通中的信息处理与反馈跟踪', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (18, '您希望大模型如何帮助提升市场拓展效率:', 'MULTIPLE_CHOICE', 'MARKET', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (18, '您希望大模型如何帮助提升市场拓展效率:', 'MULTIPLE_CHOICE', 'MARKET', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动生成市场分析报告与趋势预测', FALSE), @@ -252,8 +259,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '其他', TRUE); -- 人力资源专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (19, '人事部门最耗时的日常任务是:', 'MULTIPLE_CHOICE', 'HR', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (19, '人事部门最耗时的日常任务是:', 'MULTIPLE_CHOICE', 'HR', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '招聘简历筛选与面试安排', FALSE), @@ -261,8 +268,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '绩效评估与报告生成', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (20, '您希望大模型如何协助提升人事工作效率:', 'MULTIPLE_CHOICE', 'HR', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (20, '您希望大模型如何协助提升人事工作效率:', 'MULTIPLE_CHOICE', 'HR', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动筛选招聘简历并推荐候选人', FALSE), @@ -271,8 +278,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '其他', TRUE); -- 综合管理专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (21, '在行政工作中,最耗时的任务是:', 'MULTIPLE_CHOICE', 'ADMIN', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (21, '在行政工作中,最耗时的任务是:', 'MULTIPLE_CHOICE', 'ADMIN', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '合同审查与管理', FALSE), @@ -280,8 +287,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '文档管理与更新', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (22, '您希望大模型如何协助提升行政工作效率:', 'MULTIPLE_CHOICE', 'ADMIN', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (22, '您希望大模型如何协助提升行政工作效率:', 'MULTIPLE_CHOICE', 'ADMIN', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '自动生成合同和协议模板', FALSE), @@ -290,8 +297,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '其他', TRUE); -- 公司高管专属问题 -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (23, '您认为大模型在哪些战略层面的决策中可以发挥作用?', 'MULTIPLE_CHOICE', 'EXECUTIVE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (23, '您认为大模型在哪些战略层面的决策中可以发挥作用?', 'MULTIPLE_CHOICE', 'EXECUTIVE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '市场趋势预测与分析', FALSE), @@ -299,8 +306,8 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'C', '业务流程优化与重组', FALSE), (LAST_INSERT_ID(), 'D', '其他', TRUE); -INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`) -VALUES (24, '在公司管理工作中,您最希望大模型协助哪些任务?', 'MULTIPLE_CHOICE', 'EXECUTIVE', TRUE); +INSERT INTO `question` (`number`, `content`, `type`, `work_area`, `is_required`, `is_last`) +VALUES (24, '在公司管理工作中,您最希望大模型协助哪些任务?', 'MULTIPLE_CHOICE', 'EXECUTIVE', TRUE, FALSE); INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) VALUES (LAST_INSERT_ID(), 'A', '数据分析与报告自动生成', FALSE), @@ -309,11 +316,11 @@ INSERT INTO `option` (`question_id`, `option_code`, `content`, `requires_text`) (LAST_INSERT_ID(), 'D', '其他', TRUE); -- 开放建议问题 -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (25, '您对大模型培训的具体期待:', 'TEXT', FALSE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (25, '您对大模型培训的具体期待:', 'TEXT', FALSE, FALSE); -INSERT INTO `question` (`number`, `content`, `type`, `is_required`) -VALUES (26, '您认为公司引入AI需提前防范的风险:', 'TEXT', FALSE); +INSERT INTO `question` (`number`, `content`, `type`, `is_required`, `is_last`) +VALUES (26, '您认为公司引入AI需提前防范的风险:', 'TEXT', FALSE, TRUE); -- 设置问题跳转逻辑 UPDATE `question` @@ -363,4 +370,7 @@ UPDATE `question` SET `next` = JSON_OBJECT('*', 25) WHERE `number` = 22; UPDATE `question` SET `next` = JSON_OBJECT('*', 25) WHERE `number` = 24; -- 第一个开放性问题跳转到第二个 -UPDATE `question` SET `next` = JSON_OBJECT('*', 26) WHERE `number` = 25; \ No newline at end of file +UPDATE `question` SET `next` = JSON_OBJECT('*', 26) WHERE `number` = 25; + +-- 设置最后一题标记 +UPDATE `question` SET `is_last` = TRUE WHERE `number` = 26; \ No newline at end of file diff --git a/frontend/src/api/survey.js b/frontend/src/api/survey.js index 646ef11..5963517 100644 --- a/frontend/src/api/survey.js +++ b/frontend/src/api/survey.js @@ -17,15 +17,24 @@ export function getQuestionOptions(questionId) { } // 获取下一个问题 -export function getNextQuestion(userId, currentQuestionNumber, selectedOptions) { +export function getNextQuestion(userId, selectedOptions, currentQuestionNumber) { + console.log('API调用参数:', { userId, selectedOptions, currentQuestionNumber }); + const params = { + userId + }; + + // 只有在不是第一次请求时才添加这些参数 + if (selectedOptions) { + params.selectedOptions = selectedOptions.join(','); + } + if (currentQuestionNumber !== undefined) { + params.currentQuestionNumber = currentQuestionNumber; + } + return request({ url: '/question/next', method: 'get', - params: { - userId, - currentQuestionNumber, - selectedOptions, - }, + params }); } diff --git a/frontend/src/stores/survey.js b/frontend/src/stores/survey.js index f388aea..96ebc52 100644 --- a/frontend/src/stores/survey.js +++ b/frontend/src/stores/survey.js @@ -13,14 +13,15 @@ export const useSurveyStore = defineStore('survey', () => { const currentQuestion = ref(null); const questionOptions = ref([]); const userResponses = ref([]); - const currentQuestionNumber = ref(0); + const currentQuestionNumber = ref(null); + const currentOptions = ref([]); const isCompleted = ref(false); // 获取用户的问题列表 async function fetchUserQuestions(userId) { try { const response = await getUserQuestions(userId); - return response.data; + return response; } catch (error) { showToast('获取问题列表失败:' + error.message); throw error; @@ -30,10 +31,13 @@ export const useSurveyStore = defineStore('survey', () => { // 获取问题的选项列表 async function fetchQuestionOptions(questionId) { try { - const response = await getQuestionOptions(questionId); - questionOptions.value = response.data; - return response.data; + console.log('获取问题选项,问题ID:', questionId); + const options = await getQuestionOptions(questionId); + console.log('获取到的选项:', options); + currentOptions.value = options; + return options; } catch (error) { + console.error('获取问题选项失败:', error); showToast('获取问题选项失败:' + error.message); throw error; } @@ -42,19 +46,35 @@ export const useSurveyStore = defineStore('survey', () => { // 获取下一个问题 async function fetchNextQuestion(userId, selectedOptions) { try { - // 如果是初始化(currentQuestionNumber为0),则从第3题开始 - const questionNumber = currentQuestionNumber.value === 0 ? 3 : currentQuestionNumber.value; - const response = await getNextQuestion(userId, questionNumber, selectedOptions); - if (response) { - currentQuestion.value = response; - currentQuestionNumber.value = response.questionNumber; - await fetchQuestionOptions(response.id); + console.log('获取下一个问题,参数:', { userId, selectedOptions, currentQuestionNumber: currentQuestionNumber.value }); + + // 如果没有当前问题号,说明是新开始的问卷 + const isNewSurvey = !currentQuestionNumber.value; + + const question = await getNextQuestion( + userId, + selectedOptions, + isNewSurvey ? undefined : currentQuestionNumber.value + ); + console.log('获取到的问题:', question); + + if (question) { + currentQuestion.value = question; + currentQuestionNumber.value = question.number; + + // 获取问题的选项 + console.log('开始获取问题选项'); + const options = await getQuestionOptions(question.id); + console.log('获取到的选项:', options); + currentOptions.value = options; } else { + console.log('没有更多问题了'); isCompleted.value = true; } - return response; + + return question; } catch (error) { - showToast('获取下一个问题失败:' + error.message); + console.error('获取下一个问题失败:', error); throw error; } } @@ -64,7 +84,7 @@ export const useSurveyStore = defineStore('survey', () => { try { const response = await submitSurvey(userId, responses); userResponses.value = responses; - return response.data; + return response; } catch (error) { showToast('提交问卷失败:' + error.message); throw error; @@ -75,8 +95,8 @@ export const useSurveyStore = defineStore('survey', () => { async function fetchUserResponses(userId) { try { const response = await getUserResponses(userId); - userResponses.value = response.data; - return response.data; + userResponses.value = response; + return response; } catch (error) { showToast('获取问卷答案失败:' + error.message); throw error; @@ -87,8 +107,13 @@ export const useSurveyStore = defineStore('survey', () => { function resetSurvey() { currentQuestion.value = null; questionOptions.value = []; - currentQuestionNumber.value = 0; + userResponses.value = []; + currentQuestionNumber.value = null; + currentOptions.value = []; isCompleted.value = false; + // 清除本地存储中的问卷相关数据 + localStorage.removeItem('surveyProgress'); + localStorage.removeItem('surveyResponses'); } return { @@ -96,6 +121,7 @@ export const useSurveyStore = defineStore('survey', () => { questionOptions, userResponses, currentQuestionNumber, + currentOptions, isCompleted, fetchUserQuestions, fetchQuestionOptions, diff --git a/frontend/src/stores/user.js b/frontend/src/stores/user.js index 88d4ad1..e94dc16 100644 --- a/frontend/src/stores/user.js +++ b/frontend/src/stores/user.js @@ -2,6 +2,7 @@ import { defineStore } from 'pinia'; import { ref } from 'vue'; import { register, checkPhone, getUserInfo } from '@/api/user'; import { showToast } from 'vant'; +import { useSurveyStore } from './survey'; export const useUserStore = defineStore('user', () => { const userId = ref(localStorage.getItem('userId') || ''); @@ -87,10 +88,10 @@ export const useUserStore = defineStore('user', () => { // 退出登录 function logout() { - userId.value = ''; - userInfo.value = null; + const surveyStore = useSurveyStore(); + userId.value = null; localStorage.removeItem('userId'); - console.log('用户已登出'); + surveyStore.resetSurvey(); } return { diff --git a/frontend/src/views/SurveyView.vue b/frontend/src/views/SurveyView.vue index 0d78fd9..baa6dfc 100644 --- a/frontend/src/views/SurveyView.vue +++ b/frontend/src/views/SurveyView.vue @@ -8,41 +8,66 @@ />
-
- - - - - - - - - - - - - - -
+
+

+ {{ surveyStore.currentQuestionNumber }}. {{ surveyStore.currentQuestion.content }} + (多选) +

+ + + + + + + + + + + + + + + + +
+ +
+
- 下一题 + {{ surveyStore.currentQuestion?.isLast ? '完成' : '下一题' }}
@@ -51,25 +76,29 @@
- + +
+

您的反馈对我们非常重要

+

我们将根据调查结果持续改进和优化

+
- 重新开始 + 返回首页