Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
bc3fcaff
Commit
bc3fcaff
authored
Sep 04, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交换商品
parent
f0290e0a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
18 deletions
+181
-18
ch-core/src/main/java/com/wwdz/ch/core/type/Result.java
ch-core/src/main/java/com/wwdz/ch/core/type/Result.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ExchangeOrderSnapshot.java
...wwdz/ch/db/domain/distribution/ExchangeOrderSnapshot.java
+11
-3
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ExchangeOrderSnapshotExample.java
.../db/domain/distribution/ExchangeOrderSnapshotExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ExchangeOrderSnapshotMapper.java
...h/db/mapper/distribution/ExchangeOrderSnapshotMapper.java
+0
-1
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ExchangeOrderSnapshotMapper.xml
...ch/db/mapper/distribution/ExchangeOrderSnapshotMapper.xml
+30
-13
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
+7
-0
No files found.
ch-core/src/main/java/com/wwdz/ch/core/type/Result.java
View file @
bc3fcaff
...
...
@@ -75,7 +75,7 @@ public class Result<T> implements Entity {
}
public
static
<
T
>
Result
<
T
>
failed
(
Integer
code
,
String
msg
)
{
return
new
Result
<>(
code
,
false
,
msg
,
null
);
return
new
Result
<>(
code
,
false
,
msg
,
null
);
}
public
static
<
T
>
Result
<
T
>
failed
(
ResultCode
resultCode
)
{
return
new
Result
<>(
resultCode
.
getCode
(),
false
,
resultCode
.
getMessage
(),
null
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ExchangeOrderSnapshot.java
View file @
bc3fcaff
package
com.wwdz.ch.db.domain.distribution
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/09/0
3
* @date 2024/09/0
4
*/
@Data
public
class
ExchangeOrderSnapshot
implements
Entity
{
private
Integer
id
;
/**
...
...
@@ -91,6 +90,11 @@ public class ExchangeOrderSnapshot implements Entity {
*/
private
Date
updateTime
;
/**
* 是否有效
*/
private
Boolean
isValid
;
/**
* 商品图片,分号分隔
*/
...
...
@@ -130,6 +134,7 @@ public class ExchangeOrderSnapshot implements Entity {
sb
.
append
(
", signedTime="
).
append
(
signedTime
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isValid="
).
append
(
isValid
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", videos="
).
append
(
videos
);
sb
.
append
(
", description="
).
append
(
description
);
...
...
@@ -166,6 +171,7 @@ public class ExchangeOrderSnapshot implements Entity {
&&
(
this
.
getSignedTime
()
==
null
?
other
.
getSignedTime
()
==
null
:
this
.
getSignedTime
().
equals
(
other
.
getSignedTime
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getIsValid
()
==
null
?
other
.
getIsValid
()
==
null
:
this
.
getIsValid
().
equals
(
other
.
getIsValid
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getVideos
()
==
null
?
other
.
getVideos
()
==
null
:
this
.
getVideos
().
equals
(
other
.
getVideos
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()));
...
...
@@ -191,6 +197,7 @@ public class ExchangeOrderSnapshot implements Entity {
result
=
prime
*
result
+
((
getSignedTime
()
==
null
)
?
0
:
getSignedTime
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsValid
()
==
null
)
?
0
:
getIsValid
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getVideos
()
==
null
)
?
0
:
getVideos
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
...
...
@@ -221,6 +228,7 @@ public class ExchangeOrderSnapshot implements Entity {
signedTime
(
"signed_time"
,
"signedTime"
,
"TIMESTAMP"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
videos
(
"videos"
,
"videos"
,
"LONGVARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"LONGVARCHAR"
,
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/distribution/ExchangeOrderSnapshotExample.java
View file @
bc3fcaff
...
...
@@ -2299,6 +2299,138 @@ public class ExchangeOrderSnapshotExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidIsNull
()
{
addCriterion
(
"is_valid is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidIsNotNull
()
{
addCriterion
(
"is_valid is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_valid ="
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidEqualToColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidNotEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_valid <>"
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidNotEqualToColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidGreaterThan
(
Boolean
value
)
{
addCriterion
(
"is_valid >"
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidGreaterThanColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidGreaterThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_valid >="
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidGreaterThanOrEqualToColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidLessThan
(
Boolean
value
)
{
addCriterion
(
"is_valid <"
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidLessThanColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidLessThanOrEqualTo
(
Boolean
value
)
{
addCriterion
(
"is_valid <="
,
value
,
"isValid"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIsValidLessThanOrEqualToColumn
(
ExchangeOrderSnapshot
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_valid <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_valid in"
,
values
,
"isValid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidNotIn
(
List
<
Boolean
>
values
)
{
addCriterion
(
"is_valid not in"
,
values
,
"isValid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_valid between"
,
value1
,
value2
,
"isValid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsValidNotBetween
(
Boolean
value1
,
Boolean
value2
)
{
addCriterion
(
"is_valid not between"
,
value1
,
value2
,
"isValid"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/distribution/ExchangeOrderSnapshotMapper.java
View file @
bc3fcaff
...
...
@@ -7,7 +7,6 @@ import java.util.List;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ExchangeOrderSnapshotMapper
{
long
countByExample
(
ExchangeOrderSnapshotExample
example
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/distribution/ExchangeOrderSnapshotMapper.xml
View file @
bc3fcaff
...
...
@@ -18,6 +18,7 @@
<result
column=
"signed_time"
jdbcType=
"TIMESTAMP"
property=
"signedTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"is_valid"
jdbcType=
"BIT"
property=
"isValid"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot"
>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
...
...
@@ -85,7 +86,7 @@
<sql
id=
"Base_Column_List"
>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time
delivery_time, signed_time, create_time, update_time
, is_valid
</sql>
<sql
id=
"Blob_Column_List"
>
images, videos, description
...
...
@@ -142,8 +143,8 @@
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, i
mages, videos, description
delivery_time, signed_time, create_time, update_time, i
s_valid, images, videos,
description
</otherwise>
</choose>
from exchange_order_snapshot
...
...
@@ -178,8 +179,8 @@
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, i
mages, videos, description
delivery_time, signed_time, create_time, update_time, i
s_valid, images, videos,
description
</otherwise>
</choose>
from exchange_order_snapshot
...
...
@@ -204,15 +205,15 @@
stock, distribution_price, official_estimated_price,
creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time,
update_time, i
mages, video
s,
description)
update_time, i
s_valid, image
s,
videos,
description)
values (#{distributionOrderId,jdbcType=VARCHAR}, #{exchangeItemId,jdbcType=BIGINT},
#{itemId,jdbcType=BIGINT}, #{itemName,jdbcType=VARCHAR}, #{itemNum,jdbcType=INTEGER},
#{stock,jdbcType=INTEGER}, #{distributionPrice,jdbcType=BIGINT}, #{officialEstimatedPrice,jdbcType=BIGINT},
#{creatorId,jdbcType=BIGINT}, #{logisticsCode,jdbcType=VARCHAR}, #{waybill,jdbcType=VARCHAR},
#{deliveryTime,jdbcType=TIMESTAMP}, #{signedTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{i
mages,jdbcType=LONGVARCHAR}, #{video
s,jdbcType=LONGVARCHAR},
#{description,jdbcType=LONGVARCHAR})
#{updateTime,jdbcType=TIMESTAMP}, #{i
sValid,jdbcType=BIT}, #{image
s,jdbcType=LONGVARCHAR},
#{
videos,jdbcType=LONGVARCHAR}, #{
description,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
...
@@ -265,6 +266,9 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isValid != null"
>
is_valid,
</if>
<if
test=
"images != null"
>
images,
</if>
...
...
@@ -321,6 +325,9 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isValid != null"
>
#{isValid,jdbcType=BIT},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -389,6 +396,9 @@
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isValid != null"
>
is_valid = #{record.isValid,jdbcType=BIT},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -421,6 +431,7 @@
signed_time = #{record.signedTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_valid = #{record.isValid,jdbcType=BIT},
images = #{record.images,jdbcType=LONGVARCHAR},
videos = #{record.videos,jdbcType=LONGVARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
...
...
@@ -445,7 +456,8 @@
delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{record.signedTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_valid = #{record.isValid,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -498,6 +510,9 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isValid != null"
>
is_valid = #{isValid,jdbcType=BIT},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -527,6 +542,7 @@
signed_time = #{signedTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_valid = #{isValid,jdbcType=BIT},
images = #{images,jdbcType=LONGVARCHAR},
videos = #{videos,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
...
...
@@ -548,7 +564,8 @@
delivery_time = #{deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{signedTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample"
resultMap=
"BaseResultMap"
>
...
...
@@ -606,8 +623,8 @@
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, i
mages, videos, description
delivery_time, signed_time, create_time, update_time, i
s_valid, images, videos,
description
</otherwise>
</choose>
from exchange_order_snapshot
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/ExchangeServiceImpl.java
View file @
bc3fcaff
...
...
@@ -78,11 +78,18 @@ public class ExchangeServiceImpl implements ExchangeService {
public
Result
findItemList
(
ExchangeRequestDto
dto
)
{
try
{
SupplierItemRequestDto
supplierItemRequestDto
=
new
SupplierItemRequestDto
();
//必须要有官方预估价
supplierItemRequestDto
.
setOfficialEstimatedPriceNotNull
(
true
);
supplierItemRequestDto
.
setPage
(
dto
.
getPage
());
supplierItemRequestDto
.
setLimit
(
dto
.
getLimit
());
List
<
SupplierItem
>
supplierItemList
=
new
ArrayList
<>();
PageInfo
pageInfo
=
null
;
Long
targetUserId
=
dto
.
getUserId
();
//查询用户已经交换的商品,在列表中去除
// List<ExchangeOrderSnapshot> exchangeOrderSnapshotList = exchangeOrderSnapshotDao.findByOrderId();
//标签id为空则查询所有的藏品
if
(
dto
.
getCollectionBookId
()
==
null
)
{
//查询所有的上传藏品
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment