Browse Source

配置修改,拍卖会接口修改

linhui.li 1 month ago
parent
commit
6f45cf72d8

+ 1 - 1
README.md

@@ -1,3 +1,3 @@
-# Auction
+# 安泓信拍卖系统
 
 Auction

+ 1 - 1
auc/pom.xml

@@ -47,7 +47,7 @@
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<version>2.1.1.RELEASE</version>
+				<version>2.5.15</version>
 				<configuration>
 					<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
 				</configuration>

+ 1 - 26
auc/src/main/java/cn/hobbystocks/auc/config/MyFlywayMigrationStrategy.java

@@ -1,22 +1,15 @@
 package cn.hobbystocks.auc.config;
 
-import cn.hobbystocks.auc.common.constant.Constants;
 import cn.hobbystocks.auc.common.user.UserUtils;
-import cn.hobbystocks.auc.domain.Auction;
 import cn.hobbystocks.auc.service.IAuctionService;
 import cn.hobbystocks.auc.service.ILotService;
-import cn.hobbystocks.auc.vo.AuctionVO;
 import lombok.SneakyThrows;
 import org.flywaydb.core.Flyway;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
 import org.springframework.stereotype.Component;
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Objects;
 import java.util.TimeZone;
 
 @Component
@@ -47,25 +40,7 @@ public class MyFlywayMigrationStrategy implements FlywayMigrationStrategy {
         TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
         UserUtils.setUrl(userUrl);
 
-        Auction auction = auctionService.selectAuctionById(1L);
-        if (Objects.isNull(auction)) {
-            auction = new AuctionVO();
-            auction.setStatus(Constants.GROUP_STATUS_STARTING);
-            auction.setDelFlag(Constants.DEL_FLAG_NO_DELETE);
-            auction.setName("双十一拍卖活动");
-            auction.setDetail("双十一拍卖活动");
-            auction.setPubTime(new Date());
-            auction.setStartTime(new Date());
-            auction.setEndTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2025-01-03 00:00:00"));
-            auction.setCreateTime(new Date());
-            auction.setUpdateTime(new Date());
-            auctionService.insertAuction(auction);
-            auctionService.pubAuction((AuctionVO)auction);
-        }else {
-            AuctionVO auctionVO = new AuctionVO();
-            BeanUtils.copyProperties(auction, auctionVO);
-            auctionService.pubAuction(auctionVO);
-        }
+
         lotService.dynamicTasks();
     }
 

+ 13 - 9
auc/src/main/java/cn/hobbystocks/auc/web/AuctionController.java

@@ -6,12 +6,16 @@ import java.util.Objects;
 import cn.hobbystocks.auc.common.constant.Constants;
 import cn.hobbystocks.auc.common.core.domain.AjaxResult;
 import cn.hobbystocks.auc.common.core.redis.RedisCache;
