diff --git a/src/main/java/com/jdc/jdcproject/controller/DicekeMiningrecordController.java b/src/main/java/com/jdc/jdcproject/controller/DicekeMiningrecordController.java index 09ba150..8ab8a70 100644 --- a/src/main/java/com/jdc/jdcproject/controller/DicekeMiningrecordController.java +++ b/src/main/java/com/jdc/jdcproject/controller/DicekeMiningrecordController.java @@ -1,14 +1,12 @@ package com.jdc.jdcproject.controller; import com.jdc.jdcproject.entity.DicekeMiningrecord; -import com.jdc.jdcproject.entity.DicekePlatearea; import com.jdc.jdcproject.entity.VO.DicekeMiningrecordVo; import com.jdc.jdcproject.service.IDicekeMiningrecordService; import com.jdc.jdcproject.utils.Result; import io.swagger.v3.oas.annotations.Operation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.stereotype.Controller; import java.util.List; @@ -64,4 +62,15 @@ public class DicekeMiningrecordController { DicekeMiningrecord dicekeMiningrecordServiceById = dicekeMiningrecordService.getById(recordID); return Result.successResult().data("dicekeMiningrecordServiceById", dicekeMiningrecordServiceById); } + + @Operation(summary = "新增Mo品味信息") + @PostMapping("adddicekeMiningrecord") + public Result adddicekeMiningrecord(@RequestBody DicekeMiningrecord DicekeMiningrecord) { + boolean updateflag = dicekeMiningrecordService.save(DicekeMiningrecord); + if (updateflag) { + return Result.successResult(); + } else { + return Result.errorResult(); + } + } } diff --git a/src/main/java/com/jdc/jdcproject/entity/DicekeShovel.java b/src/main/java/com/jdc/jdcproject/entity/DicekeShovel.java index 8992366..efb3fc1 100644 --- a/src/main/java/com/jdc/jdcproject/entity/DicekeShovel.java +++ b/src/main/java/com/jdc/jdcproject/entity/DicekeShovel.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; /** *

@@ -15,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema; */ @TableName("diceke_shovel") @Schema(name = "DicekeShovel", description = "电铲") +@Data public class DicekeShovel implements Serializable { private static final long serialVersionUID = 1L; @@ -27,31 +29,7 @@ public class DicekeShovel implements Serializable { private String shovelCode; @Schema(description = "属性(是自营还是外委)") - private byte[] attribute; - - public String getShovelID() { - return shovelID; - } - - public void setShovelID(String shovelID) { - this.shovelID = shovelID; - } - - public String getShovelCode() { - return shovelCode; - } - - public void setShovelCode(String shovelCode) { - this.shovelCode = shovelCode; - } - - public byte[] getAttribute() { - return attribute; - } - - public void setAttribute(byte[] attribute) { - this.attribute = attribute; - } + private Integer attribute; @Override public String toString() {