Browse Source

新增了一个模块的正删改查

lwh 6 months ago
parent
commit
e25ba709b6

+ 6 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoRespVO.java

@@ -26,11 +26,13 @@ public class MuseumInfoRespVO {
 
     private Integer keepType;
 
+    private String element;
+
     private String  local;
 
     private LocalDateTime bronTime ;
 
-    private String bronPlace;
+    private String stratum;
 
     private LocalDateTime findTime;
 
@@ -42,7 +44,7 @@ public class MuseumInfoRespVO {
 
     private String offerMan;
 
-    private String charater;
+    private String character;
 
     private String condition;
 
@@ -50,5 +52,7 @@ public class MuseumInfoRespVO {
 
     private String useWay;
 
+    private String moneyId;
+
     private String tip;
 }

+ 6 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/controller/admin/museuminfo/vo/MuseumInfoSaveVO.java

@@ -26,11 +26,13 @@ public class MuseumInfoSaveVO {
 
     private Integer keepType;
 
+    private String element;
+
     private String  local;
 
     private LocalDateTime bronTime ;
 
-    private String bronPlace;
+    private String stratum;
 
     private LocalDateTime findTime;
 
@@ -42,7 +44,7 @@ public class MuseumInfoSaveVO {
 
     private String offerMan;
 
-    private String charater;
+    private String character;
 
     private String condition;
 
@@ -50,5 +52,7 @@ public class MuseumInfoSaveVO {
 
     private String useWay;
 
+    private String moneyId;
+
     private String tip;
 }

+ 73 - 22
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/database/museuminfo/MuseumInfoDO.java

@@ -20,47 +20,98 @@ import java.time.LocalDateTime;
 @AllArgsConstructor
 public class MuseumInfoDO extends BaseDO {
 
+    /**
+     * 标本ID
+     */
     @TableId
     private Integer id;
-
+    /**
+     * 标本编号
+     */
     private String sampleId;
-
+    /**
+     * 标本类型
+     */
     private Integer sampleType;
-
+    /**
+     * 存放位置
+     */
     private String place;
-
+    /**
+     * 中文名称
+     */
     private String chineseName;
-
+    /**
+     * 英文名称
+     */
     private String englishName;
-
+    /**
+     * 国际名称
+     */
     private String internationName;
-
+    /**
+     * 保存类型
+     */
     private Integer keepType;
-
+    /**
+     * 成份
+     */
+    private String element;
+    /**
+     * 产地
+     */
     private String  local;
-
+    /**
+     * 时代
+     */
     private LocalDateTime bronTime ;
-
-    private String bronPlace;
-
+    /**
+     * 保存地层
+     */
+    private String stratum;
+    /**
+     * 发现时间
+     */
     private LocalDateTime findTime;
-
+    /**
+     * 尺寸
+     */
     private String size;
-
+    /**
+     * 重量
+     */
     private Long weight;
-
+    /**
+     * 来源
+     */
     private String origin;
-
+    /**
+     * 标本提供者
+     */
     private String offerMan;
-
-    private String charater;
-
+    /**
+     * 描述
+     */
+    private String character;
+    /**
+     * 馆藏状态
+     */
     private String condition;
-
+    /**
+     * 入藏时间
+     */
     private String joinTime;
-
+    /**
+     * 用途
+     */
     private String useWay;
-
+    /**
+     * 资产号
+     */
+    private String moneyId;
+    /**
+     * 备注
+     */
     private String tip;
 
 }

+ 2 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/dal/mysql/museuminfo/MuseumInfoMapper.java

@@ -10,13 +10,13 @@ import org.apache.ibatis.annotations.Update;
 @Mapper
 public interface MuseumInfoMapper extends BaseMapperX<MuseumInfoDO> {
 
-    @Update("UPDATE museum_info SET sample_type=#{sampleType}, place=#{place} WHERE id =#{id}")
+    @Update("UPDATE museum_info SET sample_type=#{sampleType}, place=#{place},chinese_name=#{chineseName} WHERE id =#{id}")
     void updateMuseumInfo(MuseumInfoDO museumInfoDO);
 
     @Update("UPDATE museum_info SET deleted=1  WHERE id =#{id}")
     void deleteMuseumInfo(Integer id);
 
-    @Select("SELECT * FROM museum_info WHERE id = #{id} AND deleted =0 ")
+    @Select("SELECT * FROM museum_info WHERE id =#{id} AND deleted =0 ")
     MuseumInfoDO selectMuseumInfoById(@Param("id") Integer id);
 
 }

+ 0 - 2
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoService.java

@@ -20,8 +20,6 @@ public interface MuseumInfoService {
     * 删除标本
     * */
    void deleteMuseumInfo(Integer id);
-
-
    /**
     * 查询标本
     * */

+ 13 - 5
yudao-module-museum/yudao-module-museum-biz/src/main/java/cn/iocoder/yudao/module/museum/service/museuminfo/MuseumInfoServiceImpl.java

@@ -13,23 +13,31 @@ public  class  MuseumInfoServiceImpl implements MuseumInfoService {
 
    @Resource
    private MuseumInfoMapper museumInfoMapper;
-
+   /**
+    *新增标本
+    */
    @Override
    public Integer createMuseumInfo(MuseumInfoSaveVO saveVO){
-     return museumInfoMapper.insert(BeanUtils.toBean(saveVO, MuseumInfoDO.class));
+     return museumInfoMapper.insert(BeanUtils.toBean(saveVO, MuseumInfoDO.class));//insert(内置)
    }
-
+   /**
+    *更新标本
+    */
    @Override
    public void updateMuseumInfo(MuseumInfoSaveVO saveVO){
       museumInfoMapper.updateMuseumInfo(BeanUtils.toBean(saveVO,MuseumInfoDO.class));
    }
-
+   /**
+    *删除标本
+    */
    @Override
    public void deleteMuseumInfo(Integer id){
 //      museumInfoMapper.deleteMuseumInfo(id);
       museumInfoMapper.deleteById(id);
    }
-
+   /**
+    *查询标本
+    */
    @Override
    public MuseumInfoDO selectMuseumInfo(Integer id){
       return museumInfoMapper.selectMuseumInfoById(id);