Skip to content

Commit

Permalink
Fix bug buyproduct, myitems
Browse files Browse the repository at this point in the history
구매한 상품에대해 평가버튼이 나오도록 수정, 안팔리고 시간이 지난 상품이 경매중상품에 안나오도록 수정
  • Loading branch information
deokisys committed Dec 19, 2019
1 parent 427f4a0 commit fb6051a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Organism/TradeListBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Component = props => {
/>
<ReportButton userId={props.targetId} productId={props.id} text={"구매자 신고"} />
</div>
) : props.status === "판매" ? (
) : props.status === "구매" ? (
<div>
{rateCheck || props.buyerCheck ? (
"평가완료"
Expand Down
7 changes: 4 additions & 3 deletions server/src/repositories/ProductRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
Not,
IsNull,
MoreThan,
MoreThanOrEqual
MoreThanOrEqual,
LessThan
} from "typeorm";
import { ProductsDTO } from "../dto/ProductDTO";
import { Products } from "../models/Products";
Expand Down Expand Up @@ -50,8 +51,8 @@ export class ProductRepository {
select: ["id", "title", "thumbnailUrl", "immediatePrice", "registerDate"],
where: {
seller: userId,
soldDate: null,
auctionDeadline: MoreThanOrEqual(new Date())
soldDate: IsNull(),
extensionDate: MoreThan(Today())
},
order: {
id: "DESC"
Expand Down

0 comments on commit fb6051a

Please sign in to comment.