Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
ufo-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
caoyan
6 years ago
Commit
cfb51c8fcdf8e6b7ff5f974bfafc57ffb97e992b
2 parents
e54863ec
62aa599e
Merge branch 'dev_确认收货优化' of
http://git.yoho.cn/ufo/ufo-platform
into dev_确认收货优化
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
dal/src/main/java/com/yoho/ufo/dal/StorageMapper.java
dal/src/main/resources/META-INF/mybatis/SelfSizeMapper.xml
dal/src/main/resources/META-INF/mybatis/StorageMapper.xml
product/src/main/java/com/yoho/ufo/service/impl/SelfSizeServiceImpl.java
dal/src/main/java/com/yoho/ufo/dal/StorageMapper.java
View file @
cfb51c8
...
...
@@ -39,4 +39,6 @@ public interface StorageMapper {
int
updateDeleteSuggestPrice
();
int
updateSkuStatus
(
@Param
(
"storageId"
)
Integer
storageId
,
@Param
(
"status"
)
Integer
status
);
Storage
selectBySize
(
@Param
(
"productId"
)
Integer
productId
,
@Param
(
"sizeId"
)
Integer
sizeId
);
}
\ No newline at end of file
...
...
dal/src/main/resources/META-INF/mybatis/SelfSizeMapper.xml
View file @
cfb51c8
...
...
@@ -61,7 +61,7 @@
<update
id=
"upadteAuditResult"
>
update self_size set status=#{status}, audit_time=unix_timestamp(), audit_uid=#{auditUid}
where id=#{id}
where id=#{id}
and status=0
</update>
</mapper>
\ No newline at end of file
...
...
dal/src/main/resources/META-INF/mybatis/StorageMapper.xml
View file @
cfb51c8
...
...
@@ -113,4 +113,8 @@
<update
id=
"updateSkuStatus"
>
UPDATE storage s set s.status = #{status, jdbcType=INTEGER} where s.id = #{storageId, jdbcType=INTEGER}
</update>
<select
id=
"selectBySize"
resultMap=
"BaseResultMap"
>
select id, product_id, goods_id, size_id, storage_num, update_time, create_time, suggest_low_price, suggest_high_price
from storage where product_id=#{productId} and size_id=#{sizeId}
</select>
</mapper>
\ No newline at end of file
...
...
product/src/main/java/com/yoho/ufo/service/impl/SelfSizeServiceImpl.java
View file @
cfb51c8
...
...
@@ -217,8 +217,10 @@ public class SelfSizeServiceImpl implements ISelfSizeService {
clearProductDetailCache
(
selfSize
.
getProductId
());
if
(
num
>
0
&&
req
.
getStatus
().
intValue
()
==
1
)
{
//审核通过
//添加尺码到storage表
saveStorage
(
selfSize
);
//添加尺码到storage表
if
(
storageMapper
.
selectBySize
(
selfSize
.
getProductId
(),
selfSize
.
getSizeId
())
==
null
)
{
saveStorage
(
selfSize
);
}
Product
product
=
productMapper
.
selectByPrimaryKey
(
selfSize
.
getProductId
());
Size
size
=
ufoSizeMapper
.
selectOneById
(
selfSize
.
getSizeId
());
...
...
@@ -239,11 +241,11 @@ public class SelfSizeServiceImpl implements ISelfSizeService {
inboxService
.
sendSmsMessage
(
smsReq
);
}
}
return
num
;
return
1
;
}
private
int
saveStorage
(
SelfSize
selfSize
)
{
Storage
record
=
new
Storage
();
Storage
record
=
new
Storage
();
record
.
setProductId
(
selfSize
.
getProductId
());
record
.
setGoodsId
(
selfSize
.
getGoodsId
());
record
.
setSizeId
(
selfSize
.
getSizeId
());
...
...
Please
register
or
login
to post a comment