Parcourir la source

职业资格等级获取时间表开发

wangxx il y a 6 jours
Parent
commit
3efff2bc85

+ 8 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/ledger/LedgerQualificationLevelController.java

@@ -77,4 +77,12 @@ public class LedgerQualificationLevelController extends BaseController {
77 77
         }
78 78
         return AjaxResult.success();
79 79
     }
80
+    /**
81
+     * 通过用户id获取职业资格等级获取时间信息
82
+     */
83
+    @GetMapping("/user")
84
+    public AjaxResult getByUserId( Long userId) {
85
+        LedgerQualificationLevel   ledgerQualificationLevel= service.lambdaQuery().eq(LedgerQualificationLevel::getUserId, userId).last(" limit 1").one();
86
+        return AjaxResult.success(ledgerQualificationLevel);
87
+    }
80 88
 }

+ 3 - 0
airport-ledger/src/main/resources/mapper/ledger/LedgerQualificationLevelMapper.xml

@@ -47,6 +47,9 @@
47 47
         <if test="endTime != null">
48 48
             AND create_time &lt;= #{endTime}
49 49
         </if>
50
+        <if test="userId != null">
51
+            AND user_id = #{userId}
52
+        </if>
50 53
         ORDER BY id DESC
51 54
     </select>
52 55