소스 검색

船舶档案、重点关注更新

minghao-chen 2 년 전
부모
커밋
cb1ad79824
17개의 변경된 파일165개의 추가작업 그리고 33개의 파일을 삭제
  1. 9 3
      beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/ship/FocusShipController.java
  2. 2 0
      beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/ship/ShipArchivesController.java
  3. 4 2
      beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/system/SysLoginController.java
  4. 2 2
      beidou-admin/src/main/resources/application.yml
  5. 5 3
      beidou-framework/src/main/java/cn/com/taiji/beidou/framework/web/service/SysLoginService.java
  6. 5 0
      beidou-ship/pom.xml
  7. 2 2
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/BeiDouShipInfo.java
  8. 25 0
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/domain/ShipArchivesData.java
  9. 3 0
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/domain/ShipArchivesREQ.java
  10. 14 1
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipData.java
  11. 20 0
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipReq.java
  12. 32 0
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipResult.java
  13. 5 1
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/mapper/FocusShipMapper.java
  14. 2 1
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/service/FocusShipService.java
  15. 5 2
      beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/service/impl/FocusShipServiceImpl.java
  16. 16 8
      beidou-ship/src/main/resources/mapper/FocusShipMapper.xml
  17. 14 8
      beidou-ship/src/main/resources/mapper/ShipArchivesMapper.xml

+ 9 - 3
beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/ship/FocusShipController.java