+import cn.hobbystocks.auc.dto.AuctionDTO;
 import cn.hobbystocks.auc.vo.AuctionVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Operation;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -39,8 +43,9 @@ public class AuctionController extends AdminBaseController {
 	@ApiOperation(value = "查询拍卖会列表", notes = "分页查询拍卖会列表", response = Auction.class, responseContainer = "List<Auction>")
 	@PostMapping("/list")
 	public AjaxResult list(@RequestBody AuctionVO auction) {
-		startPage(auction);
-		List<Auction> list = auctionService.selectAuctionList(auction);
+
+        IPage<Auction> page=new Page<>(auction.getPageNum(),auction.getPageSize());
+		List<Auction> list = auctionService.list(page);
 		return AjaxResult.successPage(list);
 	}
 
@@ -49,15 +54,14 @@ public class AuctionController extends AdminBaseController {
 	 */
 	@ApiOperation(value = "新增保存拍卖会", notes = "新增保存拍卖会", response = AjaxResult.class, responseContainer = "int")
 	@PostMapping("/add")
-	public AjaxResult addSave(@RequestBody AuctionVO auction) {
-		Auction dbAuc = auctionService.selectAuctionByNo(auction.getNo());
-		if (Objects.nonNull(dbAuc))
-			return AjaxResult.error("拍卖会编号已存在");
+	public AjaxResult addSave(@RequestBody AuctionDTO auctionDTO) {
+        Auction auction = new Auction();
+        BeanUtils.copyProperties(auctionDTO,auction);
 		auction.setDelFlag(Constants.DEL_FLAG_NO_DELETE);
 		auction.setStatus(Constants.GROUP_STATUS_WAITING);
 		auction.setPubStatus(Constants.PUB_STATUS_NO_PUBLISHED);
 		auction.setCreateBy(getUsername());
-		return AjaxResult.success(auctionService.insertAuction(auction));
+		return AjaxResult.success(auctionService.save(auction));
 	}
 
 	/**
@@ -66,7 +70,7 @@ public class AuctionController extends AdminBaseController {
 	@ApiOperation(value = "根据拍卖会编号获取拍卖会详情", notes = "根据拍卖会编号获取拍卖会详情", response = Auction.class, responseContainer = "Auction")
 	@PostMapping(value = "/get")
 	public AjaxResult getInfo(@RequestBody AuctionVO auction) {
-		return AjaxResult.success(auctionService.selectAuctionByNo(auction.getNo()));
+		return AjaxResult.success(auctionService.getById(auction.getId()));
 	}
 
 	/**
@@ -82,7 +86,7 @@ public class AuctionController extends AdminBaseController {
 			return AjaxResult.error("拍卖会已发布不能修改");
 		}
 		auction.setUpdateBy(getUsername());
-		return AjaxResult.success(auctionService.updateAuction(auction));
+		return AjaxResult.success(auctionService.updateById(auction));
 	}
 
 	/**

+ 2 - 2
auc/src/main/resources/application-local.yml

@@ -1,8 +1,8 @@
 redis:
   database: 9
-  host: ${REDIS_HOST:127.0.0.1}
+  host: ${REDIS_HOST:192.168.50.8}
   port: ${REDIS_PORT:6379}
-  password: #Pass2021    # 密码(默认为空)
+  password: Pass2010    # 密码(默认为空)
   timeout: 60000  # 连接超时时长(毫秒)
   pool:
     max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)

+ 3 - 3
auc/src/main/resources/application.yml

@@ -4,9 +4,9 @@ spring:
   application:
     name: auction-hk
   datasource:
-    url: ${DB_URL:jdbc:postgresql://192.168.50.10:15432/hobby_auction}
-    username: ${DB_USERNAME:poyee_auction}
-    password: ${DB_PASSWORD:Pass2025}
+    url: ${DB_URL:jdbc:postgresql://192.168.50.8:5432/ahx_auction}
+    username: ${DB_USERNAME:postgres}
+    password: ${DB_PASSWORD:123456}
   mvc:
     pathmatch:
       matching-strategy: ant_path_matcher

+ 7 - 10
bid/pom.xml

@@ -69,6 +69,7 @@
 		<dependency>
 			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-lang3</artifactId>
+            <version>3.18.0</version>
 		</dependency>
 		<dependency>
 			<groupId>com.github.pagehelper</groupId>
@@ -78,7 +79,6 @@
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>fastjson</artifactId>
-			<version>1.2.80</version>
 		</dependency>
 		<!-- redis 缓存操作 -->
 		<dependency>
@@ -93,7 +93,7 @@
 		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpclient</artifactId>
-			<version>4.5.10</version>
+			<version>4.5.13</version>
 		</dependency>
 		<dependency>
 			<groupId>org.codehaus.janino</groupId>
@@ -110,17 +110,14 @@
 			<artifactId>fluent-logger</artifactId>
 			<version>0.3.4</version>
 		</dependency>
-		<!--<dependency>
-			<groupId>org.apache.poi</groupId>
-			<artifactId>poi-ooxml</artifactId>
-		</dependency>-->
+
 		<!-- 自定义验证注解 -->
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-validation</artifactId>
 		</dependency>
 		<!--bee-->
-		<dependency>
+		<!--<dependency>
 			<groupId>org.teasoft</groupId>
 			<artifactId>bee</artifactId>
 			<version>${bee.version}</version>
@@ -130,19 +127,19 @@
 			<artifactId>honey</artifactId>
 			<version>${bee.version}</version>
 		</dependency>
-		<!--for log framework,Excel(poi) -->
+		&lt;!&ndash;for log framework,Excel(poi) &ndash;&gt;
 		<dependency>
 			<groupId>org.teasoft</groupId>
 			<artifactId>bee-ext</artifactId>
 			<version>${bee.version}</version>
-		</dependency>
+		</dependency>-->
 	</dependencies>
 	<build>
 		<plugins>
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
-				<version>2.1.1.RELEASE</version>
+				<version>2.5.15</version>
 				<configuration>
 					<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
 				</configuration>

+ 52 - 52
bid/src/main/java/cn/hobbystocks/auc/config/BeeConfig.java

@@ -1,52 +1,52 @@
-package cn.hobbystocks.auc.config;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.DependsOn;
-import org.teasoft.bee.osql.PreparedSql;
-import org.teasoft.bee.osql.Suid;
-import org.teasoft.bee.osql.SuidRich;
-import org.teasoft.honey.osql.core.BeeFactory;
-import org.teasoft.honey.osql.core.BeeFactoryHelper;
-
-import javax.annotation.Resource;
-import javax.sql.DataSource;
-
-/**
- * @author by po'yi
- * @Classname BeeConfig
- * @Description 通用dao,实体类尽量使用pojo包下,其他实体类个别字段未和表对应
- * @Date 2021/12/8 13:01
- */
-@Configuration
-@Slf4j
-public class BeeConfig {
-	@Resource
-	private DataSource dataSource;
-
-	@Bean
-	public BeeFactory beeFactory() throws Exception {
-		BeeFactory beeFactory = BeeFactory.getInstance();
-		beeFactory.setDataSource(dataSource);
-		return beeFactory;
-	}
-
-	@Bean("suid")
-	@DependsOn("beeFactory")
-	public Suid beeSuid() {
-		return BeeFactoryHelper.getSuid();
-	}
-
-	@Bean("suidRich")
-	@DependsOn("beeFactory")
-	public SuidRich beeSuidRich() {
-		return BeeFactory.getHoneyFactory().getSuidRich();
-	}
-
-	@Bean("preparedSql")
-	@DependsOn("beeFactory")
-	public PreparedSql beePreparedSql() {
-		return BeeFactory.getHoneyFactory().getPreparedSql();
-	}
-}
+//package cn.hobbystocks.auc.config;
+//
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.DependsOn;
+//import org.teasoft.bee.osql.PreparedSql;
+//import org.teasoft.bee.osql.Suid;
+//import org.teasoft.bee.osql.SuidRich;
+//import org.teasoft.honey.osql.core.BeeFactory;
+//import org.teasoft.honey.osql.core.BeeFactoryHelper;
+//
+//import javax.annotation.Resource;
+//import javax.sql.DataSource;
+//
+///**
+// * @author by po'yi
+// * @Classname BeeConfig
+// * @Description 通用dao,实体类尽量使用pojo包下,其他实体类个别字段未和表对应
+// * @Date 2021/12/8 13:01
+// */
+//@Configuration
+//@Slf4j
+//public class BeeConfig {
+//	@Resource
+//	private DataSource dataSource;
+//
+//	@Bean
+//	public BeeFactory beeFactory() throws Exception {
+//		BeeFactory beeFactory = BeeFactory.getInstance();
+//		beeFactory.setDataSource(dataSource);
+//		return beeFactory;
+//	}
+//
+//	@Bean("suid")
+//	@DependsOn("beeFactory")
+//	public Suid beeSuid() {
+//		return BeeFactoryHelper.getSuid();
+//	}
+//
+//	@Bean("suidRich")
+//	@DependsOn("beeFactory")
+//	public SuidRich beeSuidRich() {
+//		return BeeFactory.getHoneyFactory().getSuidRich();
+//	}
+//
+//	@Bean("preparedSql")
+//	@DependsOn("beeFactory")
+//	public PreparedSql beePreparedSql() {
+//		return BeeFactory.getHoneyFactory().getPreparedSql();
+//	}
+//}

+ 4 - 6
bid/src/main/resources/application.yml

@@ -4,9 +4,9 @@ spring:
   application:
     name: bid-hk
   datasource:
-    url: ${DB_URL:jdbc:postgresql://192.168.50.10:15432/hobby_auction}
-    username: ${DB_USERNAME:poyee_auction}
-    password: ${DB_PASSWORD:Pass2025}
+    url: ${DB_URL:jdbc:postgresql://192.168.50.8:5432/ahx_auction}
+    username: ${DB_USERNAME:postgres}
+    password: ${DB_PASSWORD:123456}
 
   mvc:
     pathmatch:
@@ -53,9 +53,7 @@ forest:
   variables:
     appleUrl: https://appleid.apple.com/auth
 
-bee:
-  osql:
-    loggerType: slf4j
+
 
 hobbystocks:
   app-version: ${spring.profiles.active}

+ 11 - 19
lot/pom.xml

@@ -69,6 +69,7 @@
 		<dependency>
 			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-lang3</artifactId>
+            <version>3.18.0</version>
 		</dependency>
 		<dependency>
 			<groupId>com.github.pagehelper</groupId>
@@ -88,16 +89,12 @@
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>fastjson</artifactId>
-			<version>1.2.80</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.poi</groupId>
-			<artifactId>poi-ooxml</artifactId>
 		</dependency>
+
 		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpclient</artifactId>
-			<version>4.5.10</version>
+			<version>4.5.13</version>
 		</dependency>
 
 		<dependency>
@@ -127,13 +124,6 @@
 			<groupId>org.springframework</groupId>
 			<artifactId>spring-context-support</artifactId>
 		</dependency>
-
-		<!-- SpringWeb模块 -->
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-web</artifactId>
-		</dependency>
-
 		<!-- JSON工具类 -->
 		<dependency>
 			<groupId>com.fasterxml.jackson.core</groupId>
@@ -147,22 +137,23 @@
 		</dependency>
 
 		<!-- 文件上传工具类 -->
-		<dependency>
+<!--		<dependency>
 			<groupId>commons-fileupload</groupId>
 			<artifactId>commons-fileupload</artifactId>
-		</dependency>
+		</dependency>-->
 
 		<!-- yml解析器 -->
 		<dependency>
 			<groupId>org.yaml</groupId>
 			<artifactId>snakeyaml</artifactId>
-		</dependency>
+            <version>2.0</version>
+        </dependency>
 
 		<!-- Token生成与解析-->
-		<dependency>
+		<!--<dependency>
 			<groupId>io.jsonwebtoken</groupId>
 			<artifactId>jjwt</artifactId>
-		</dependency>
+		</dependency>-->
 
 		<!-- Jaxb -->
 		<dependency>
@@ -180,13 +171,14 @@
 		<dependency>
 			<groupId>javax.servlet</groupId>
 			<artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
 		</dependency>
 
 		<!--foest-->
 		<dependency>
 			<groupId>com.dtflys.forest</groupId>
 			<artifactId>forest-spring-boot-starter</artifactId>
-			<version>1.7.3</version>
+			<version>1.8.0</version>
 			<exclusions>
 				<exclusion>
 					<artifactId>httpclient-cache</artifactId>

+ 2 - 2
lot/src/main/java/cn/hobbystocks/auc/common/utils/reflect/ReflectUtils.java

@@ -12,7 +12,7 @@ import cn.hobbystocks.auc.common.core.text.Convert;
 import cn.hobbystocks.auc.common.utils.DateUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.Validate;
-import org.apache.poi.ss.usermodel.DateUtil;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -202,7 +202,7 @@ public class ReflectUtils
                         }
                         else
                         {
-                            args[i] = DateUtil.getJavaDate((Double) args[i]);
+                            args[i] = new Date((Long) args[i]);
                         }
                     }
                     else if (cs[i] == boolean.class || cs[i] == Boolean.class)

+ 38 - 22
lot/src/main/java/cn/hobbystocks/auc/domain/Auction.java

@@ -3,48 +3,64 @@ package cn.hobbystocks.auc.domain;
 import java.util.Date;
 
 import cn.hobbystocks.auc.common.core.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import lombok.ToString;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
 @ToString
+@TableName("auction")
 public class Auction extends BaseEntity {
     private static final long serialVersionUID = 1L;
-
+    //拍卖会id
+    @TableId
+    @TableField("id")
     private Long id;
-
-    private String no;
-
+//拍卖会名称
+    @TableField("name")
     private String name;
-
-    private String site;
-
+//拍卖会种类:1、标准拍卖;2、直播拍卖;3、混合拍卖
+    @TableField("type")
+    private Integer type;
+//拍卖会封面
+    @TableField("imgs")
     private String imgs;
-
+//拍卖会banner
+    @TableField("banner")
     private String banner;
-
-    private String attachment;
-
-    private String detail;
-
-    private String desData;
-
-    private String labels;
-
+//    保证金(元)
+    @TableField("deposit")
+    private Integer deposit;
+//    服务费(%)
+    @TableField("service_tariff")
+    private Integer serviceTariff;
+//    中拍支付时限(天)
+    @TableField("pay_time_limit")
+    private Integer payTimeLimit;
+//    拍卖会介绍
+    @TableField("description")
+    private String description;
+    @TableField("pub_status")
     private Integer pubStatus;
-
+    @TableField("pub_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date pubTime;
-
+    @TableField("status")
     private String status;
-
+//拍卖会开始时间
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField("start_time")
     private Date startTime;
-
+    //拍卖会结束时间
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField("end_time")
     private Date endTime;
-
+    @TableField("del_flag")
     private Integer delFlag;
 
 }

+ 42 - 0
lot/src/main/java/cn/hobbystocks/auc/dto/AuctionDTO.java

@@ -0,0 +1,42 @@
+package cn.hobbystocks.auc.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class AuctionDTO {
+
+    //拍卖会名称
+    private String name;
+    //拍卖会种类:1、标准拍卖;2、直播拍卖;3、混合拍卖
+    private Integer type;
+    //拍卖会封面
+    private String imgs;
+    //拍卖会banner
+    private String banner;
+    //    保证金(元)
+    private Integer deposit;
+    //    服务费(%)
+    private Integer serviceTariff;
+    //    中拍支付时限(天)
+    private Integer payTimeLimit;
+    //    拍卖会介绍
+    private String description;
+    //发布状态:0、未发布1、已上架2、已下架
+    private Integer pubStatus;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date pubTime;
+
+    private String status;
+    //拍卖会开始时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startTime;
+    //拍卖会结束时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endTime;
+
+    private Integer delFlag;
+}

+ 4 - 3
lot/src/main/java/cn/hobbystocks/auc/handle/impl/tradition/AbstractTraditionRuleHandler.java

@@ -10,9 +10,10 @@ import cn.hobbystocks.auc.handle.context.Live;
 import cn.hobbystocks.auc.handle.context.LiveContext;
 import cn.hobbystocks.auc.handle.context.tradition.TraditionLive;
 import cn.hobbystocks.auc.handle.context.tradition.TraditionRule;
+import cn.hutool.core.collection.CollectionUtil;
 import com.alibaba.fastjson.JSON;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.compress.utils.Sets;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -190,7 +191,7 @@ public abstract class AbstractTraditionRuleHandler implements RuleHandler {
         BigDecimal price = liveContext.getDbBid().getAmount();
         String currentStatus = getCurrentStatus(traditionLive);
 
-        if (Sets.newHashSet(Constants.LOT_STATUS_PASS, Constants.LOT_STATUS_SOLD).contains(currentStatus)) {
+        if (CollectionUtil.newHashSet(Constants.LOT_STATUS_PASS, Constants.LOT_STATUS_SOLD).contains(currentStatus)) {
             log.warn("add price fail {}", liveContext.getDbBid());
             liveContext.setError("拍卖已结束");
             return;
@@ -292,7 +293,7 @@ public abstract class AbstractTraditionRuleHandler implements RuleHandler {
         BigDecimal price = liveContext.getDbBid().getAmount();
         String currentStatus = getCurrentStatus(traditionLive);
 
-        if (Sets.newHashSet(Constants.LOT_STATUS_PASS, Constants.LOT_STATUS_SOLD).contains(currentStatus)) {
+        if (CollectionUtil.newHashSet(Constants.LOT_STATUS_PASS, Constants.LOT_STATUS_SOLD).contains(currentStatus)) {
             log.warn("add price fail {}", liveContext.getDbBid());
             liveContext.setError("拍卖已结束");
             return;

+ 2 - 1
lot/src/main/java/cn/hobbystocks/auc/mapper/AuctionMapper.java

@@ -2,10 +2,11 @@ package cn.hobbystocks.auc.mapper;
 
 
 import cn.hobbystocks.auc.domain.Auction;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 import java.util.List;
 
-public interface AuctionMapper {
+public interface AuctionMapper extends BaseMapper<Auction> {
 
     Auction selectAuctionById(Long id);
 

+ 2 - 1
lot/src/main/java/cn/hobbystocks/auc/service/IAuctionService.java

@@ -2,10 +2,11 @@ package cn.hobbystocks.auc.service;
 
 import cn.hobbystocks.auc.domain.Auction;
 import cn.hobbystocks.auc.vo.AuctionVO;
+import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.List;
 
-public interface IAuctionService
+public interface IAuctionService extends IService<Auction>
 {
     Auction selectAuctionById(Long id);
 

+ 2 - 1
lot/src/main/java/cn/hobbystocks/auc/service/impl/AuctionServiceImpl.java

@@ -10,6 +10,7 @@ import cn.hobbystocks.auc.domain.Auction;
 import cn.hobbystocks.auc.mapper.AuctionMapper;
 import cn.hobbystocks.auc.service.IAuctionService;
 import cn.hobbystocks.auc.vo.AuctionVO;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
@@ -27,7 +28,7 @@ import java.util.Objects;
 
 @Service
 @Slf4j
-public class AuctionServiceImpl implements IAuctionService
+public class AuctionServiceImpl extends ServiceImpl<AuctionMapper,Auction> implements IAuctionService
 {
     @Autowired
     private AuctionMapper auctionMapper;

+ 13 - 13
lot/src/main/resources/mapper/AuctionMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.hobbystocks.auc.mapper.AuctionMapper">
-    
+
     <resultMap type="cn.hobbystocks.auc.domain.Auction" id="AuctionResult">
         <result property="id"    column="id"    />
         <result property="no"    column="no"    />
@@ -29,8 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectAuctionVo">
         select
-            id, no, name, site, imgs, banner, attachment, detail, des_data,
-            labels, pub_status, pub_time, status, start_time, end_time,
+            id, no, name,type, imgs, banner, deposit, service_tariff, pay_time_limit,
+        description, pub_status, pub_time, status, start_time, end_time,
             del_flag, create_by, create_time, update_by, update_time
         from
             auction
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectAuctionList" parameterType="cn.hobbystocks.auc.domain.Auction" resultMap="AuctionResult">
         <include refid="selectAuctionVo"/>
-        <where>  
+        <where>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="site != null  and site != ''"> and site like concat('%', #{site}, '%')</if>
             <if test="imgs != null  and imgs != ''"> and imgs like concat('%', #{imgs}, '%')</if>
@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         AND status in ('Waiting','Starting')
         AND del_flag &lt;&gt; 1
     </select>
-    
+
     <select id="selectAuctionById" parameterType="Long" resultMap="AuctionResult">
         <include refid="selectAuctionVo"/>
         where id = #{id} and del_flag &lt;&gt; 1
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectAuctionVo"/>
         where no = #{no} and del_flag &lt;&gt; 1
     </select>
-        
+
     <insert id="insertAuction" parameterType="cn.hobbystocks.auc.domain.Auction">
         insert into auction
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -166,13 +166,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="no != null">no = #{no},</if>
             <if test="name != null">name = #{name},</if>
-            <if test="site != null">site = #{site},</if>
+            <if test="type != null">type = #{type},</if>
             <if test="imgs != null">imgs = #{imgs},</if>
             <if test="banner != null">banner = #{banner},</if>
-            <if test="attachment != null">attachment = #{attachment},</if>
-            <if test="detail != null">detail = #{detail},</if>
-            <if test="desData != null">des_data = #{desData},</if>
-            <if test="labels != null">labels = #{labels},</if>
+            <if test="deposit != null">deposit = #{deposit},</if>
+            <if test="serviceTariff != null">service_tariff = #{serviceTariff},</if>
+            <if test="payTimeLimit != null">pay_time_limit = #{payTimeLimit},</if>
+            <if test="description != null and description!=''">description = #{description},</if>
             <if test="pubStatus != null">pub_status = #{pubStatus},</if>
             <if test="pubTime != null">pub_time = #{pubTime},</if>
             <if test="status != null">status = #{status},</if>
@@ -192,10 +192,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteAuctionByIds" parameterType="String">
-        delete from auction where id in 
+        delete from auction where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
 
-</mapper>
+</mapper>

+ 2 - 2
lot/src/main/resources/mybatis/mybatis-config.xml

@@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
 		<!-- 指定 MyBatis 所用日志的具体实现 -->
         <setting name="logImpl"                  value="SLF4J"  />
         <!-- 使用驼峰命名法转换字段 -->
-		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+		 <setting name="mapUnderscoreToCamelCase" value="true"/>
 	</settings>
-	
+
 </configuration>

+ 9 - 9
pom.xml

@@ -22,12 +22,12 @@
 		<kaptcha.version>2.3.2</kaptcha.version>
 		<mybatis-plus-spring-boot.version>3.5.14</mybatis-plus-spring-boot.version>
 		<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
-		<fastjson.version>1.2.80</fastjson.version>
+		<fastjson.version>1.2.83</fastjson.version>
 		<oshi.version>6.1.6</oshi.version>
-		<commons.io.version>2.11.0</commons.io.version>
+		<commons.io.version>2.19.0</commons.io.version>
 		<commons.fileupload.version>1.4</commons.fileupload.version>
-		<commons.collections.version>3.2.2</commons.collections.version>
-		<poi.version>4.1.2</poi.version>
+		<commons.collections.version>4.5.0</commons.collections.version>
+
 		<velocity.version>2.3</velocity.version>
 		<jwt.version>0.9.1</jwt.version>
 		<bee.version>1.17</bee.version>
@@ -41,7 +41,7 @@
 			<dependency>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-dependencies</artifactId>
-				<version>2.5.13</version>
+				<version>2.5.15</version>
 				<type>pom</type>
 				<scope>import</scope>
 			</dependency>
@@ -108,7 +108,7 @@
 			<!-- collections工具类 -->
 			<dependency>
 				<groupId>commons-collections</groupId>
-				<artifactId>commons-collections</artifactId>
+				<artifactId>commons-collections4</artifactId>
 				<version>${commons.collections.version}</version>
 			</dependency>
 
@@ -120,11 +120,11 @@
 			</dependency>
 
 			<!-- Token生成与解析 -->
-			<dependency>
+			<!--<dependency>
 				<groupId>io.jsonwebtoken</groupId>
 				<artifactId>jjwt</artifactId>
 				<version>${jwt.version}</version>
-			</dependency>
+			</dependency>-->
 
 			<!-- 验证码 -->
 			<dependency>
@@ -160,7 +160,7 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.1</version>
+				<version>3.13.0</version>
 				<configuration>
 					<source>${java.version}</source>
 					<target>${java.version}</target>