Authored by qinchao

Merge branch 'test6.9.2' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.2

... ... @@ -8,6 +8,8 @@ public interface SecondhandInfoMapper {
int insert(@Param("record")SecondhandInfo record);
int updateStatus(@Param("skup") Integer skup, @Param("status") Integer status);
SecondhandInfo selectBySkup(Integer skup);
}
\ No newline at end of file
... ...
... ... @@ -23,4 +23,8 @@
select * from secondhand_info where skup = #{skup}
</select>
<update id="updateStatus">
update secondhand_info set status = #{status,jdbcType=INTEGER}
where skup = #{skup,jdbcType=INTEGER} and status=0
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -26,4 +26,5 @@ public class SecondHandProductResp {
/** 全新瑕疵,二手. */
private String sechondHandTypeName;
private String soldTime;
private int status;
}
... ...
... ... @@ -417,6 +417,11 @@ public class ProductServiceImpl implements ProductService {
if (storagePriceMapper.updateStatus(skup, status, 0) == 0) {
throw new ServiceException(400, "商品(skup)状态已变更");
}
if (status == 10) {
if (secondhandInfoMapper.updateStatus(skup, 10) == 0) {
throw new ServiceException(400, "商品(skup)改成待审核失败,状态已变更");
}
}
} else {
if (storagePriceMapper.updateStatus(skup, status, 1) == 0) {
throw new ServiceException(400, "商品(skup)状态已变更");
... ... @@ -1228,6 +1233,7 @@ public class ProductServiceImpl implements ProductService {
bean.setSkup(sp.getSkup());
bean.setPrice(sp.getPrice().toString());
bean.setSechondHandTypeName(sp.getPreSaleFlag() == 5 ? "全新瑕疵" : "二手");
bean.setStatus(sp.getStatus());
Storage storage = storageMap.get(sp.getStorageId());
if (storage != null) {
Size size = sizeMap.get(storage.getSizeId());
... ...