linhui.li 3 тижнів тому
батько
коміт
8efc07a7fa

+ 5 - 2
auc/src/main/java/cn/hobbystocks/auc/web/LotController.java

@@ -106,7 +106,10 @@ public class LotController extends AdminBaseController {
 //	@RequireRoles({UserType.USER_ROLE_ADMIN})
 	public AjaxResult editSave(@RequestBody LotVO lot) {
 		Lot dbLot = lotService.selectLotById(lot.getId());
-		lot.setUpdateBy(getUsername());
+		if (dbLot==null)
+		    return AjaxResult.error("请传入拍品id");
+		//todo 用户服务不可用先注释掉
+//		lot.setUpdateBy(getUsername());
 		if (Constants.PUB_STATUS_PUBLISHED.equals(dbLot.getPubStatus())) {
 			lotService.updateLotEx(lot);
 			syncService.syncLot(lot.getId());
@@ -142,7 +145,7 @@ public class LotController extends AdminBaseController {
 		Lot dbLot = lotService.selectLotById(lot.getId());
 		if (Objects.equals(Constants.PUB_STATUS_PUBLISHED, dbLot.getPubStatus()))
 			return AjaxResult.error("拍品已发布不能再次发布");
-		Auction dbAuction = auctionService.selectAuctionById(lot.getAuctionId());
+		Auction dbAuction = auctionService.selectAuctionById(dbLot.getAuctionId());
 		if (Objects.equals(Constants.PUB_STATUS_NO_PUBLISHED, dbAuction.getPubStatus()))
 			return AjaxResult.error("拍卖会还未发布");
 		if (Objects.equals(Constants.GROUP_STATUS_FINISH, dbAuction.getStatus()))