Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
a201855f
Commit
a201855f
authored
Sep 17, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
c42fa157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
GoodsSql.java
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
+89
-0
No files found.
src/main/java/com/egolm/shop/service/impl/GoodsSql.java
View file @
a201855f
...
...
@@ -8,6 +8,95 @@ import com.egolm.shop.pojo.TShop;
import
com.egolm.shop.util.ShopContstrant
;
public
class
GoodsSql
{
/**
* 查询商品详情
* @Title: goodsInfoSql
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param: @param customer
* @param: @param shop
* @param: @param goodsID
* @param: @return
* @return: String
* @throws
*/
public
static
String
goodsInfoSql
(
TCustomer
customer
,
Map
<
String
,
Object
>
map
)
{
String
goodsID
=(
String
)
map
.
get
(
"goodsID"
);
String
contractNO
=(
String
)
map
.
get
(
"contractNO"
);
TShop
tshop
=
customer
.
gettShops
().
get
(
0
);
String
goodInfoSql
=
""
;
if
(
customer
.
getsCustLeveTypeID
().
equals
(
ShopContstrant
.
GUEST_LEVEL_TYPE_ID
))
{
//游客
goodInfoSql
=
"SELECT TOP 1 "
+
" goodsID = g.nGoodsID, "
+
" goodsNO = g.sGoodsNO, "
+
" goodsName = g.sGoodsDesc, "
+
" contractNO = g.sAgentContractNO, "
+
" agentName=g.sAgentName,"
+
" categoryID = g.sCategoryNO, "
+
" tag=g.nTag, "
+
" barcode = g.sMainBarcode, "
+
" brandID = g.sBrandID, "
+
" brand = g.sBrand, "
+
" spec = g.sSpec, "
+
" minSaleQty = g.nMinSaleQty, "
+
" saleUnits = g.nSaleUnits, "
+
" orderUnits = g.nSaleUnits, "
+
" goodsUnit = g.sMarketUnit, "
+
" agentUnit = g.sUnit, "
+
" marketPrice = g.nMarketPrice, "
+
" salePrice = g.nSalePrice, "
+
" realSalePrice =g.nRealSalePrice, "
+
" DCPriority = g.nDCPriority, "
+
" stock = g.nStockQty, "
+
" imgPath = g.sURL, "
+
" flavor = g.Flavor,"
+
" caseUnits=g.nCaseUnits"
+
" FROM "
+
" V_DistrictGoods g "
+
" WHERE "
+
" g.nGoodsID = "
+
goodsID
+
" "
+
" AND g.sDistrictID='"
+
tshop
.
getsDistrictID
()+
"' AND (g.sOrgNO='"
+
tshop
.
getsOrgNO
()+
"' or g.sOrgNO='china') "
+
" AND g.nTag&1=0 "
;
}
else
{
goodInfoSql
=
"SELECT TOP 1 "
+
" goodsID = g.nGoodsID, "
+
" goodsNO = g.sGoodsNO, "
+
" goodsName = g.sGoodsDesc, "
+
" contractNO = g.sAgentContractNO, "
+
" agentName=g.sAgentName,"
+
" categoryID = g.sCategoryNO, "
+
" tag=g.nTag, "
+
" barcode = g.sMainBarcode, "
+
" brandID = g.sBrandID, "
+
" brand = g.sBrand, "
+
" spec = g.sSpec, "
+
" minSaleQty = g.nMinSaleQty, "
+
" saleUnits = g.nSaleUnits, "
+
" orderUnits = g.nSaleUnits, "
+
" goodsUnit = g.sMarketUnit, "
+
" agentUnit = g.sUnit, "
+
" marketPrice = g.nMarketPrice, "
+
" salePrice = g.nSalePrice, "
+
" realSalePrice =g.nRealSalePrice, "
+
" DCPriority = g.nDCPriority, "
+
" stock = g.nStockQty, "
+
" imgPath = g.sURL, "
+
" flavor = g.Flavor,"
+
" caseUnits=g.nCaseUnits"
+
" FROM "
+
" V_CategoryGoods g "
+
" WHERE "
+
" g.nGoodsID = "
+
goodsID
+
" "
+
" AND g.sShopNO = '"
+
tshop
.
getsShopNO
()
+
"' "
+
" AND g.nTag&1=0 "
;
}
if
(
StringUtil
.
isNotEmpty
(
contractNO
)){
goodInfoSql
+=
" AND g.sAgentContractNO='"
+
contractNO
+
"' "
;
}
return
goodInfoSql
;
}
/**
...
...
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