@@ -6,14 +6,18 @@ import cn.com.taiji.beidou.common.core.domain.model.LoginUser;
 import cn.com.taiji.beidou.common.core.page.TableDataInfo;
 import cn.com.taiji.beidou.framework.web.service.TokenService;
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipData;
+import cn.com.taiji.beidou.ship.focus.domain.FocusShipReq;
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipResult;
 import cn.com.taiji.beidou.ship.focus.service.FocusShipService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -59,7 +63,7 @@ public class FocusShipController extends BaseController {
 
     @ApiOperation("关注船舶详情")
     @PostMapping("/findFocusShip")
-    public R findFocusShip(Integer focusId){
+    public R<FocusShipResult> findFocusShip(Integer focusId){
         try{
             return R.ok(focusShipService.selectById(focusId));
         }catch (Exception e){
@@ -69,10 +73,12 @@ public class FocusShipController extends BaseController {
 
     @ApiOperation("关注船舶列表")
     @PostMapping("/focusShipList")
-    public TableDataInfo findFocusShipList(Integer pageNum, Integer pageSize){
+    public TableDataInfo findFocusShipList(HttpServletRequest request,FocusShipReq focusShipReq, Integer pageNum, Integer pageSize){
         try{
+            LoginUser loginUser = tokenService.getLoginUser(request);
+            Long userId = loginUser.getUserId();
             startPage();
-            List<FocusShipResult> results = focusShipService.selectList();
+            List<FocusShipResult> results = focusShipService.selectList(focusShipReq);
             return getDataTable(results);
         }catch (Exception e){
             e.printStackTrace();

+ 2 - 0
beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/ship/ShipArchivesController.java

@@ -9,6 +9,7 @@ import cn.com.taiji.beidou.ship.archives.domain.ShipArchivesData;
 import cn.com.taiji.beidou.ship.archives.domain.ShipArchivesREQ;
 import cn.com.taiji.beidou.ship.archives.service.ShipArchivesService;
 import com.github.pagehelper.PageHelper;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -22,6 +23,7 @@ import java.util.List;
  * @Author CHEN
  * @Date 2022/11/8 18:55
  */
+@Api(tags = "船舶档案")
 @RestController
 public class ShipArchivesController extends BaseController {
 

+ 4 - 2
beidou-admin/src/main/java/cn/com/taiji/beidou/web/controller/system/SysLoginController.java

@@ -2,9 +2,11 @@ package cn.com.taiji.beidou.web.controller.system;
 
 import cn.com.taiji.beidou.common.constant.Constants;
 import cn.com.taiji.beidou.common.core.domain.AjaxResult;
+import cn.com.taiji.beidou.common.core.domain.R;
 import cn.com.taiji.beidou.common.core.domain.entity.SysMenu;
 import cn.com.taiji.beidou.common.core.domain.entity.SysUser;
 import cn.com.taiji.beidou.common.core.domain.model.LoginBody;
+import cn.com.taiji.beidou.common.core.domain.model.LoginUser;
 import cn.com.taiji.beidou.common.utils.SecurityUtils;
 import cn.com.taiji.beidou.framework.web.service.SysLoginService;
 import cn.com.taiji.beidou.framework.web.service.SysPermissionService;
@@ -57,9 +59,9 @@ public class SysLoginController
 
     @ApiOperation("手机号+短信验证码登录")
     @PostMapping("/loginByCode")
-    public AjaxResult loginByCode(String mobile,String code){
+    public R<LoginUser> loginByCode(String mobile, String code){
 
-        return AjaxResult.success(loginService.loginByCode(mobile,code));
+        return loginService.loginByCode(mobile,code);
     }
 
 

+ 2 - 2
beidou-admin/src/main/resources/application.yml

@@ -18,7 +18,7 @@ ruoyi:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
+  port: 8004
   servlet:
     # 应用的访问路径
     context-path: /
@@ -97,7 +97,7 @@ token:
     # 令牌密钥
     secret: abcdefghijklmnopqrstuvwxyz
     # 令牌有效期(默认30分钟)
-    expireTime: 30
+    expireTime: 60
   
 # MyBatis配置
 mybatis:

+ 5 - 3
beidou-framework/src/main/java/cn/com/taiji/beidou/framework/web/service/SysLoginService.java

@@ -2,6 +2,7 @@ package cn.com.taiji.beidou.framework.web.service;
 
 import cn.com.taiji.beidou.common.constant.CacheConstants;
 import cn.com.taiji.beidou.common.constant.Constants;
+import cn.com.taiji.beidou.common.core.domain.R;
 import cn.com.taiji.beidou.common.core.domain.entity.SysUser;
 import cn.com.taiji.beidou.common.core.domain.model.LoginUser;
 import cn.com.taiji.beidou.common.core.redis.RedisCache;
@@ -114,19 +115,20 @@ public class SysLoginService
      * @param code
      * @return
      */
-    public String loginByCode(String mobile,  String code)
+    public R<LoginUser> loginByCode(String mobile, String code)
     {
         //验证短信验证码
         String cacheCode = redisCache.getCacheObject(mobile)+"";
         if(!code.equals(cacheCode)){
-            return "验证码错误!";
+            return R.fail("验证码错误!");
         }
         SysUser sysUser = userService.selectUserByPhone(mobile);
         AsyncManager.me().execute(AsyncFactory.recordLogininfor(sysUser.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
         LoginUser loginUser = (LoginUser) userDetailsService.createLoginUser(sysUser);
         recordLoginInfo(loginUser.getUserId());
         // 生成token
-        return tokenService.createToken(loginUser);
+        loginUser.setToken(tokenService.createToken(loginUser));
+        return R.ok(loginUser);
     }
 
     /**

+ 5 - 0
beidou-ship/pom.xml

@@ -27,6 +27,11 @@
             <artifactId>spring-cloud-starter-openfeign</artifactId>
             <version>3.0.5</version>
         </dependency>
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 2 - 2
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/BeiDouShipInfo.java

@@ -25,10 +25,10 @@ public class BeiDouShipInfo {
     private ShipArchivesMapper shipArchivesMapper;
 
     /**
-     * 每个一小时执行一次
+     * 每日4:00执行一次
      */
 
-    @Scheduled(cron = "0 0 */1 * * ?")
+    @Scheduled(cron = "0 0 4 1/1 * ?")
     public void beidouShipInfo(){
 
         log.info("start update ship info message 。。。");

+ 25 - 0
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/domain/ShipArchivesData.java

@@ -1,5 +1,7 @@
 package cn.com.taiji.beidou.ship.archives.domain;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -11,61 +13,84 @@ public class ShipArchivesData {
     /**
      * 船舶id 如:儋0602365
      */
+    @ApiModelProperty("船舶id")
     private String shipId;
     /**
      * 北斗设备号
      */
+    @ApiModelProperty("北斗设备号")
     private String devideNo;
     /**
      * 船舶类型
      */
+    @ApiModelProperty("船舶类型")
     private String shipType;
     /**
      * 作业类型
      */
+    @ApiModelProperty("作业类型")
     private String jobType;
     /**
      * 作业方式
      */
+    @ApiModelProperty("作业方式")
     private String jobWay;
     /**
      * 船主
      */
+    @ApiModelProperty("船主")
     private String ownerName;
     /**
      * 船主电话
      */
+    @ApiModelProperty("船主电话")
     private String ownerTelNo;
     /**
      * 船长
      */
+    @ApiModelProperty("船长")
     private double shipLength;
     /**
      * 船宽
      */
+    @ApiModelProperty("船宽")
     private double shipWidth;
     /**
      * 船舶材质
      */
+    @ApiModelProperty("船舶材质")
     private String shipMaterial;
     /**
      * 所属管理单位
      */
+    @ApiModelProperty("所属管理单位")
     private String policeStationId;
     /**
      * 船主单位
      */
+    @ApiModelProperty("船主单位")
     private String ownerCompany;
     /**
      * 创建时间
      */
+    @ApiModelProperty("创建时间")
     private long createTime;
     /**
      * 修改时间
      */
+    @ApiModelProperty("修改时间")
     private long modifyTime;
     /**
      * 船主类型
      */
+    @ApiModelProperty("船主类型")
     private String ownerType;
+
+    /**
+     * 最后状态
+     */
+    @ApiModelProperty("最后状态")
+    private Integer lastStatus;
+
+    private String deptName;
 }

+ 3 - 0
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/archives/domain/ShipArchivesREQ.java

@@ -14,4 +14,7 @@ public class ShipArchivesREQ {
     private String jobType;
     private String ownerType;
     private String jobWay;
+    private String shipId;
+    private String devideNo;
+    private String deptId;
 }

+ 14 - 1
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipData.java

@@ -1,5 +1,6 @@
 package cn.com.taiji.beidou.ship.focus.domain;
 
+import cn.com.taiji.beidou.common.core.domain.BaseEntity;
 import lombok.Data;
 
 import java.sql.Date;
@@ -9,9 +10,21 @@ import java.sql.Date;
  * @Date 2022/11/9 18:00
  */
 @Data
-public class FocusShipData {
+public class FocusShipData extends BaseEntity {
+    /**
+     * 重点关注id
+     */
     private Integer focusId;
+    /**
+     * 关注船舶id
+     */
     private String shipId;
+    /**
+     * 关注人id
+     */
     private String userId;
+    /**
+     * 关注时间
+     */
     private Date createTime;
 }

+ 20 - 0
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipReq.java

@@ -0,0 +1,20 @@
+package cn.com.taiji.beidou.ship.focus.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import springfox.documentation.annotations.ApiIgnore;
+
+/**
+ * 重点关注入参
+ * @Author CHEN
+ * @Date 2022/11/11 11:24
+ */
+@Data
+public class FocusShipReq {
+
+    private String shipId;
+    private String devideNo;
+    private String deptId;
+    @ApiModelProperty(hidden = true)
+    private String userId;
+}

+ 32 - 0
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/domain/FocusShipResult.java

@@ -1,6 +1,7 @@
 package cn.com.taiji.beidou.ship.focus.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
@@ -13,69 +14,100 @@ import java.util.Date;
 @Data
 public class FocusShipResult {
 
+    @ApiModelProperty("关注ID")
     private Integer focusId;
+    @ApiModelProperty("关注人ID")
     private String userId;
 
+    @ApiModelProperty("关注时间")
     @JsonFormat(shape =JsonFormat.Shape.STRING,pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
     private Date focusCreate;
+
+    /**
+     * 所属管理单位名称
+     */
+    @ApiModelProperty("所属管理单位名称")
+    private String deptName;
+
     /**
      * 船舶id 如:儋0602365
      */
+    @ApiModelProperty("船舶id")
     private String shipId;
     /**
      * 北斗设备号
      */
+    @ApiModelProperty("北斗设备号")
     private String devideNo;
     /**
      * 船舶类型
      */
+    @ApiModelProperty("船舶类型")
     private String shipType;
     /**
      * 作业类型
      */
+    @ApiModelProperty("作业类型")
     private String jobType;
     /**
      * 作业方式
      */
+    @ApiModelProperty("作业方式")
     private String jobWay;
     /**
      * 船主
      */
+    @ApiModelProperty("船主")
     private String ownerName;
     /**
      * 船主电话
      */
+    @ApiModelProperty("船主电话")
     private String ownerTelNo;
     /**
      * 船长
      */
+    @ApiModelProperty("船长")
     private double shipLength;
     /**
      * 船宽
      */
+    @ApiModelProperty("船宽")
     private double shipWidth;
     /**
      * 船舶材质
      */
+    @ApiModelProperty("船舶材质")
     private String shipMaterial;
     /**
      * 所属管理单位
      */
+    @ApiModelProperty("所属管理单位")
     private String policeStationId;
     /**
      * 船主单位
      */
+    @ApiModelProperty("船主单位")
     private String ownerCompany;
     /**
      * 创建时间
      */
+    @ApiModelProperty("创建时间")
     private long createTime;
     /**
      * 修改时间
      */
+    @ApiModelProperty("修改时间")
     private long modifyTime;
     /**
      * 船主类型
      */
+    @ApiModelProperty("船主类型")
     private String ownerType;
+
+    /**
+     * 最后状态
+     */
+    @ApiModelProperty("最后状态")
+    private Integer lastStatus;
 }

+ 5 - 1
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/mapper/FocusShipMapper.java

@@ -1,8 +1,10 @@
 package cn.com.taiji.beidou.ship.focus.mapper;
 
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipData;
+import cn.com.taiji.beidou.ship.focus.domain.FocusShipReq;
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipResult;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -31,7 +33,9 @@ public interface FocusShipMapper {
 
     /**
      * 列表
+     * @param shipId
+     * @param devideNo
      * @return
      */
-    List<FocusShipResult> selectList();
+    List<FocusShipResult> selectList(FocusShipReq focusShipReq);
 }

+ 2 - 1
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/service/FocusShipService.java

@@ -1,6 +1,7 @@
 package cn.com.taiji.beidou.ship.focus.service;
 
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipData;
+import cn.com.taiji.beidou.ship.focus.domain.FocusShipReq;
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipResult;
 
 import java.util.List;
@@ -30,5 +31,5 @@ public interface FocusShipService {
      * 列表
      * @return
      */
-    List<FocusShipResult> selectList();
+    List<FocusShipResult> selectList(FocusShipReq focusShipReq);
 }

+ 5 - 2
beidou-ship/src/main/java/cn/com/taiji/beidou/ship/focus/service/impl/FocusShipServiceImpl.java

@@ -1,9 +1,11 @@
 package cn.com.taiji.beidou.ship.focus.service.impl;
 
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipData;
+import cn.com.taiji.beidou.ship.focus.domain.FocusShipReq;
 import cn.com.taiji.beidou.ship.focus.domain.FocusShipResult;
 import cn.com.taiji.beidou.ship.focus.mapper.FocusShipMapper;
 import cn.com.taiji.beidou.ship.focus.service.FocusShipService;
+import org.springframework.security.core.token.TokenService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -35,7 +37,8 @@ public class FocusShipServiceImpl implements FocusShipService {
     }
 
     @Override
-    public List<FocusShipResult> selectList() {
-        return focusShipMapper.selectList();
+    public List<FocusShipResult> selectList(FocusShipReq focusShipReq) {
+
+        return focusShipMapper.selectList(focusShipReq);
     }
 }

+ 16 - 8
beidou-ship/src/main/resources/mapper/FocusShipMapper.xml

@@ -8,6 +8,7 @@
         <id     property="focusId"      column="focus_id"      />
         <result property="userId"    column="user_id"    />
         <result property="focusCreate"     column="focus_create"     />
+        <result property="deptName"     column="dept_name"     />
         <result property="shipId"      column="ship_id"      />
         <result property="devideNo"    column="devide_no"    />
         <result property="shipType"     column="ship_type"     />
@@ -23,10 +24,11 @@
         <result property="createTime"    column="create_time"    />
         <result property="modifyTime"      column="modify_time"      />
         <result property="ownerType"    column="owner_type"    />
+        <result property="lastStatus"    column="last_status"    />
     </resultMap>
 
     <insert id="insertFocusShip" parameterType="focusShipData">
-        insert bd_focus_ship(
+        insert ax_bd_focus_ship(
             <if test="shipId != null and shipId != ''">ship_id,</if>
             <if test="userId != null and userId != ''">user_id,</if>
             create_time
@@ -38,21 +40,27 @@
     </insert>
 
     <delete id="deleteFocusShip" parameterType="integer">
-        delete from bd_focus_ship where focus_id=#{focusId}
+        delete from ax_bd_focus_ship where focus_id=#{focusId}
     </delete>
 
     <select id="selectById" parameterType="integer" resultMap="focusShipDetail">
-        select focus.user_id,focus.focus_id,focus.create_time as focus_create,archives.* from bd_ship_archives archives,bd_focus_ship focus
+        select focus.user_id,focus.focus_id,focus.create_time as focus_create,archives.* from ax_bd_ship_archives archives,ax_bd_focus_ship focus
         <where>
             archives.ship_id = focus.ship_id
             and focus.focus_id = #{focusId}
         </where>
     </select>
 
-    <select id="selectList"  resultMap="focusShipDetail">
-        select focus.user_id,focus.focus_id,focus.create_time as focus_create,archives.* from bd_ship_archives archives,bd_focus_ship focus
-        <where>
-            archives.ship_id = focus.ship_id
-        </where>
+    <select id="selectList" parameterType="focusShipReq"  resultMap="focusShipDetail">
+        select focus.user_id,focus.focus_id,focus.create_time as focus_create,dept.pscmc as dept_name,archives.*
+        from ax_bd_ship_archives archives
+        INNER JOIN ax_bd_focus_ship focus
+        INNER JOIN ax_beidou_dept dept
+        where archives.ship_id = focus.ship_id and archives.police_station_id = dept.pscbh
+        <if test="shipId != null and shipId != ''">and archives.ship_id like concat('%', #{shipId},'%')</if>
+        <if test="devideNo != null and devideNo != ''">and archives.devide_no like concat('%', #{devideNo},'%')</if>
+        <if test="deptId != null and deptId != ''">and dept.xw_dept_id like cocat('%',#{deptId},'%')</if>
+        <if test="userId != null and userId != ''">and focus.user_id=#{userId}</if>
+
     </select>
 </mapper>

+ 14 - 8
beidou-ship/src/main/resources/mapper/ShipArchivesMapper.xml

@@ -16,18 +16,20 @@
         <result property="shipWidth"   column="ship_width"   />
         <result property="shipMaterial"    column="ship_material"    />
         <result property="policeStationId"      column="police_station_id"      />
+        <result property="deptName"     column="dept_name"     />
         <result property="ownerCompany"      column="owner_company"      />
         <result property="createTime"    column="create_time"    />
         <result property="modifyTime"      column="modify_time"      />
         <result property="ownerType"    column="owner_type"    />
+        <result property="lastStatus"    column="last_status"    />
     </resultMap>
 
     <select id="selectByDevideNo" parameterType="string" resultMap="ShipResult">
-        select * from bd_ship_archives where devide_no=#{devideNo}
+        select * from ax_bd_ship_archives where devide_no=#{devideNo}
     </select>
 
     <update id="updateById" parameterType="shipArchivesData" >
-        update bd_ship_archives
+        update ax_bd_ship_archives
         <set>
             <if test="shipId != null and shipId != ''">ship_id = #{shipId},</if>
             <if test="shipType != null and shipType != ''">ship_type = #{shipType},</if>
@@ -48,7 +50,7 @@
     </update>
 
     <insert id="insertShip" parameterType="shipArchivesData">
-        insert into bd_ship_archives (
+        insert into ax_bd_ship_archives (
         <if test="shipId != null and shipId != ''">ship_id,</if>
         <if test="devideNo != null and devideNo != ''">devide_no,</if>
         <if test="shipType != null and shipType != ''">ship_type,</if>
@@ -85,14 +87,18 @@
     
     
     <select id="selectShipArchivesList" parameterType="shipArchivesREQ" resultMap="ShipResult">
-        select * from bd_ship_archives
-        <where>
-            <if test="shipType != null and shipType != ''">ship_type = #{shipType}</if>
-        </where>
+        select * from ax_bd_ship_archives archives INNER JOIN ax_beidou_dept dept
+        where
+            archives.police_station_id = dept.pscbh
+        <if test="shipId != null and shipId != ''">and archives.ship_id like concat('%', #{shipId},'%')</if>
+        <if test="devideNo != null and devideNo != ''">and archives.devide_no like concat('%', #{devideNo},'%')</if>
+        <if test="deptId != null and deptId != ''">and dept.xw_dept_id like cocat('%',#{deptId},'%')</if>
+        <if test="shipType != null and shipType != ''">and ship_type = #{shipType}</if>
+
     </select>
 
 
     <select id="selectById" parameterType="string" resultMap="ShipResult">
-        select * from bd_ship_archives where ship_id=#{shipId}
+        select * from ax_bd_ship_archives where ship_id=#{shipId}
     </select>
 </mapper>