Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
4143edaf
Commit
4143edaf
authored
Nov 05, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
84f8c299
63ee4720
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
268 additions
and
22 deletions
+268
-22
pom.xml
ace-common/pom.xml
+8
-0
QrCodeUtil.java
...a/com/github/wxiaoqi/security/common/util/QrCodeUtil.java
+88
-0
ZXingCode.java
...va/com/github/wxiaoqi/security/common/util/ZXingCode.java
+121
-0
systemconfig.properties
...mon/src/main/resources/properties/systemconfig.properties
+4
-4
AliYunSmsBiz.java
...in/java/com/xxfc/platform/universal/biz/AliYunSmsBiz.java
+15
-15
VehicleFindDTO.java
...va/com/xxfc/platform/vehicle/pojo/dto/VehicleFindDTO.java
+4
-0
AppVehicleController.java
.../com/xxfc/platform/vehicle/rest/AppVehicleController.java
+9
-3
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+19
-0
No files found.
ace-common/pom.xml
View file @
4143edaf
...
@@ -143,6 +143,14 @@
...
@@ -143,6 +143,14 @@
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<!-- 生成二维码 -->
<dependency>
<groupId>
com.google.zxing
</groupId>
<artifactId>
core
</artifactId>
<version>
3.0.1
</version>
</dependency>
<!-- excel 组件 -->
<!-- excel 组件 -->
<dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<groupId>
org.apache.poi
</groupId>
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/QrCodeUtil.java
0 → 100644
View file @
4143edaf
package
com
.
github
.
wxiaoqi
.
security
.
common
.
util
;
import
com.google.zxing.BarcodeFormat
;
import
com.google.zxing.EncodeHintType
;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.common.BitMatrix
;
import
javax.imageio.ImageIO
;
import
javax.swing.filechooser.FileSystemView
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
QrCodeUtil
{
public
static
void
main
(
String
[]
args
)
{
String
url
=
"https://xxtest.upyuns.com/h5/appHtml/view/Settlement.html"
;
//path 二维码存放路径
String
path
=
FileSystemView
.
getFileSystemView
().
getHomeDirectory
()
+
File
.
separator
+
"testQrcode"
;
//fileName 二维码图片名称
String
fileName
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
).
format
(
new
Date
())
+
".jpg"
;
createQrCode
(
url
,
path
,
fileName
);
}
public
static
String
createQrCode
(
String
url
,
String
path
,
String
fileName
)
{
try
{
Map
<
EncodeHintType
,
String
>
hints
=
new
HashMap
<>();
hints
.
put
(
EncodeHintType
.
CHARACTER_SET
,
"UTF-8"
);
BitMatrix
bitMatrix
=
new
MultiFormatWriter
().
encode
(
url
,
BarcodeFormat
.
QR_CODE
,
400
,
400
,
hints
);
File
file
=
new
File
(
path
,
fileName
);
if
(
file
.
exists
()
||
((
file
.
getParentFile
().
exists
()
||
file
.
getParentFile
().
mkdirs
())
&&
file
.
createNewFile
()))
{
writeToFile
(
bitMatrix
,
"jpg"
,
file
);
System
.
out
.
println
(
"搞定:"
+
file
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
static
void
writeToFile
(
BitMatrix
matrix
,
String
format
,
File
file
)
throws
IOException
{
BufferedImage
image
=
toBufferedImage
(
matrix
);
if
(!
ImageIO
.
write
(
image
,
format
,
file
))
{
throw
new
IOException
(
"Could not write an image of format "
+
format
+
" to "
+
file
);
}
}
static
void
writeToStream
(
BitMatrix
matrix
,
String
format
,
OutputStream
stream
)
throws
IOException
{
BufferedImage
image
=
toBufferedImage
(
matrix
);
if
(!
ImageIO
.
write
(
image
,
format
,
stream
))
{
throw
new
IOException
(
"Could not write an image of format "
+
format
);
}
}
private
static
final
int
BLACK
=
0xFF000000
;
private
static
final
int
WHITE
=
0xFFFFFFFF
;
private
static
BufferedImage
toBufferedImage
(
BitMatrix
matrix
)
{
int
width
=
matrix
.
getWidth
();
int
height
=
matrix
.
getHeight
();
BufferedImage
image
=
new
BufferedImage
(
width
,
height
,
BufferedImage
.
TYPE_INT_RGB
);
for
(
int
x
=
0
;
x
<
width
;
x
++)
{
for
(
int
y
=
0
;
y
<
height
;
y
++)
{
image
.
setRGB
(
x
,
y
,
matrix
.
get
(
x
,
y
)
?
BLACK
:
WHITE
);
}
}
return
image
;
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ZXingCode.java
0 → 100644
View file @
4143edaf
package
com
.
github
.
wxiaoqi
.
security
.
common
.
util
;
import
com.google.zxing.BarcodeFormat
;
import
com.google.zxing.EncodeHintType
;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.WriterException
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.imageio.ImageIO
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
public
class
ZXingCode
{
private
static
final
int
QRCOLOR
=
0xFF000000
;
// 默认是黑色
private
static
final
int
BGWHITE
=
0xFFFFFFFF
;
// 背景颜色
private
static
final
int
WIDTH
=
400
;
// 二维码宽
private
static
final
int
HEIGHT
=
400
;
// 二维码高
// 用于设置QR二维码参数
private
static
Map
<
EncodeHintType
,
Object
>
hints
=
new
HashMap
<
EncodeHintType
,
Object
>()
{
private
static
final
long
serialVersionUID
=
1L
;
{
put
(
EncodeHintType
.
ERROR_CORRECTION
,
ErrorCorrectionLevel
.
H
);
// 设置QR二维码的纠错级别(H为最高级别)具体级别信息
put
(
EncodeHintType
.
CHARACTER_SET
,
"utf-8"
);
// 设置编码方式
put
(
EncodeHintType
.
MARGIN
,
0
);
}
};
public
static
void
main
(
String
[]
args
)
throws
WriterException
{
File
logoFile
=
new
File
(
"D:\\hezhen\\upload\\qrcode/logo3.png"
);
File
QrCodeFile
=
new
File
(
"D:\\hezhen\\upload/qrcode/05.png"
);
String
url
=
"https://www.baidu.com/"
;
String
note
=
"访问百度连接"
;
drawLogoQRCode
(
logoFile
,
QrCodeFile
,
url
,
note
);
}
// 生成带logo的二维码图片
public
static
void
drawLogoQRCode
(
File
logoFile
,
File
codeFile
,
String
qrUrl
,
String
note
)
{
try
{
MultiFormatWriter
multiFormatWriter
=
new
MultiFormatWriter
();
// 参数顺序分别为:编码内容,编码类型,生成图片宽度,生成图片高度,设置参数
BitMatrix
bm
=
multiFormatWriter
.
encode
(
qrUrl
,
BarcodeFormat
.
QR_CODE
,
WIDTH
,
HEIGHT
,
hints
);
BufferedImage
image
=
new
BufferedImage
(
WIDTH
,
HEIGHT
,
BufferedImage
.
TYPE_INT_RGB
);
// 开始利用二维码数据创建Bitmap图片,分别设为黑(0xFFFFFFFF)白(0xFF000000)两色
for
(
int
x
=
0
;
x
<
WIDTH
;
x
++)
{
for
(
int
y
=
0
;
y
<
HEIGHT
;
y
++)
{
image
.
setRGB
(
x
,
y
,
bm
.
get
(
x
,
y
)
?
QRCOLOR
:
BGWHITE
);
}
}
int
width
=
image
.
getWidth
();
int
height
=
image
.
getHeight
();
if
(
Objects
.
nonNull
(
logoFile
)
&&
logoFile
.
exists
())
{
// 构建绘图对象
Graphics2D
g
=
image
.
createGraphics
();
// 读取Logo图片
BufferedImage
logo
=
ImageIO
.
read
(
logoFile
);
// 开始绘制logo图片
g
.
drawImage
(
logo
,
width
*
2
/
5
,
height
*
2
/
5
,
width
*
2
/
10
,
height
*
2
/
10
,
null
);
g
.
dispose
();
logo
.
flush
();
}
// 自定义文本描述
if
(
StringUtils
.
isNotEmpty
(
note
))
{
// 新的图片,把带logo的二维码下面加上文字
BufferedImage
outImage
=
new
BufferedImage
(
400
,
445
,
BufferedImage
.
TYPE_4BYTE_ABGR
);
Graphics2D
outg
=
outImage
.
createGraphics
();
// 画二维码到新的面板
outg
.
drawImage
(
image
,
0
,
0
,
image
.
getWidth
(),
image
.
getHeight
(),
null
);
// 画文字到新的面板
outg
.
setColor
(
Color
.
BLACK
);
outg
.
setFont
(
new
Font
(
"楷体"
,
Font
.
BOLD
,
30
));
// 字体、字型、字号
int
strWidth
=
outg
.
getFontMetrics
().
stringWidth
(
note
);
if
(
strWidth
>
399
)
{
// //长度过长就截取前面部分
// 长度过长就换行
String
note1
=
note
.
substring
(
0
,
note
.
length
()
/
2
);
String
note2
=
note
.
substring
(
note
.
length
()
/
2
,
note
.
length
());
int
strWidth1
=
outg
.
getFontMetrics
().
stringWidth
(
note1
);
int
strWidth2
=
outg
.
getFontMetrics
().
stringWidth
(
note2
);
outg
.
drawString
(
note1
,
200
-
strWidth1
/
2
,
height
+
(
outImage
.
getHeight
()
-
height
)
/
2
+
12
);
BufferedImage
outImage2
=
new
BufferedImage
(
400
,
485
,
BufferedImage
.
TYPE_4BYTE_ABGR
);
Graphics2D
outg2
=
outImage2
.
createGraphics
();
outg2
.
drawImage
(
outImage
,
0
,
0
,
outImage
.
getWidth
(),
outImage
.
getHeight
(),
null
);
outg2
.
setColor
(
Color
.
BLACK
);
outg2
.
setFont
(
new
Font
(
"宋体"
,
Font
.
BOLD
,
30
));
// 字体、字型、字号
outg2
.
drawString
(
note2
,
200
-
strWidth2
/
2
,
outImage
.
getHeight
()
+
(
outImage2
.
getHeight
()
-
outImage
.
getHeight
())
/
2
+
5
);
outg2
.
dispose
();
outImage2
.
flush
();
outImage
=
outImage2
;
}
else
{
outg
.
drawString
(
note
,
200
-
strWidth
/
2
,
height
+
(
outImage
.
getHeight
()
-
height
)
/
2
+
12
);
// 画文字
}
outg
.
dispose
();
outImage
.
flush
();
image
=
outImage
;
}
image
.
flush
();
ImageIO
.
write
(
image
,
"png"
,
codeFile
);
// TODO
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
ace-common/src/main/resources/properties/systemconfig.properties
View file @
4143edaf
...
@@ -17,10 +17,10 @@ USER_HEADER_URL_DEFAULT=https://xxtest.upyuns.com/image/app/default_%20avatar.pn
...
@@ -17,10 +17,10 @@ USER_HEADER_URL_DEFAULT=https://xxtest.upyuns.com/image/app/default_%20avatar.pn
#\u9ED8\u8BA4\u6635\u79F0
#\u9ED8\u8BA4\u6635\u79F0
USER_NIKENAME_DEFAULT
=
XX_
USER_NIKENAME_DEFAULT
=
XX_
#\u77ED\u4FE1\u673A
#\u77ED\u4FE1\u673A
ACCESSKEYID
=
LTAI
nxMDwHQL8yg9
ACCESSKEYID
=
LTAI
lXrgxOBAj2Ny
ACCESSKEYSECRET
=
OCKDEiwKGjePCZgPeWMEUFGwGbKYLA
ACCESSKEYSECRET
=
zo8OkOCF4iygqOjYYoxRKfVRxDvgTI
TEMPLATECODE
=
SMS_1
70070101
TEMPLATECODE
=
SMS_1
66480010
SIGNNAME
=
\u
6EF4
\u
623F
\u
8F66
SIGNNAME
=
升云
#\u5FAE\u4FE1\u652F\u4ED8\u914D\u7F6E
#\u5FAE\u4FE1\u652F\u4ED8\u914D\u7F6E
WINXIN_AppID
=
wx425608b69a34736f
WINXIN_AppID
=
wx425608b69a34736f
WINXIN_PARTNER_KEY
=
xxfcXXDfangche74upyuns3AD4334533
WINXIN_PARTNER_KEY
=
xxfcXXDfangche74upyuns3AD4334533
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/AliYunSmsBiz.java
View file @
4143edaf
...
@@ -11,15 +11,15 @@ import org.springframework.stereotype.Service;
...
@@ -11,15 +11,15 @@ import org.springframework.stereotype.Service;
public
class
AliYunSmsBiz
{
public
class
AliYunSmsBiz
{
//租车订单通知(普通用户)1
//租车订单通知(普通用户)1
public
static
final
String
TEMPLATE_ID_ORDER
=
"SMS_
173247815
"
;
public
static
final
String
TEMPLATE_ID_ORDER
=
"SMS_
205409960
"
;
//租车订单短信(会员权益)2
//租车订单短信(会员权益)2
public
static
final
String
TEMPLATE_ID_ORDER_MEMBER
=
"SMS_
173252767
"
;
public
static
final
String
TEMPLATE_ID_ORDER_MEMBER
=
"SMS_
205430052
"
;
//旅游订单短信3
//旅游订单短信3
public
static
final
String
TEMPLATE_ID_ORDER_TOUR
=
"SMS_
173247826
"
;
public
static
final
String
TEMPLATE_ID_ORDER_TOUR
=
"SMS_
205435031
"
;
//加入会员通知4
//加入会员通知4
public
static
final
String
TEMPLATE_ID_MEMBER
=
"SMS_
173247829
"
;
public
static
final
String
TEMPLATE_ID_MEMBER
=
"SMS_
205409966
"
;
//租/还车公司相同(订单支付后立即发送给相关负责人)5
//租/还车公司相同(订单支付后立即发送给相关负责人)5
public
static
final
String
TEMPLATE_ID_TAAKE_CAR
=
"SMS_
173247836
"
;
public
static
final
String
TEMPLATE_ID_TAAKE_CAR
=
"SMS_
205409971
"
;
//租/还车公司不同(发给租车公司负责人,订单支付后发送)6
//租/还车公司不同(发给租车公司负责人,订单支付后发送)6
public
static
final
String
TEMPLATE_ID_DIFFERENT_TAAKE_CAR
=
"458621"
;
public
static
final
String
TEMPLATE_ID_DIFFERENT_TAAKE_CAR
=
"458621"
;
// 租/还车公司不同(发给还车公司负责人,订单出车后发))(相同不发)7
// 租/还车公司不同(发给还车公司负责人,订单出车后发))(相同不发)7
...
@@ -30,19 +30,19 @@ public class AliYunSmsBiz {
...
@@ -30,19 +30,19 @@ public class AliYunSmsBiz {
//租车(通用)10
//租车(通用)10
//public static final String TEMPLATE_ID_PAY_A = "460759";
//public static final String TEMPLATE_ID_PAY_A = "460759";
public
static
final
String
TEMPLATE_ID_PAY_A
=
"SMS_
171112286
"
;
public
static
final
String
TEMPLATE_ID_PAY_A
=
"SMS_
205409973
"
;
//租车(使用会员权益)11
//租车(使用会员权益)11
//public static final String TEMPLATE_ID_PAY_B = "460760";
//public static final String TEMPLATE_ID_PAY_B = "460760";
public
static
final
String
TEMPLATE_ID_PAY_B
=
"SMS_173340577"
;
public
static
final
String
TEMPLATE_ID_PAY_B
=
"SMS_173340577"
;
//租车内部通知(客服)12
//租车内部通知(客服)12
//public static final String TEMPLATE_ID_PAY_C = "460763";
//public static final String TEMPLATE_ID_PAY_C = "460763";
public
static
final
String
TEMPLATE_ID_PAY_C
=
"SMS_
173345572
"
;
public
static
final
String
TEMPLATE_ID_PAY_C
=
"SMS_
205430069
"
;
//租车内部通知(出车人)13
//租车内部通知(出车人)13
//public static final String TEMPLATE_ID_PAY_D = "460762";
//public static final String TEMPLATE_ID_PAY_D = "460762";
public
static
final
String
TEMPLATE_ID_PAY_D
=
"SMS_
173340609
"
;
public
static
final
String
TEMPLATE_ID_PAY_D
=
"SMS_
205399932
"
;
//租车内部通知(收车人)14
//租车内部通知(收车人)14
//public static final String TEMPLATE_ID_PAY_E = "460764";
//public static final String TEMPLATE_ID_PAY_E = "460764";
public
static
final
String
TEMPLATE_ID_PAY_E
=
"SMS_
173345589
"
;
public
static
final
String
TEMPLATE_ID_PAY_E
=
"SMS_
205409994
"
;
//旅游(通用)15
//旅游(通用)15
//public static final String TEMPLATE_ID_PAY_F = "460765";
//public static final String TEMPLATE_ID_PAY_F = "460765";
public
static
final
String
TEMPLATE_ID_PAY_F
=
"SMS_173345597"
;
public
static
final
String
TEMPLATE_ID_PAY_F
=
"SMS_173345597"
;
...
@@ -52,25 +52,25 @@ public class AliYunSmsBiz {
...
@@ -52,25 +52,25 @@ public class AliYunSmsBiz {
//取消租车(通用)17
//取消租车(通用)17
//public static final String TEMPLATE_ID_CANCEL_A= "460767";
//public static final String TEMPLATE_ID_CANCEL_A= "460767";
public
static
final
String
TEMPLATE_ID_CANCEL_A
=
"SMS_
173345633
"
;
public
static
final
String
TEMPLATE_ID_CANCEL_A
=
"SMS_
205430086
"
;
//取消租车(使用会员权益)18
//取消租车(使用会员权益)18
//public static final String TEMPLATE_ID_CANCEL_B = "460768";
//public static final String TEMPLATE_ID_CANCEL_B = "460768";
public
static
final
String
TEMPLATE_ID_CANCEL_B
=
"SMS_173340658"
;
public
static
final
String
TEMPLATE_ID_CANCEL_B
=
"SMS_173340658"
;
//取消租车(通用扣违约金)19
//取消租车(通用扣违约金)19
//public static final String TEMPLATE_ID_CANCEL_C = "460769";
//public static final String TEMPLATE_ID_CANCEL_C = "460769";
public
static
final
String
TEMPLATE_ID_CANCEL_C
=
"SMS_
173345646
"
;
public
static
final
String
TEMPLATE_ID_CANCEL_C
=
"SMS_
205410000
"
;
//取消租车(会员权益&扣违 20
//取消租车(会员权益&扣违 20
//public static final String TEMPLATE_ID_CANCEL_D = "460770";
//public static final String TEMPLATE_ID_CANCEL_D = "460770";
public
static
final
String
TEMPLATE_ID_CANCEL_D
=
"SMS_173340671"
;
public
static
final
String
TEMPLATE_ID_CANCEL_D
=
"SMS_173340671"
;
//取消租车(出车人)21
//取消租车(出车人)21
//public static final String TEMPLATE_ID_CANCEL_E = "460771";
//public static final String TEMPLATE_ID_CANCEL_E = "460771";
public
static
final
String
TEMPLATE_ID_CANCEL_E
=
"SMS_
173345667
"
;
public
static
final
String
TEMPLATE_ID_CANCEL_E
=
"SMS_
205399953
"
;
//租车押金退还 22
//租车押金退还 22
//public static final String TEMPLATE_ID_FINISH_A = "460772";
//public static final String TEMPLATE_ID_FINISH_A = "460772";
public
static
final
String
TEMPLATE_ID_FINISH_A
=
"SMS_
175240587
"
;
public
static
final
String
TEMPLATE_ID_FINISH_A
=
"SMS_
205440008
"
;
//违章押金退还 23
//违章押金退还 23
//public static final String TEMPLATE_ID_FINISH_B = "460773";
//public static final String TEMPLATE_ID_FINISH_B = "460773";
public
static
final
String
TEMPLATE_ID_FINISH_B
=
"SMS_
173340712
"
;
public
static
final
String
TEMPLATE_ID_FINISH_B
=
"SMS_
205399956
"
;
//旅游内部通知(客服)24
//旅游内部通知(客服)24
//public static final String TEMPLATE_ID_PAY_H = "461421";
//public static final String TEMPLATE_ID_PAY_H = "461421";
public
static
final
String
TEMPLATE_ID_PAY_H
=
"SMS_173340630"
;
public
static
final
String
TEMPLATE_ID_PAY_H
=
"SMS_173340630"
;
...
@@ -78,7 +78,7 @@ public class AliYunSmsBiz {
...
@@ -78,7 +78,7 @@ public class AliYunSmsBiz {
//public static final String TEMPLATE_ID_CANCEL_F = "461424";
//public static final String TEMPLATE_ID_CANCEL_F = "461424";
public
static
final
String
TEMPLATE_ID_CANCEL_F
=
"SMS_173340695"
;
public
static
final
String
TEMPLATE_ID_CANCEL_F
=
"SMS_173340695"
;
//租车(取车提醒)26
//租车(取车提醒)26
public
static
final
String
TEMPLATE_ID_PAY_I
=
"SMS_
173345539
"
;
public
static
final
String
TEMPLATE_ID_PAY_I
=
"SMS_
205435086
"
;
//旅游(上车通知)27
//旅游(上车通知)27
public
static
final
String
TEMPLATE_ID_PAY_J
=
"SMS_173345606"
;
public
static
final
String
TEMPLATE_ID_PAY_J
=
"SMS_173345606"
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/dto/VehicleFindDTO.java
View file @
4143edaf
...
@@ -55,4 +55,8 @@ public class VehicleFindDTO extends PageParam implements DataInter {
...
@@ -55,4 +55,8 @@ public class VehicleFindDTO extends PageParam implements DataInter {
@ApiModelProperty
(
"店铺类型:1-店铺资产;2-店铺经营;3-店铺停靠"
)
@ApiModelProperty
(
"店铺类型:1-店铺资产;2-店铺经营;3-店铺停靠"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"店铺状态:1-上架中;2-下架中;3-已调出"
)
private
Integer
goodStatus
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehicleController.java
View file @
4143edaf
...
@@ -69,10 +69,16 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
...
@@ -69,10 +69,16 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
}
}
@GetMapping
(
"app/unauth/countByCompamyId
/{id}
"
)
@GetMapping
(
"app/unauth/countByCompamyId"
)
@ApiModelProperty
(
"商品
详情
"
)
@ApiModelProperty
(
"商品
数量
"
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
countByCompamyId
(
@PathVariable
(
"id"
)
Integer
id
)
{
public
ObjectRestResponse
countByCompamyId
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
{
if
(
id
==
null
||
id
==
0
){
List
<
Integer
>
companyIds
=
getBusinessUserCompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
id
=
companyIds
.
get
(
0
);
}
}
return
ObjectRestResponse
.
succ
(
baseBiz
.
countByCompanyId
(
id
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
countByCompanyId
(
id
));
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
4143edaf
...
@@ -1373,6 +1373,25 @@
...
@@ -1373,6 +1373,25 @@
<if
test=
"goodsType != null "
>
<if
test=
"goodsType != null "
>
AND v.`goods_type`= #{goodsType}
AND v.`goods_type`= #{goodsType}
</if>
</if>
<if
test=
"goodStatus != null and goodStatus > 0 and type != null and type > 0 "
>
<choose>
<when
test=
"goodStatus == 1 and type == 1"
>
and v.`state`= 1 and v.`subordinate_branch` = v.`park_branch_company_id` and v.`subordinate_branch` = v.`manage_company_id`
</when>
<when
test=
"goodStatus == 2 and type == 1"
>
and v.`state`= 2 and v.`subordinate_branch` = v.`park_branch_company_id` and v.`subordinate_branch` = v.`manage_company_id`
</when>
<when
test=
"goodStatus == 1 and type == 2"
>
and v.`state`= 1
</when>
<when
test=
"goodStatus == 2 and type == 2 "
>
and v.`state`= 2
</when>
<when
test=
"goodStatus == 3"
>
and ( v.`subordinate_branch` != v.`park_branch_company_id` or v.`subordinate_branch` != v.`manage_company_id` )
</when>
</choose>
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
<if
test=
"type != null and type > 0"
>
<if
test=
"type != null and type > 0"
>
<choose>
<choose>
...
...
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