浏览代码

报错提交

小么熊🐻 4 年之前
父节点
当前提交
f774ca1d38

+ 1 - 0
zzjs-admin/pom.xml

@@ -69,6 +69,7 @@
             <version>1.0.1</version>
         </dependency>
 
+
     </dependencies>
 
     <build>

+ 11 - 0
zzjs-admin/src/main/java/com/miaxis/system/controller/gzpt/GzptUserInfoController.java

@@ -6,7 +6,9 @@ import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.domain.entity.UserInfo;
 import com.miaxis.common.core.page.ResponsePageInfo;
 import com.miaxis.newgzpt.domain.GzptUserInfo;
+import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
 import com.miaxis.newgzpt.service.IGzptUserInfoService;
+import com.miaxis.system.dto.system.UserInfoDTO;
 import com.miaxis.user.service.IUserInfoService;
 import io.swagger.annotations.*;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -57,5 +59,14 @@ public class GzptUserInfoController extends BaseController {
         return Response.success(gzptUserInfoService.getById(id));
     }
 
+
+    /**
+     * 获取用户id获取详细信息
+     */
+    @GetMapping(value = "/getUserWxlogin")
+    @ApiOperation("根据密码获取学员")
+    public Response<GzptUserInfo> getUserWxlogin(@ModelAttribute GzptUserInfoDTO gzptUserInfoDTO){
+        return Response.success(gzptUserInfoService.getUserWxlogin(gzptUserInfoDTO));
+    }
 }
 

+ 4 - 0
zzjs-service/src/main/java/com/miaxis/newgzpt/mapper/GzptUserInfoMapper.java

@@ -2,6 +2,8 @@ package com.miaxis.newgzpt.mapper;
 
 import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
+import com.miaxis.system.dto.system.UserInfoDTO;
 
 import java.util.List;
 
@@ -16,4 +18,6 @@ import java.util.List;
 public interface GzptUserInfoMapper extends BaseMapper<GzptUserInfo> {
 
     List<GzptUserInfo> getList();
+
+    GzptUserInfo getUserByWxlogin(GzptUserInfoDTO gzptUserInfoDTO);
 }

+ 4 - 0
zzjs-service/src/main/java/com/miaxis/newgzpt/service/IGzptUserInfoService.java

@@ -2,6 +2,8 @@ package com.miaxis.newgzpt.service;
 
 import com.miaxis.newgzpt.domain.GzptUserInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
+import com.miaxis.system.dto.system.UserInfoDTO;
 
 import java.util.List;
 
@@ -17,4 +19,6 @@ public interface IGzptUserInfoService extends IService<GzptUserInfo> {
 
 
     List<GzptUserInfo> getList();
+
+    GzptUserInfo getUserWxlogin(GzptUserInfoDTO userInfoDTO);
 }

+ 7 - 0
zzjs-service/src/main/java/com/miaxis/newgzpt/service/impl/GzptUserInfoServiceImpl.java

@@ -3,9 +3,11 @@ package com.miaxis.newgzpt.service.impl;
 import com.miaxis.common.annotation.DataSource;
 import com.miaxis.common.enums.DataSourceTypeEnum;
 import com.miaxis.newgzpt.domain.GzptUserInfo;
+import com.miaxis.newgzpt.dto.GzptUserInfoDTO;
 import com.miaxis.newgzpt.mapper.GzptUserInfoMapper;
 import com.miaxis.newgzpt.service.IGzptUserInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.system.dto.system.UserInfoDTO;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestParam;
 
@@ -33,4 +35,9 @@ public class GzptUserInfoServiceImpl extends ServiceImpl<GzptUserInfoMapper, Gzp
     public List<GzptUserInfo> getList() {
         return mapper.getList();
     }
+
+    @Override
+    public GzptUserInfo getUserWxlogin(GzptUserInfoDTO userInfoDTO) {
+        return mapper.getUserByWxlogin(userInfoDTO);
+    }
 }

+ 8 - 0
zzjs-service/src/main/resources/mapper/newgzpt/GzptUserInfoMapper.xml

@@ -5,4 +5,12 @@
         select * from GZPT_USER_INFO
     </select>
 
