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
19495898
Commit
19495898
authored
Mar 22, 2024
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
3f664fd0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
+16
-18
GoodsController.java
src/main/java/com/egolm/shop/api/GoodsController.java
+3
-1
GoodsServiceImpl.java
...ava/com/egolm/shop/api/service/impl/GoodsServiceImpl.java
+13
-17
No files found.
src/main/java/com/egolm/shop/api/GoodsController.java
View file @
19495898
...
@@ -174,6 +174,7 @@ public class GoodsController {
...
@@ -174,6 +174,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"goodsId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"商品编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"goodsId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"商品编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contractNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"合同编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contractNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"合同编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custTypeId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"合同编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custTypeId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"合同编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"ShopPriceTypeID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"ShopPriceTypeID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
...
@@ -182,7 +183,7 @@ public class GoodsController {
...
@@ -182,7 +183,7 @@ public class GoodsController {
@RequestMapping
(
value
=
"/goodsDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/goodsDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"商品详情"
)
@IDCLogResource
(
name
=
"商品详情"
)
public
String
goodsDetail
(
String
orgNo
,
String
goodsId
,
String
contractNo
,
String
custTypeId
,
String
terminal
,
String
langID
,
String
agentID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
goodsDetail
(
String
orgNo
,
String
goodsId
,
String
contractNo
,
String
custTypeId
,
String
terminal
,
String
ShopPriceTypeID
,
String
langID
,
String
agentID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgNo"
,
orgNo
);
params
.
put
(
"orgNo"
,
orgNo
);
...
@@ -192,6 +193,7 @@ public class GoodsController {
...
@@ -192,6 +193,7 @@ public class GoodsController {
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"agentID"
,
agentID
);
params
.
put
(
"agentID"
,
agentID
);
params
.
put
(
"ShopPriceTypeID"
,
ShopPriceTypeID
);
return
goodsService
.
goodsDetail
(
params
);
return
goodsService
.
goodsDetail
(
params
);
}
}
...
...
src/main/java/com/egolm/shop/api/service/impl/GoodsServiceImpl.java
View file @
19495898
...
@@ -17,6 +17,7 @@ import org.springframework.dao.EmptyResultDataAccessException;
...
@@ -17,6 +17,7 @@ import org.springframework.dao.EmptyResultDataAccessException;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.GsonUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.Util
;
import
com.egolm.common.Util
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
...
@@ -166,7 +167,7 @@ public class GoodsServiceImpl implements GoodsService {
...
@@ -166,7 +167,7 @@ public class GoodsServiceImpl implements GoodsService {
String
goodsId
=(
String
)
map
.
get
(
"goodsId"
);
String
goodsId
=(
String
)
map
.
get
(
"goodsId"
);
String
contractNo
=(
String
)
map
.
get
(
"contractNo"
);
String
contractNo
=(
String
)
map
.
get
(
"contractNo"
);
String
custTypeId
=(
String
)
map
.
get
(
"custTypeId"
);
String
custTypeId
=(
String
)
map
.
get
(
"custTypeId"
);
String
shopPriceTypeId
=(
String
)
map
.
get
(
"
shopPriceTypeId
"
);
String
shopPriceTypeId
=(
String
)
map
.
get
(
"
ShopPriceTypeID
"
);
String
agentID
=
map
.
get
(
"agentID"
)+
""
;
String
agentID
=
map
.
get
(
"agentID"
)+
""
;
boolean
isCheckAgentID
=
StringUtil
.
isNotBlank
(
agentID
)?
true
:
false
;
boolean
isCheckAgentID
=
StringUtil
.
isNotBlank
(
agentID
)?
true
:
false
;
...
@@ -413,31 +414,26 @@ public class GoodsServiceImpl implements GoodsService {
...
@@ -413,31 +414,26 @@ public class GoodsServiceImpl implements GoodsService {
}
}
String
sCustTypeID
=
"99999999999999"
;
String
sCustTypeID
=
"99999999999999"
;
try
{
String
sqll
=
"select c.sCustTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? "
;
if
(
StringUtil
.
isNotBlank
(
agentID
))
{
sqll
+=
" and c.nAgentID = ?"
;
sCustTypeID
=
readJdbcTemplate
.
queryForString
(
sqll
,
shopNo
,
agentID
);
}
else
{
sCustTypeID
=
readJdbcTemplate
.
queryForString
(
sqll
,
shopNo
);
}
}
catch
(
Exception
e
)
{
//shopNo为空,没有登陆
}
String
sShopTypeID
=
"99999999999999"
;
String
sShopTypeID
=
"99999999999999"
;
try
{
try
{
String
sqll
=
"select s.sPriceTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? "
;
String
sqll
=
"select c.sCustTypeID,s.sPriceTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? "
;
Map
<
String
,
Object
>
qM
=
new
HashMap
<
String
,
Object
>();
if
(
StringUtil
.
isNotBlank
(
agentID
))
{
if
(
StringUtil
.
isNotBlank
(
agentID
))
{
sqll
+=
" and
c
.nAgentID = ?"
;
sqll
+=
" and
s
.nAgentID = ?"
;
sShopTypeID
=
readJdbcTemplate
.
queryForString
(
sqll
,
shopNo
,
agentID
);
qM
=
readJdbcTemplate
.
queryForMap
(
sqll
,
shopNo
,
agentID
);
}
else
{
}
else
{
sShopTypeID
=
readJdbcTemplate
.
queryForString
(
sqll
,
shopNo
);
qM
=
readJdbcTemplate
.
queryForMap
(
sqll
,
shopNo
);
}
if
(!
qM
.
isEmpty
())
{
sCustTypeID
=
qM
.
get
(
"sCustTypeID"
)+
""
;
sShopTypeID
=
qM
.
get
(
"sPriceTypeID"
)+
""
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
//shopNo为空,没有登陆
//shopNo为空,没有登陆
}
}
String
sql
=
"select t.sAgentContractNO, t.nGoodsID, nStockQty = t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice, t.sStockTag "
+
String
sql
=
"select t.sAgentContractNO, t.nGoodsID, nStockQty = t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice, t.sStockTag "
+
" from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '"
+
sCustTypeID
+
"' "
+
" from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '"
+
sCustTypeID
+
"' "
+
" and ap.sShopTypeID = '"
+
sShopTypeID
+
"' "
+
" and ap.sShopTypeID = '"
+
sShopTypeID
+
"' "
+
...
...
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