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
Email Patches
Plain Diff
Browse Files
Authored by
mali
7 years ago
Commit
0ec2a82a20a9665b6fe09cffa75ed252d947d703
1 parent
06cadcc3
增加尺码id
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
20 deletions
dal/src/main/java/com/yoho/ufo/dal/model/StoragePrice.java
dal/src/main/resources/META-INF/mybatis/ProductMapper.xml
dal/src/main/resources/META-INF/mybatis/StoragePriceMapper.xml
product/src/main/java/com/yoho/ufo/convert/ProductConvertService.java
product/src/main/java/com/yoho/ufo/service/ISizeService.java
product/src/main/java/com/yoho/ufo/service/impl/ProductServiceImpl.java
product/src/main/java/com/yoho/ufo/service/impl/SizeServiceImpl.java
web/src/main/webapp/html/goods/storage/storageDetail.html
web/src/main/webapp/html/goods/storage/storageList.html
dal/src/main/java/com/yoho/ufo/dal/model/StoragePrice.java
View file @
0ec2a82
...
...
@@ -25,6 +25,8 @@ public class StoragePrice {
private
Integer
createTime
;
private
Integer
sizeId
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -112,4 +114,12 @@ public class StoragePrice {
public
void
setCreateTime
(
Integer
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getSizeId
()
{
return
sizeId
;
}
public
void
setSizeId
(
Integer
sizeId
)
{
this
.
sizeId
=
sizeId
;
}
}
\ No newline at end of file
...
...
dal/src/main/resources/META-INF/mybatis/ProductMapper.xml
View file @
0ec2a82
...
...
@@ -179,7 +179,7 @@
</select>
<select
id=
"selectProductStorageList"
resultMap=
"BaseResultMap"
>
select id, brand_id, product_name
select id, brand_id, product_name
, max_sort_id, mid_sort_id
from product p
where
<include
refid=
"skcPageCondition"
/>
limit #{start},#{rows}
</select>
...
...
dal/src/main/resources/META-INF/mybatis/StoragePriceMapper.xml
View file @
0ec2a82
...
...
@@ -109,32 +109,33 @@
</select>
<select
id=
"selectStoragePriceCount"
resultType=
"java.lang.Integer"
>
select count(*) from storage_price
where
<include
refid=
"skupPageCondition2"
/>
select count(*) from storage_price
sp, storage s where sp.storage_id = s.id
<include
refid=
"skupPageCondition2"
/>
</select>
<select
id=
"selectStoragePriceList"
resultMap=
"BaseResultMap"
>
select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
update_time, create_time
from storage_price
where
<include
refid=
"skupPageCondition2"
/>
limit #{start},#{rows}
from storage_price sp, storage s where sp.storage_id = s.id
<include
refid=
"skupPageCondition2"
/>
limit #{start},#{rows}
</select>
<sql
id=
"skupPageCondition2"
>
1 = 1
<if
test=
"storagePrice.status != null and storagePrice.status > -1"
>
and status = #{storagePrice.status}
and s
p.s
tatus = #{storagePrice.status}
</if>
<if
test=
"storagePrice.storageId != null and storagePrice.storageId > 0"
>
and storage_id = #{storagePrice.storageId}
and s
p.s
torage_id = #{storagePrice.storageId}
</if>
<if
test=
"storagePrice.sellerUid != null and storagePrice.sellerUid > 0"
>
and seller_uid = #{storagePrice.sellerUid}
and s
p.s
eller_uid = #{storagePrice.sellerUid}
</if>
<if
test=
"storagePrice.productId != null and storagePrice.productId > 0"
>
and product_id = #{storagePrice.productId}
and
sp.
product_id = #{storagePrice.productId}
</if>
<if
test=
"storagePrice.skup != null and storagePrice.skup > 0"
>
and skup = #{storagePrice.skup}
and sp.skup = #{storagePrice.skup}
</if>
<if
test=
"storagePrice.sizeId != null and storagePrice.sizeId > 0"
>
and s.size_id = #{storagePrice.sizeId}
</if>
</sql>
...
...
product/src/main/java/com/yoho/ufo/convert/ProductConvertService.java
View file @
0ec2a82
...
...
@@ -23,6 +23,7 @@ public class ProductConvertService {
storagePrice
.
setStatus
(
bo
.
getStatus
());
storagePrice
.
setStorageId
(
bo
.
getStorageId
());
storagePrice
.
setSkup
(
bo
.
getSkup
());
storagePrice
.
setSizeId
(
bo
.
getSizeId
());
return
storagePrice
;
}
...
...
@@ -50,6 +51,8 @@ public class ProductConvertService {
bo
.
setSkup
(
productItem
.
getSkup
());
bo
.
setStorageId
(
productItem
.
getStorageId
());
bo
.
setSellerUid
(
productItem
.
getSellerUid
());
bo
.
setMaxSortId
(
productItem
.
getMaxSortId
());
bo
.
setMidSortId
(
productItem
.
getMidSortId
());
bo
.
setId
(
productItem
.
getId
());
bo
.
setBrandId
(
productItem
.
getBrandId
());
bo
.
setProductName
(
productItem
.
getProductName
());
...
...
product/src/main/java/com/yoho/ufo/service/ISizeService.java
View file @
0ec2a82
...
...
@@ -36,7 +36,7 @@ public interface ISizeService {
PageResponseBO
<
SizeResponseBo
>
getSizePageList
(
SizeRequestBo
sizeRequestBo
);
/**
* 查询所有的
颜色
,下拉框使用
* 查询所有的
尺码
,下拉框使用
* @return
*/
List
<
JSONObject
>
queryAllSize4Goods
(
Integer
sortId
);
...
...
product/src/main/java/com/yoho/ufo/service/impl/ProductServiceImpl.java
View file @
0ec2a82
...
...
@@ -494,6 +494,11 @@ public static void main(String[] args) {
storageMapper
.
addStorageNum
(
sp
.
getStorageId
(),
-
1
);
return
new
ApiResponse
<>(
400
,
"操作成功"
);
}
// TODO 发推送给商家端
// TODO 调用银联接口退保证金
return
new
ApiResponse
<>(
400
,
"SKUP取消失败,状态已变更!"
);
}
...
...
product/src/main/java/com/yoho/ufo/service/impl/SizeServiceImpl.java
View file @
0ec2a82
...
...
@@ -69,7 +69,7 @@ public class SizeServiceImpl implements ISizeService {
}
/**
* 查询所有的
颜色
,下拉框使用
* 查询所有的
尺码
,下拉框使用
* @return
*/
public
List
<
JSONObject
>
queryAllSize4Goods
(
Integer
sortId
)
{
...
...
web/src/main/webapp/html/goods/storage/storageDetail.html
View file @
0ec2a82
...
...
@@ -22,6 +22,7 @@
<input
id=
"SKUP"
type=
"text"
>
<input
id=
"sellerUid"
type=
"text"
>
<input
id=
"storageId"
type=
"text"
>
<input
id=
"sizeId"
type=
"text"
>
<a
id=
"searchLinkButton"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
筛选
</a>
<a
id=
"searchAllLinkButton"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
全部
</a>
...
...
@@ -49,15 +50,16 @@
}
$
(
function
()
{
var
productId
=
parseURL
(
window
.
location
.
href
).
productId
;
var
midSortId
=
parseURL
(
window
.
location
.
href
).
midSortId
;
$
(
'#returnList'
).
linkbutton
({
onClick
:
function
()
{
location
.
href
=
contextPath
+
"/html/goods/storage/storageList.html"
;
}
});
// /** 1:可售,2卖出,3鉴定失败,4卖家取消, 5客服取消. */
$
(
"#status"
).
myCombobox
({
prompt
:
"
请选择
"
,
prompt
:
"
状态
"
,
width
:
200
,
data
:
[{
id
:
'1'
,
text
:
'待付保证金'
},
{
id
:
'2'
,
text
:
'卖家取消支付'
},
{
id
:
'2'
,
text
:
'卖家支付超时'
},
{
id
:
'2'
,
text
:
'出售中'
}
,
{
id
:
'2'
,
text
:
'卖家取消出售'
},
{
id
:
'2'
,
text
:
'平台取消出售'
},
{
id
:
'2'
,
text
:
'已出售'
}],
...
...
@@ -76,6 +78,24 @@
prompt
:
"SKU"
});
$
.
ajax
({
contentType
:
"application/json"
,
dataType
:
"json"
,
type
:
"GET"
,
url
:
contextPath
+
'/size/queryAllSize4Goods?sortId='
+
midSortId
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
||
!
data
.
data
||
data
.
data
.
length
==
0
)
{
return
;
}
$
(
"#sizeId"
).
myCombobox
({
prompt
:
"尺码"
,
width
:
200
,
data
:
data
.
data
,
valueField
:
"id"
,
textField
:
"text"
});
}
});
$
(
"#skupTable"
).
myDatagrid
({
fit
:
true
,
...
...
@@ -185,6 +205,7 @@
$
(
'#SKUP'
).
combobox
(
'clear'
);
$
(
'#sellerUid'
).
textbox
(
'clear'
);
$
(
'#storageId'
).
textbox
(
'clear'
);
$
(
'#sizeId'
).
combobox
(
'clear'
);
var
param
=
{};
$
(
"#skupTable"
).
myDatagrid
(
"load"
,
param
);
}
...
...
@@ -202,7 +223,8 @@
var
skup
=
$
(
'#SKUP'
).
textbox
(
'getValue'
);
var
sellerUid
=
$
(
'#sellerUid'
).
textbox
(
'getValue'
);
var
storageId
=
$
(
'#storageId'
).
textbox
(
'getValue'
);
var
param
=
{
'productId'
:
productId
};
var
sizeId
=
$
(
'#sizeId'
).
textbox
(
'getValue'
);
var
param
=
{
'id'
:
productId
};
if
(
undefined
!==
status
&&
null
!==
status
&&
""
!==
status
)
{
param
.
status
=
status
;
}
...
...
@@ -211,9 +233,13 @@
}
if
(
undefined
!==
sellerUid
&&
null
!==
sellerUid
&&
""
!==
sellerUid
)
{
param
.
sellerUid
=
sellerUid
;
}
if
(
undefined
!==
storageId
&&
null
!==
storageId
&&
""
!==
storageId
)
{
}
if
(
undefined
!==
storageId
&&
null
!==
storageId
&&
""
!==
storageId
)
{
param
.
storageId
=
storageId
;
}
if
(
undefined
!==
sizeId
&&
null
!==
sizeId
&&
""
!==
sizeId
)
{
param
.
sizeId
=
sizeId
;
}
return
param
;
}
...
...
web/src/main/webapp/html/goods/storage/storageList.html
View file @
0ec2a82
...
...
@@ -125,7 +125,7 @@
width
:
40
,
align
:
"center"
,
formatter
:
function
(
value
,
rowData
)
{
var
str
=
"<a role='edit' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px'>库存详情</a>"
;
var
str
=
"<a role='edit' dataId='"
+
rowData
.
id
+
"'
sortid = '"
+
rowData
.
midSortId
+
"'
style='margin-left:10px'>库存详情</a>"
;
return
str
;
}
}]],
...
...
@@ -141,7 +141,8 @@
iconCls
:
"icon-edit"
,
onClick
:
function
()
{
var
id
=
$
(
this
).
attr
(
"dataId"
);
detailStorage
(
id
);
var
midSortId
=
$
(
this
).
attr
(
"midSortId"
);
detailStorage
(
id
,
midSortId
);
}
});
}
...
...
@@ -227,8 +228,8 @@
}
function
detailStorage
(
id
)
{
this
.
location
.
href
=
contextPath
+
"/html/goods/storage/storageDetail.html?productId="
+
id
;
function
detailStorage
(
id
,
midSortId
)
{
this
.
location
.
href
=
contextPath
+
"/html/goods/storage/storageDetail.html?productId="
+
id
+
"&midSortId="
+
midSortId
;
}
});
...
...
Please
register
or
login
to post a comment