+
+
+    <select id="getUserByWxlogin" parameterType="com.miaxis.newgzpt.dto.GzptUserInfoDTO" resultType="com.miaxis.newgzpt.domain.GzptUserInfo">
+        select * from gzpt_user_info g where g.id =
+         (select max(id) from gzpt_user_info g where g.logincode=#{logincode} and g.password=#{password} and city=#{city})
+    </select>
+
+
 </mapper>

+ 79 - 0
zzjs-service/src/main/resources/mapper/question/QuestionInfoMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.question.mapper.QuestionInfoMapper">
+
+    <resultMap type="QuestionInfo" id="QuestionInfoResult">
+        <result property="id"    column="id"    />
+        <result property="questionId"    column="question_id"    />
+        <result property="mediaType"    column="media_type"    />
+        <result property="chapterId"    column="chapter_id"    />
+        <result property="label"    column="label"    />
+        <result property="question"    column="question"    />
+        <result property="mediaKey"    column="media_key"    />
+        <result property="answer"    column="answer"    />
+        <result property="optionA"    column="option_a"    />
+        <result property="optionB"    column="option_b"    />
+        <result property="optionC"    column="option_c"    />
+        <result property="optionD"    column="option_d"    />
+        <result property="optionE"    column="option_e"    />
+        <result property="optionF"    column="option_f"    />
+        <result property="optionG"    column="option_g"    />
+        <result property="optionH"    column="option_h"    />
+        <result property="explain"    column="explain"    />
+        <result property="conciseExplain"    column="concise_explain"    />
+        <result property="keywords"    column="keywords"    />
+        <result property="assuredKeywords"    column="assured_keywords"    />
+        <result property="illiteracyExplain"    column="illiteracy_explain"    />
+        <result property="illiteracyKeywords"    column="illiteracy_keywords"    />
+        <result property="difficulty"    column="difficulty"    />
+        <result property="wrongRate"    column="wrong_rate"    />
+        <result property="optionType"    column="option_type"    />
+        <result property="knackKeyword"    column="knack_keyword"    />
+        <result property="knackImgUrl"    column="knack_img_url"    />
+        <result property="knackDetail"    column="knack_detail"    />
+        <result property="knackVoiceTxt"    column="knack_voice_txt"    />
+        <result property="m"    column="m"    />
+    </resultMap>
+
+    <sql id="selectQuestionInfoVo">
+        select id, question_id, media_type, chapter_id, label, question, media_key, answer, option_a, option_b, option_c, option_d, option_e, option_f, option_g, option_h, explain, concise_explain, keywords, assured_keywords, illiteracy_explain, illiteracy_keywords, difficulty, wrong_rate, option_type, knack_keyword, knack_img_url, knack_detail, knack_voice_txt, m, from question_info
+    </sql>
+
+    <select id="selectQuestionInfoList" parameterType="QuestionInfo" resultMap="QuestionInfoResult">
+        <include refid="selectQuestionInfoVo"/>
+        <where>
+            <if test="questionId != null "> and question_id = #{questionId}</if>
+            <if test="mediaType != null "> and media_type = #{mediaType}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="label != null  and label != ''"> and label = #{label}</if>
+            <if test="question != null "> and question = #{question}</if>
+            <if test="mediaKey != null  and mediaKey != ''"> and media_key = #{mediaKey}</if>
+            <if test="answer != null "> and answer = #{answer}</if>
+            <if test="optionA != null  and optionA != ''"> and option_a = #{optionA}</if>
+            <if test="optionB != null  and optionB != ''"> and option_b = #{optionB}</if>
+            <if test="optionC != null  and optionC != ''"> and option_c = #{optionC}</if>
+            <if test="optionD != null  and optionD != ''"> and option_d = #{optionD}</if>
+            <if test="optionE != null  and optionE != ''"> and option_e = #{optionE}</if>
+            <if test="optionF != null  and optionF != ''"> and option_f = #{optionF}</if>
+            <if test="optionG != null  and optionG != ''"> and option_g = #{optionG}</if>
+            <if test="optionH != null  and optionH != ''"> and option_h = #{optionH}</if>
+            <if test="explain != null "> and explain = #{explain}</if>
+            <if test="conciseExplain != null "> and concise_explain = #{conciseExplain}</if>
+            <if test="keywords != null "> and keywords = #{keywords}</if>
+            <if test="assuredKeywords != null "> and assured_keywords = #{assuredKeywords}</if>
+            <if test="illiteracyExplain != null "> and illiteracy_explain = #{illiteracyExplain}</if>
+            <if test="illiteracyKeywords != null "> and illiteracy_keywords = #{illiteracyKeywords}</if>
+            <if test="difficulty != null "> and difficulty = #{difficulty}</if>
+            <if test="wrongRate != null "> and wrong_rate = #{wrongRate}</if>
+            <if test="optionType != null "> and option_type = #{optionType}</if>
+            <if test="knackKeyword != null "> and knack_keyword = #{knackKeyword}</if>
+            <if test="knackImgUrl != null "> and knack_img_url = #{knackImgUrl}</if>
+            <if test="knackDetail != null "> and knack_detail = #{knackDetail}</if>
+            <if test="knackVoiceTxt != null "> and knack_voice_txt = #{knackVoiceTxt}</if>
+            <if test="m != null "> and m = #{m}</if>
+        </where>
+    </select>
+
+</mapper>

+ 1 - 1
zzjs-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
 	<sql id="selectUserInfoVo">
-        select id, name, sex, sfzmlx, id_card, crdate, birthday, mobile, password, wechar, openid, inscode, create_time, school_class_type_id, update_time, pxcx, coachnum, status from user_info
+        select id, name, sex, sfzmlx, id_card, birthday, mobile, password, wechar, openid, inscode, create_time, school_class_type_id, update_time, pxcx, coachnum, status from user_info
     </sql>
 
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">