Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
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
姚本章
dm_project
Commits
4e952e04
Commit
4e952e04
authored
Jan 15, 2021
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
ae0d95a2
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
1202 additions
and
412 deletions
+1202
-412
HttpsUtilsTest.java
...mon/src/main/java/com/jz/common/utils/HttpsUtilsTest.java
+242
-0
Md5.java
jz-dm-common/src/main/java/com/jz/common/utils/Md5.java
+3
-3
SMSUtils.java
jz-dm-common/src/main/java/com/jz/common/utils/SMSUtils.java
+59
-59
pom.xml
jz-dm-mall/pom.xml
+11
-3
Application.java
jz-dm-mall/src/main/java/com/jz/dm/mall/Application.java
+7
-4
DatabaseConfig.java
...l/src/main/java/com/jz/dm/mall/config/DatabaseConfig.java
+3
-3
MybatisPlusConfig.java
...z/dm/mall/config/mybatisPlusConfig/MybatisPlusConfig.java
+10
-1
MallCustomerController.java
...ll/moduls/controller/customer/MallCustomerController.java
+12
-6
ValidateCodeController.java
...ll/moduls/controller/customer/ValidateCodeController.java
+18
-28
PictureController.java
.../jz/dm/mall/moduls/controller/file/PictureController.java
+43
-0
DataGoodsCategoryController.java
.../moduls/controller/goods/DataGoodsCategoryController.java
+9
-6
DataGoodsCategory.java
.../java/com/jz/dm/mall/moduls/entity/DataGoodsCategory.java
+4
-54
MallMenu.java
.../src/main/java/com/jz/dm/mall/moduls/entity/MallMenu.java
+68
-0
DataGoodsCategoryDao.java
...va/com/jz/dm/mall/moduls/mapper/DataGoodsCategoryDao.java
+3
-0
FinanceCustomerAssetsDao.java
...om/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
+2
-2
MallCustomerDao.java
...in/java/com/jz/dm/mall/moduls/mapper/MallCustomerDao.java
+11
-0
DataGoodsCategoryService.java
...m/jz/dm/mall/moduls/service/DataGoodsCategoryService.java
+4
-0
MallCustomerService.java
...va/com/jz/dm/mall/moduls/service/MallCustomerService.java
+9
-0
PictureService.java
...in/java/com/jz/dm/mall/moduls/service/PictureService.java
+28
-0
DataGoodsCategoryServiceImpl.java
...all/moduls/service/impl/DataGoodsCategoryServiceImpl.java
+41
-2
FinanceTradeFlowServiceImpl.java
...mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
+48
-29
LogInfoServiceImpl.java
...om/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
+1
-1
MallCustomerServiceImpl.java
.../dm/mall/moduls/service/impl/MallCustomerServiceImpl.java
+43
-15
OrderServiceImpl.java
.../com/jz/dm/mall/moduls/service/impl/OrderServiceImpl.java
+5
-8
PayServiceImpl.java
...va/com/jz/dm/mall/moduls/service/impl/PayServiceImpl.java
+4
-3
PictureServiceImpl.java
...om/jz/dm/mall/moduls/service/impl/PictureServiceImpl.java
+135
-0
application-test.yml
jz-dm-mall/src/main/resources/application-test.yml
+15
-7
DepartmentDao.xml
...mall/src/main/resources/mapper/customer/DepartmentDao.xml
+0
-0
MallCustomerDao.xml
...ll/src/main/resources/mapper/customer/MallCustomerDao.xml
+21
-4
FinanceCustomerAssetsDao.xml
...ain/resources/mapper/finance/FinanceCustomerAssetsDao.xml
+1
-1
FinanceTradeFlowDao.xml
...src/main/resources/mapper/finance/FinanceTradeFlowDao.xml
+0
-0
DataGoodsApiDao.xml
...-mall/src/main/resources/mapper/goods/DataGoodsApiDao.xml
+0
-0
DataGoodsCategoryDao.xml
.../src/main/resources/mapper/goods/DataGoodsCategoryDao.xml
+7
-1
DataGoodsDao.xml
jz-dm-mall/src/main/resources/mapper/goods/DataGoodsDao.xml
+0
-0
MallHotRecommendGoodsDao.xml
.../main/resources/mapper/goods/MallHotRecommendGoodsDao.xml
+0
-0
PlatformLogDao.xml
...m-mall/src/main/resources/mapper/goods/PlatformLogDao.xml
+0
-0
PlatformTradeFlowInfoDao.xml
.../main/resources/mapper/goods/PlatformTradeFlowInfoDao.xml
+0
-0
OrderDao.xml
jz-dm-mall/src/main/resources/mapper/order/OrderDao.xml
+0
-0
OrderGoodsInfoDao.xml
...all/src/main/resources/mapper/order/OrderGoodsInfoDao.xml
+0
-0
OrderPaymentDao.xml
...-mall/src/main/resources/mapper/order/OrderPaymentDao.xml
+0
-0
pom.xml
jz-dm-manage/pom.xml
+71
-0
manageApplication.java
...manage/src/main/java/com/jz/manage/manageApplication.java
+5
-8
PlatformTradeFlowInfoController.java
...s/controller/finance/PlatformTradeFlowInfoController.java
+8
-6
CashOutListRequest.java
...oduls/controller/finance/platForm/CashOutListRequest.java
+11
-0
TradeDetilRequest.java
...moduls/controller/finance/platForm/TradeDetilRequest.java
+5
-3
SysUserController.java
...om/jz/manage/moduls/controller/sys/SysUserController.java
+15
-3
ValidateCodeController.java
.../manage/moduls/controller/sys/ValidateCodeController.java
+9
-15
DataGoodsCategory.java
...n/java/com/jz/manage/moduls/entity/DataGoodsCategory.java
+1
-1
PlatformTradeFlowInfoDao.java
...com/jz/manage/moduls/mapper/PlatformTradeFlowInfoDao.java
+6
-1
SysUserDao.java
...src/main/java/com/jz/manage/moduls/mapper/SysUserDao.java
+4
-2
DataGoodsService.java
...n/java/com/jz/manage/moduls/service/DataGoodsService.java
+1
-1
PlatformTradeFlowInfoService.java
...z/manage/moduls/service/PlatformTradeFlowInfoService.java
+2
-1
SysUserService.java
...ain/java/com/jz/manage/moduls/service/SysUserService.java
+3
-2
DataGoodsCategoryServiceImpl.java
...age/moduls/service/impl/DataGoodsCategoryServiceImpl.java
+3
-12
DataGoodsServiceImpl.java
...m/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
+1
-15
DepartmentServiceImpl.java
.../jz/manage/moduls/service/impl/DepartmentServiceImpl.java
+4
-3
FinanceCustomerBalanceServiceImpl.java
...oduls/service/impl/FinanceCustomerBalanceServiceImpl.java
+46
-30
PlatformTradeFlowInfoServiceImpl.java
...moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
+54
-32
SysUserServiceImpl.java
...com/jz/manage/moduls/service/impl/SysUserServiceImpl.java
+31
-15
application-test.yml
jz-dm-manage/src/main/resources/application-test.yml
+10
-4
PlatformTradeFlowInfoDao.xml
...ain/resources/mapper/finance/PlatformTradeFlowInfoDao.xml
+22
-1
DataGoodsCategoryDao.xml
.../src/main/resources/mapper/goods/DataGoodsCategoryDao.xml
+1
-1
SysUserDao.xml
jz-dm-manage/src/main/resources/mapper/sys/SysUserDao.xml
+16
-16
pom.xml
pom.xml
+6
-0
No files found.
jz-dm-common/src/main/java/com/jz/common/utils/HttpsUtilsTest.java
0 → 100644
View file @
4e952e04
package
com
.
jz
.
common
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.Consts
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.ParseException
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
jz
.
common
.
utils
.
HttpClientPool
.
getHttpClient
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.common.utils
* @PROJECT_NAME: jz-dm-parent
* @NAME: HttpsUtils
* @DATE: 2021-1-3/0:29
* @DAY_NAME_SHORT: 周日
* @Description:
**/
@Slf4j
public
class
HttpsUtilsTest
{
public
static
final
String
JSON_CONTENT_FORM
=
"application/json; charset=utf-8"
;
public
static
final
String
CONTENT_FORM
=
"application/x-www-form-urlencoded;charset=UTF-8"
;
/**
* Post请求表单提交
* @param url 请求路径
* @param params 请求参数
* @param headers 请求头
* @return
*/
public
static
String
submitPost
(
String
url
,
JSONObject
params
,
Map
<
String
,
String
>
headers
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
String
body
=
null
;
CloseableHttpResponse
response
=
null
;
try
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
setHeader
(
"Content-type"
,
JSON_CONTENT_FORM
);
if
(
null
!=
headers
&&
headers
.
size
()
>
0
)
{
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
httpPost
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
}
if
(
StringUtils
.
isNotBlank
(
params
.
toString
()))
{
httpPost
.
setEntity
(
new
StringEntity
(
params
.
toString
(),
Consts
.
UTF_8
));
}
response
=
httpClient
.
execute
(
httpPost
);
body
=
getBody
(
response
.
getEntity
());
log
.
info
(
"请求:"
+
url
+
"---->返回结果:"
+
body
);
}
catch
(
IOException
e
)
{
log
.
error
(
"请求:"
+
url
+
"--->异常"
,
e
);
}
finally
{
try
{
// 释放链接
response
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
return
body
;
}
/**
* Post请求表单提交
*
* @param url 请求路径
* @param params 请求参数
* @return
*/
public
static
String
submitPost
(
String
url
,
String
params
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
String
body
=
null
;
CloseableHttpResponse
response
=
null
;
try
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
setHeader
(
"Content-type"
,
JSON_CONTENT_FORM
);
if
(
StringUtils
.
isNotBlank
(
params
))
{
httpPost
.
setEntity
(
new
StringEntity
(
params
,
Consts
.
UTF_8
));
}
response
=
httpClient
.
execute
(
httpPost
);
System
.
out
.
println
(
response
);
body
=
getBody
(
response
.
getEntity
());
log
.
info
(
"请求:"
+
url
+
"---->返回结果:"
+
body
);
}
catch
(
IOException
e
)
{
log
.
error
(
"请求:"
+
url
+
"--->异常"
,
e
);
}
finally
{
try
{
// 释放链接
response
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
return
body
;
}
/**
* 验证码实时校验
* 无需cookie和referer时请求接口
*
* @param params 入参
* @param baseUrl 发送请求的URL
* @return URL 所代表远程资源的响应结果
*/
public
static
String
doGet
(
String
baseUrl
,
Map
<
String
,
String
>
params
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
CloseableHttpResponse
response
=
null
;
String
body
=
null
;
try
{
List
<
String
>
mapList
=
new
ArrayList
<>();
if
(
params
!=
null
)
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
params
.
entrySet
())
{
mapList
.
add
(
entry
.
getKey
()
+
"="
+
entry
.
getValue
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
mapList
))
{
baseUrl
=
baseUrl
+
"?"
;
String
paramsStr
=
StringUtils
.
join
(
mapList
,
"&"
);
baseUrl
=
baseUrl
+
paramsStr
;
}
HttpGet
httpGet
=
new
HttpGet
(
baseUrl
);
response
=
httpClient
.
execute
(
httpGet
);
body
=
getBody
(
response
.
getEntity
());
log
.
info
(
"获取请求结果为:"
+
body
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"请求接口时-->"
+
baseUrl
+
"发生异常:"
,
e
);
}
finally
{
try
{
response
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
body
;
}
/**
* 验证码实时校验
* 无需cookie和referer时请求接口
* @param baseUrl 发送请求的URL
* @param params 请求参数
* @return URL 所代表远程资源的响应结果
*/
public
static
String
doGet
(
String
baseUrl
,
Map
<
String
,
String
>
params
,
Map
<
String
,
String
>
headers
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
CloseableHttpResponse
response
=
null
;
String
body
=
null
;
try
{
List
<
String
>
mapList
=
new
ArrayList
<>();
if
(
params
!=
null
)
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
params
.
entrySet
())
{
mapList
.
add
(
entry
.
getKey
()
+
"="
+
entry
.
getValue
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
mapList
))
{
baseUrl
=
baseUrl
+
"?"
;
String
paramsStr
=
StringUtils
.
join
(
mapList
,
"&"
);
baseUrl
=
baseUrl
+
paramsStr
;
}
HttpGet
httpGet
=
new
HttpGet
(
baseUrl
);
if
(
headers
!=
null
&&
headers
.
size
()
>
0
)
{
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
httpGet
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
}
response
=
httpClient
.
execute
(
httpGet
);
body
=
getBody
(
response
.
getEntity
());
log
.
info
(
"获取请求结果为:"
+
body
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"请求接口时-->"
+
baseUrl
+
"发生异常:"
,
e
);
}
finally
{
try
{
response
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
body
;
}
/**
* 获取图片二维码
*
* @param url
* @throws IOException
*/
public
static
CloseableHttpResponse
doGetImg
(
String
url
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
CloseableHttpResponse
response
=
null
;
HttpGet
httpGet
=
new
HttpGet
(
url
);
try
{
response
=
httpClient
.
execute
(
httpGet
);
}
catch
(
IOException
e
)
{
log
.
error
(
"发起http request异常:{}"
,
e
);
}
return
response
;
}
/**
* 获取图片二维码
*
* @param url
* @throws IOException
*/
public
static
HttpEntity
doGetImg
(
String
url
,
Map
<
String
,
String
>
headers
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
CloseableHttpResponse
response
=
null
;
HttpGet
httpGet
=
new
HttpGet
(
url
);
if
(
headers
!=
null
&&
headers
.
size
()
>
0
)
{
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
httpGet
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
}
try
{
response
=
httpClient
.
execute
(
httpGet
);
}
catch
(
IOException
e
)
{
log
.
error
(
"发起http request异常:{}"
,
e
);
}
return
response
.
getEntity
();
}
public
static
String
getBody
(
HttpEntity
entity
)
throws
ParseException
,
IOException
{
String
body
=
""
;
if
(
entity
!=
null
)
{
// 按指定编码转换结果实体为String类型
body
=
EntityUtils
.
toString
(
entity
,
Consts
.
UTF_8
);
}
EntityUtils
.
consume
(
entity
);
return
body
;
}
}
jz-dm-common/src/main/java/com/jz/common/utils/Md5.java
View file @
4e952e04
...
@@ -153,7 +153,7 @@ public class Md5 {
...
@@ -153,7 +153,7 @@ public class Md5 {
return
Md5
.
encrypt
(
query
.
toString
(),
secret
);
return
Md5
.
encrypt
(
query
.
toString
(),
secret
);
}
}
public
static
void
main
(
String
[]
args
)
{
//
public static void main(String[] args) {
System
.
out
.
println
(
encrypt
(
"200128008012abc@123"
,
""
));
//
System.out.println(encrypt("200128008012abc@123", ""));
}
//
}
}
}
jz-dm-common/src/main/java/com/jz/common/utils/SMSUtils.java
View file @
4e952e04
...
@@ -4,75 +4,75 @@ import com.aliyuncs.DefaultAcsClient;
...
@@ -4,75 +4,75 @@ import com.aliyuncs.DefaultAcsClient;
import
com.aliyuncs.IAcsClient
;
import
com.aliyuncs.IAcsClient
;
import
com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest
;
import
com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest
;
import
com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse
;
import
com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse
;
import
com.aliyuncs.exceptions.ClientException
;
import
com.aliyuncs.http.MethodType
;
import
com.aliyuncs.http.MethodType
;
import
com.aliyuncs.profile.DefaultProfile
;
import
com.aliyuncs.profile.DefaultProfile
;
import
com.aliyuncs.profile.IClientProfile
;
import
com.aliyuncs.profile.IClientProfile
;
/**
* @ClassName: 短信发送工具类
* @Author: Carl
* @Date: 2020/12/1
* @Version:
*/
public
class
SMSUtils
{
public
class
SMSUtils
{
public
static
final
String
VALIDATE_CODE
=
"SMS_205878938"
;
//发送短信验证码模板编码 模版CODE
public
static
void
main
(
String
[]
args
)
{
public
static
final
String
ORDER_NOTICE
=
"SMS_159771588"
;
//体检预约成功通知
sendMessage
(
loginTemplate
,
ValidateCodeUtils
.
generateValidateCode
(
6
),
"18279617424"
);
private
static
final
String
SIGN_NAEM
=
"万家数据商城"
;
// 短信的签名
}
private
static
final
String
PARAMETER_NAME
=
"code"
;
// 你的签名
private
static
final
String
ACCESS_KEY
=
"LTAI4GKPoTkrT6n2fSV7ePEG"
;
//你的AccessKey ID
private
static
final
String
msgSign
=
"万家数据商城"
;
private
static
final
String
SECRET_KEY
=
"k8HcW3TxZzGxAetEpyDInZehip9MAE"
;
//你的AccessKey Secret
//模版CODE
// public static final String orderTemplate = "SMS_198667732";
// public static void main(String[] args) throws ClientException {
// public static final String registerTemplate = "SMS_198672338";
// SMSUtils.sendShortMessage(VALIDATE_CODE,"19979232865","55555555");
public
static
final
String
loginTemplate
=
"SMS_205878938"
;
// }
// AK,AKS
private
static
final
String
accessKeyId
=
"LTAI4GKPoTkrT6n2fSV7ePEG"
;
/**
private
static
final
String
accessKeySecret
=
"k8HcW3TxZzGxAetEpyDInZehip9MAE"
;
*
// 阿里云发送验证码短信
* @param templateCode
public
static
void
sendMessage
(
String
template
,
Integer
code
,
String
toPhoneNumber
)
{
* @param phoneNumbers
//设置超时时间-可自行调整
* @param param
* @throws
*/
public
static
void
sendShortMessage
(
String
templateCode
,
String
phoneNumbers
,
String
param
)
throws
Exception
{
// 设置超时时间-可自行调整
System
.
setProperty
(
"sun.net.client.defaultConnectTimeout"
,
"10000"
);
System
.
setProperty
(
"sun.net.client.defaultConnectTimeout"
,
"10000"
);
System
.
setProperty
(
"sun.net.client.defaultReadTimeout"
,
"10000"
);
System
.
setProperty
(
"sun.net.client.defaultReadTimeout"
,
"10000"
);
// 初始化ascClient需要的几个参数
//初始化ascClient需要的几个参数
final
String
product
=
"Dysmsapi"
;
// 短信API产品名称(短信产品名固定,无需修改)
final
String
product
=
"Dysmsapi"
;
//短信API产品名称(短信产品名固定,无需修改)
final
String
domain
=
"dysmsapi.aliyuncs.com"
;
// 短信API产品域名(接口地址固定,无需修改)
final
String
domain
=
"dysmsapi.aliyuncs.com"
;
//短信API产品域名(接口地址固定,无需修改)
// 替换成你的AK
//替换成你的AK
final
String
accessKeyId
=
"LTAIak3CfAehK7cE"
;
// 你的accessKeyId,参考本文档步骤2
//初始化ascClient,暂时不支持多region(请勿修改)
final
String
accessKeySecret
=
"zsykwhTIFa48f8fFdU06GOKjHWHel4"
;
// 你的accessKeySecret,参考本文档步骤2
IClientProfile
profile
=
DefaultProfile
.
getProfile
(
"cn-hangzhou"
,
accessKeyId
,
// 初始化ascClient,暂时不支持多region(请勿修改)
accessKeySecret
);
IClientProfile
profile
=
DefaultProfile
.
getProfile
(
"cn-hangzhou"
,
ACCESS_KEY
,
SECRET_KEY
);
try
{
DefaultProfile
.
addEndpoint
(
"cn-hangzhou"
,
"cn-hangzhou"
,
product
,
domain
);
DefaultProfile
.
addEndpoint
(
"cn-hangzhou"
,
"cn-hangzhou"
,
product
,
domain
);
}
catch
(
ClientException
e
)
{
e
.
printStackTrace
();
}
IAcsClient
acsClient
=
new
DefaultAcsClient
(
profile
);
IAcsClient
acsClient
=
new
DefaultAcsClient
(
profile
);
// 组装请求对象
//组装请求对象
SendSmsRequest
request
=
new
SendSmsRequest
();
SendSmsRequest
request
=
new
SendSmsRequest
();
// 使用post提交
//使用post提交
request
.
setMethod
(
MethodType
.
POST
);
request
.
setMethod
(
MethodType
.
GET
);
// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式;发送国际/港澳台消息时,接收号码格式为国际区号+号码,如“85200000000”
request
.
setPhoneNumbers
(
phoneNumbers
);
request
.
setPhoneNumbers
(
toPhoneNumber
);
// 必填:短信签名-可在短信控制台中找到
//必填:短信签名-可在短信控制台中找到
request
.
setSignName
(
SIGN_NAEM
);
request
.
setSignName
(
msgSign
);
// 必填:短信模板-可在短信控制台中找到
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
request
.
setTemplateCode
(
templateCode
);
request
.
setTemplateCode
(
template
);
// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
//友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
//request.setTemplateParam("{\"code\":\""+param+"\"}");
//参考:request.setTemplateParam("{\"变量1\":\"值1\",\"变量2\":\"值2\",\"变量3\":\"值3\"}")
request
.
setTemplateParam
(
String
.
format
(
"{\"%s\":\"%s\"}"
,
PARAMETER_NAME
,
param
));
request
.
setTemplateParam
(
"{\"code\":\""
+
code
+
"\"}"
);
// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
//可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
// request.setSmsUpExtendCode("90997");
//request.setSmsUpExtendCode("90997");
// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
// request.setOutId("yourOutId");
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
// 请求失败这里会抛ClientException异常
request
.
setOutId
(
"yourOutId"
);
SendSmsResponse
sendSmsResponse
=
acsClient
.
getAcsResponse
(
request
);
if
(
sendSmsResponse
.
getCode
()
!=
null
&&
sendSmsResponse
.
getCode
().
equals
(
"OK"
))
{
//请求失败这里会抛ClientException异常
// 请求成功
SendSmsResponse
sendSmsResponse
=
null
;
System
.
out
.
println
(
"请求成功"
);
try
{
}
else
{
sendSmsResponse
=
acsClient
.
getAcsResponse
(
request
);
System
.
out
.
println
(
sendSmsResponse
.
getMessage
());
}
catch
(
ClientException
e
)
{
e
.
printStackTrace
();
}
if
(
sendSmsResponse
.
getCode
()
!=
null
&&
sendSmsResponse
.
getCode
().
equals
(
"OK"
))
{
//请求成功
}
}
}
}
}
}
jz-dm-mall/pom.xml
View file @
4e952e04
...
@@ -74,10 +74,10 @@
...
@@ -74,10 +74,10 @@
</dependency>
</dependency>
<!-- spring boot 和mybatis -->
<!-- spring boot 和mybatis -->
<dependency>
<
!--<
dependency>
<groupId>org.mybatis.spring.boot</groupId>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
</dependency>
-->
<!-- mybatis plus -->
<!-- mybatis plus -->
<dependency>
<dependency>
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
<groupId>
com.github.pagehelper
</groupId>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper
</artifactId>
<artifactId>
pagehelper
</artifactId>
</dependency>
</dependency>
<!-- druid数据库连接池 -->
<!-- druid数据库连接池 -->
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
...
@@ -125,6 +125,10 @@
...
@@ -125,6 +125,10 @@
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
commons-net
</groupId>
<artifactId>
commons-net
</artifactId>
</dependency>
<!-- common公共模块 -->
<!-- common公共模块 -->
<dependency>
<dependency>
<groupId>
com.jz.common
</groupId>
<groupId>
com.jz.common
</groupId>
...
@@ -132,6 +136,10 @@
...
@@ -132,6 +136,10 @@
<version>
1.0.0-SNAPSHOT
</version>
<version>
1.0.0-SNAPSHOT
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
</dependency>
</dependencies>
</dependencies>
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/Application.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
;
package
com
.
jz
.
dm
.
mall
;
import
com.jz.common.utils.HttpsUtils
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
@@ -21,8 +22,10 @@ public class Application {
...
@@ -21,8 +22,10 @@ public class Application {
}
}
@Bean
public
RestTemplate
restTemplate
()
{
return
new
RestTemplate
();
// @Bean
}
// public HttpsUtils httpsUtils() {
// return new HttpsUtils();
// }
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/config/DatabaseConfig.java
View file @
4e952e04
...
@@ -21,10 +21,10 @@ import java.sql.SQLException;
...
@@ -21,10 +21,10 @@ import java.sql.SQLException;
* @Date: 2018/8/16 16:49
* @Date: 2018/8/16 16:49
* @Description: 主数据源配置类
* @Description: 主数据源配置类
*/
*/
@Configuration
//
@Configuration
// 前缀为primary.datasource.druid的配置信息
// 前缀为primary.datasource.druid的配置信息
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
//
@ConfigurationProperties(prefix = "spring.datasource")
@MapperScan
(
basePackages
=
DatabaseConfig
.
PACKAGE
,
sqlSessionFactoryRef
=
"sqlSessionFactory"
)
//
@MapperScan(basePackages = DatabaseConfig.PACKAGE, sqlSessionFactoryRef = "sqlSessionFactory")
public
class
DatabaseConfig
{
public
class
DatabaseConfig
{
/**
/**
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/config/mybatisPlusConfig/MybatisPlusConfig.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
config
.
mybatisPlusConfig
;
package
com
.
jz
.
dm
.
mall
.
config
.
mybatisPlusConfig
;
import
com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
...
@@ -29,6 +30,14 @@ public class MybatisPlusConfig {
...
@@ -29,6 +30,14 @@ public class MybatisPlusConfig {
paginationInterceptor
.
setCountSqlParser
(
new
JsqlParserCountOptimize
(
true
));
paginationInterceptor
.
setCountSqlParser
(
new
JsqlParserCountOptimize
(
true
));
return
paginationInterceptor
;
return
paginationInterceptor
;
}
}
@Bean
ConfigurationCustomizer
mybatisConfigurationCustomizer
()
{
return
new
ConfigurationCustomizer
()
{
@Override
public
void
customize
(
org
.
apache
.
ibatis
.
session
.
Configuration
configuration
)
{
configuration
.
addInterceptor
(
new
com
.
github
.
pagehelper
.
PageInterceptor
());
}
};
}
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/customer/MallCustomerController.java
View file @
4e952e04
...
@@ -115,10 +115,16 @@ public class MallCustomerController extends BaseController {
...
@@ -115,10 +115,16 @@ public class MallCustomerController extends BaseController {
return
new
Result
(
false
,
"密码修改失败"
,
StatusCode
.
ERROR
);
return
new
Result
(
false
,
"密码修改失败"
,
StatusCode
.
ERROR
);
}
}
// @PostMapping(value = "/upPassword")
@PostMapping
(
"/getMenu"
)
// @ApiModelProperty(value = "忘记密码")
@ApiOperation
(
value
=
"商城--角色展示菜单"
,
notes
=
"用户角色展示菜单"
)
// public Result upPassword(@RequestBody CustomerRequest customer) throws Exception {
public
Result
getMenu
(
@RequestParam
(
name
=
"userId"
)
Long
userId
,
// mallCustomerService.upPassword(customer);
@RequestParam
(
name
=
"roleId"
)
Long
roleId
)
{
// return new Result(true, "密码修改成功", StatusCode.OK);
Result
menu
=
mallCustomerService
.
getMenu
(
userId
,
roleId
);
// }
if
(!
StringUtils
.
isEmpty
(
menu
))
{
menu
.
setMsg
(
"查询菜单成功!"
);
menu
.
setCode
(
StatusCode
.
OK
);
return
menu
;
}
return
new
Result
(
false
,
"查询菜单失败!"
,
StatusCode
.
ERROR
);
}
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/customer/ValidateCodeController.java
View file @
4e952e04
...
@@ -3,13 +3,15 @@ package com.jz.dm.mall.moduls.controller.customer;
...
@@ -3,13 +3,15 @@ package com.jz.dm.mall.moduls.controller.customer;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.SMSUtils
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.common.utils.ValidateCodeUtils
;
import
com.jz.common.utils.ValidateCodeUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
@@ -43,19 +45,13 @@ public class ValidateCodeController {
...
@@ -43,19 +45,13 @@ public class ValidateCodeController {
// 通过手机号从redis获取验证码
// 通过手机号从redis获取验证码
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
if
(!
StringUtils
.
isEmpty
(
codeInRedis
))
{
if
(
codeInRedis
!=
null
&&
!
codeInRedis
.
equals
(
""
))
{
return
new
Result
(
false
,
"验证码已发送,请注意查收!"
,
StatusCode
.
ERROR
);
// redis中的验证码还未过期
}
else
{
return
new
Result
(
false
,
"验证码发送失败!"
,
StatusCode
.
ERROR
);
// 生成验证码
}
else
{
String
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
)
+
""
;
// redis中无此手机号的验证码,发送验证码
// 发送
Integer
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
);
try
{
SMSUtils
.
sendMessage
(
SMSUtils
.
loginTemplate
,
code
,
telephone
);
// SMSUtils.sendShortMessage(SMSUtils.VALIDATE_CODE, telephone, code);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
new
Result
(
false
,
"验证码发送失败!"
,
StatusCode
.
ERROR
);
}
// 存入redis, 有效期为5分钟
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
return
new
Result
(
true
,
"验证码发送成功!"
,
StatusCode
.
OK
);
return
new
Result
(
true
,
"验证码发送成功!"
,
StatusCode
.
OK
);
}
}
...
@@ -69,25 +65,19 @@ public class ValidateCodeController {
...
@@ -69,25 +65,19 @@ public class ValidateCodeController {
*/
*/
@GetMapping
(
"/send4Code"
)
@GetMapping
(
"/send4Code"
)
@ApiOperation
(
value
=
"修改密码发送验证码"
)
@ApiOperation
(
value
=
"修改密码发送验证码"
)
public
Result
send4Code
(
@RequestParam
(
value
=
"telephone"
)
String
telephone
)
{
public
Result
send4Code
(
@RequestParam
(
value
=
"telephone"
)
String
telephone
)
throws
Exception
{
String
key
=
RedisMessageConstant
.
SENDTYPE_LOGIN
+
"_"
+
telephone
;
String
key
=
RedisMessageConstant
.
SENDTYPE_LOGIN
+
"_"
+
telephone
;
// 通过手机号从redis获取验证码
// 通过手机号从redis获取验证码
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
if
(!
StringUtils
.
isEmpty
(
codeInRedis
))
{
if
(
codeInRedis
!=
null
&&
!
codeInRedis
.
equals
(
""
))
{
return
new
Result
(
false
,
"验证码已发送,请注意查收!"
,
StatusCode
.
ERROR
);
// redis中的验证码还未过期
return
new
Result
(
false
,
"验证码发送失败!"
,
StatusCode
.
ERROR
);
}
else
{
}
else
{
// 生成验证码
// redis中无此手机号的验证码,发送验证码
String
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
)
+
""
;
Integer
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
);
// 发送
SMSUtils
.
sendMessage
(
SMSUtils
.
loginTemplate
,
code
,
telephone
);
try
{
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
// SMSUtils.sendShortMessage(SMSUtils.VALIDATE_CODE, telephone, code);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
new
Result
(
false
,
"验证码发送失败!"
,
StatusCode
.
ERROR
);
}
// 存入redis, 有效期为5分钟
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
return
new
Result
(
true
,
"验证码发送成功!"
,
StatusCode
.
OK
);
return
new
Result
(
true
,
"验证码发送成功!"
,
StatusCode
.
OK
);
}
}
}
}
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/file/PictureController.java
0 → 100644
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
file
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.service.PictureService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
/** * @ClassName:
* @Author: Carl
* @Date: 2021/1/12
* @Version:
*/
@RestController
@Api
(
tags
=
"图片处理"
)
public
class
PictureController
{
@Autowired
private
PictureService
pictureService
;
@PostMapping
(
"/uploadPicture"
)
@ApiOperation
(
value
=
"图片上传"
)
@ResponseBody
public
Result
uploadPicture
(
MultipartFile
file
,
@RequestParam
(
name
=
"params"
)
String
params
)
{
// Map<String, Object> paramer = dataGoodsService.uploadPicture(file);
Result
result
=
pictureService
.
uploadPicture
(
file
,
params
);
return
result
;
}
@GetMapping
(
"/downloadPicture"
)
@ApiOperation
(
value
=
"图片下载"
)
public
Result
downloadPicture
(
@RequestParam
(
name
=
"url"
)
String
url
,
HttpServletResponse
response
)
{
Result
result
=
pictureService
.
downloadPicture
(
url
,
response
);
return
result
;
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/goods/DataGoodsCategoryController.java
View file @
4e952e04
...
@@ -7,6 +7,7 @@ import com.jz.dm.mall.moduls.service.DataGoodsCategoryService;
...
@@ -7,6 +7,7 @@ import com.jz.dm.mall.moduls.service.DataGoodsCategoryService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -27,12 +28,14 @@ public class DataGoodsCategoryController extends BaseController {
...
@@ -27,12 +28,14 @@ public class DataGoodsCategoryController extends BaseController {
*/
*/
@Autowired
@Autowired
private
DataGoodsCategoryService
categoryService
;
private
DataGoodsCategoryService
categoryService
;
@GetMapping
(
value
=
"/findCategory"
)
@GetMapping
(
value
=
"/findCategory/{pid}"
)
@ApiOperation
(
value
=
"查询数据商品分类"
,
notes
=
"查询所有的商品分类"
)
@ApiOperation
(
value
=
"查询数据商品分类"
,
notes
=
"查询父类下的商品分类"
)
public
Result
findCategory
()
{
public
Result
findCategory
(
@PathVariable
(
value
=
"pid"
)
Long
pid
)
{
Result
result
=
categoryService
.
findCategory
();
// categoryService.findCateGory
if
(
StringUtils
.
isEmpty
(
result
))
{
return
null
;
return
Result
.
of_error
(
"查询失败!"
);
}
return
result
;
}
}
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/entity/DataGoodsCategory.java
View file @
4e952e04
...
@@ -2,9 +2,11 @@ package com.jz.dm.mall.moduls.entity;
...
@@ -2,9 +2,11 @@ package com.jz.dm.mall.moduls.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 数据商品分类(行业)(TDataGoodsCategory)实体类
* 数据商品分类(行业)(TDataGoodsCategory)实体类
...
@@ -14,6 +16,7 @@ import java.util.Date;
...
@@ -14,6 +16,7 @@ import java.util.Date;
*/
*/
@TableName
(
"t_data_goods_category"
)
@TableName
(
"t_data_goods_category"
)
@ApiModel
@ApiModel
@Data
public
class
DataGoodsCategory
implements
Serializable
{
public
class
DataGoodsCategory
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
54881838919746328L
;
private
static
final
long
serialVersionUID
=
-
54881838919746328L
;
/**
/**
...
@@ -44,60 +47,7 @@ public class DataGoodsCategory implements Serializable {
...
@@ -44,60 +47,7 @@ public class DataGoodsCategory implements Serializable {
private
String
delFlag
;
private
String
delFlag
;
public
Long
getCategoryId
()
{
private
List
<
DataGoodsCategory
>
children
;
return
categoryId
;
}
public
void
setCategoryId
(
Long
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getIfChild
()
{
return
ifChild
;
}
public
void
setIfChild
(
String
ifChild
)
{
this
.
ifChild
=
ifChild
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
Date
getUptTime
()
{
return
uptTime
;
}
public
void
setUptTime
(
Date
uptTime
)
{
this
.
uptTime
=
uptTime
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/entity/MallMenu.java
0 → 100644
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/14
* @Version:
*/
@TableName
(
"t_mall_menu"
)
@ApiModel
@Data
public
class
MallMenu
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6052333871675767623L
;
/**
* 菜单ID
*/
@TableId
(
value
=
"menu_id"
,
type
=
IdType
.
AUTO
)
private
Long
menuId
;
/**
* 菜单名称
*/
@ApiModelProperty
(
value
=
"菜单名称"
)
private
String
menuName
;
/**
* 菜单路径
*/
@ApiModelProperty
(
value
=
"菜单路径url"
)
private
String
url
;
/**
* 父级id
*/
@ApiModelProperty
(
value
=
"父级id"
)
private
Long
parentId
;
/**
* 是否为子节点:Y是,N否
*/
@ApiModelProperty
(
value
=
"是否为子节点:Y是,N否"
)
private
String
ifChild
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creTime
;
/**
* 创建人
*/
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
crePerson
;
/**
* 删除标识:Y删除,N未删除
*/
@ApiModelProperty
(
value
=
"删除标识:Y删除,N未删除"
)
private
String
delFlag
;
private
List
<
MallMenu
>
children
;
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/DataGoodsCategoryDao.java
View file @
4e952e04
...
@@ -3,6 +3,8 @@ package com.jz.dm.mall.moduls.mapper;
...
@@ -3,6 +3,8 @@ package com.jz.dm.mall.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.entity.DataGoodsCategory
;
import
com.jz.dm.mall.moduls.entity.DataGoodsCategory
;
import
java.util.List
;
/**
/**
* 数据商品分类(行业)(TDataGoodsCategory)表数据库访问层
* 数据商品分类(行业)(TDataGoodsCategory)表数据库访问层
...
@@ -13,4 +15,5 @@ import com.jz.dm.mall.moduls.entity.DataGoodsCategory;
...
@@ -13,4 +15,5 @@ import com.jz.dm.mall.moduls.entity.DataGoodsCategory;
public
interface
DataGoodsCategoryDao
extends
BaseMapper
<
DataGoodsCategory
>
{
public
interface
DataGoodsCategoryDao
extends
BaseMapper
<
DataGoodsCategory
>
{
List
<
DataGoodsCategory
>
selectByList
();
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
View file @
4e952e04
...
@@ -4,6 +4,8 @@ import com.jz.common.base.BaseMapper;
...
@@ -4,6 +4,8 @@ import com.jz.common.base.BaseMapper;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerAssets
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerAssets
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerBalance
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerBalance
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.ResultType
;
import
org.apache.ibatis.annotations.Select
;
/**
/**
* 商城企业客户资产(TFinanceCustomerAssets)表数据库访问层
* 商城企业客户资产(TFinanceCustomerAssets)表数据库访问层
...
@@ -26,8 +28,6 @@ public interface FinanceCustomerAssetsDao extends BaseMapper<FinanceCustomerAsse
...
@@ -26,8 +28,6 @@ public interface FinanceCustomerAssetsDao extends BaseMapper<FinanceCustomerAsse
FinanceCustomerAssets
findById
(
@Param
(
"assetsId"
)
Long
assetsId
);
FinanceCustomerAssets
findById
(
@Param
(
"assetsId"
)
Long
assetsId
);
void
updateAssets
(
FinanceCustomerAssets
assets
);
void
updateAssets
(
FinanceCustomerAssets
assets
);
// 修改金额
// 修改金额
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/MallCustomerDao.java
View file @
4e952e04
...
@@ -3,9 +3,11 @@ package com.jz.dm.mall.moduls.mapper;
...
@@ -3,9 +3,11 @@ package com.jz.dm.mall.moduls.mapper;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.entity.MallMenu
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -60,4 +62,13 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
...
@@ -60,4 +62,13 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
*/
*/
int
updatePassword
(
MallCustomer
customer
);
int
updatePassword
(
MallCustomer
customer
);
/**
* 根据用户id,角色id查找菜单
* @param userId
* @param roleId
* @return
*/
List
<
MallMenu
>
getMenu
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"roleId"
)
Long
roleId
);
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/DataGoodsCategoryService.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.utils.Result
;
/**
/**
* 数据商品分类(行业)(TDataGoodsCategory)表服务接口
* 数据商品分类(行业)(TDataGoodsCategory)表服务接口
*
*
...
@@ -9,4 +11,6 @@ package com.jz.dm.mall.moduls.service;
...
@@ -9,4 +11,6 @@ package com.jz.dm.mall.moduls.service;
public
interface
DataGoodsCategoryService
{
public
interface
DataGoodsCategoryService
{
Result
findCategory
();
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/MallCustomerService.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest
;
import
com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
...
@@ -56,6 +57,14 @@ public interface MallCustomerService {
...
@@ -56,6 +57,14 @@ public interface MallCustomerService {
*/
*/
MallCustomer
selectByUser
(
Long
customerId
);
MallCustomer
selectByUser
(
Long
customerId
);
/**
* 根据用户id,姐角色id查找菜单
* @param userId
* @param roleId
* @return
*/
Result
getMenu
(
Long
userId
,
Long
roleId
);
// /**
// /**
// * 忘记密码
// * 忘记密码
// * @param customer
// * @param customer
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/PictureService.java
0 → 100644
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.utils.Result
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/12
* @Version:
*/
public
interface
PictureService
{
/**
* 图片上传
* @param file
* @return
*/
Result
uploadPicture
(
MultipartFile
file
,
String
params
);
/**
* 图片下载
* @param url
* @return
*/
Result
downloadPicture
(
String
url
,
HttpServletResponse
response
);
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/DataGoodsCategoryServiceImpl.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.entity.DataGoodsCategory
;
import
com.jz.dm.mall.moduls.mapper.DataGoodsCategoryDao
;
import
com.jz.dm.mall.moduls.mapper.DataGoodsCategoryDao
;
import
com.jz.dm.mall.moduls.service.DataGoodsCategoryService
;
import
com.jz.dm.mall.moduls.service.DataGoodsCategoryService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 数据商品分类(行业)(TDataGoodsCategory)表服务实现类
* 数据商品分类(行业)(TDataGoodsCategory)表服务实现类
*
*
...
@@ -15,6 +21,39 @@ import org.springframework.stereotype.Service;
...
@@ -15,6 +21,39 @@ import org.springframework.stereotype.Service;
@Service
(
"dataGoodsCategoryService"
)
@Service
(
"dataGoodsCategoryService"
)
public
class
DataGoodsCategoryServiceImpl
implements
DataGoodsCategoryService
{
public
class
DataGoodsCategoryServiceImpl
implements
DataGoodsCategoryService
{
@Autowired
@Autowired
private
DataGoodsCategoryDao
tDataGoodsCategoryDao
;
private
DataGoodsCategoryDao
categoryDao
;
/**
* 查询所有的商品分类
*
* @return
*/
@Override
public
Result
findCategory
()
{
//1、查出所有分类
List
<
DataGoodsCategory
>
entities
=
categoryDao
.
selectByList
();
// 找到所有的一级分类
List
<
DataGoodsCategory
>
level1Menus
=
entities
.
stream
().
filter
(
categoryEntity
->
categoryEntity
.
getParentId
()
==
0
&&
categoryEntity
.
getIfChild
().
equals
(
"N"
)
// categoryEntity ->
// categoryEntity.getParentId() == 0 && categoryEntity.getIfChild().equals("N")
).
map
((
menu
)->{
menu
.
setChildren
(
getChildrens
(
menu
,
entities
));
return
menu
;
}).
collect
(
Collectors
.
toList
());
return
Result
.
of_success
(
ResultMsg
.
SUCCESS
,
level1Menus
);
}
private
List
<
DataGoodsCategory
>
getChildrens
(
DataGoodsCategory
root
,
List
<
DataGoodsCategory
>
all
)
{
List
<
DataGoodsCategory
>
children
=
all
.
stream
().
filter
(
categoryEntity
->
{
return
categoryEntity
.
getParentId
()
==
root
.
getCategoryId
()
&&
categoryEntity
.
getIfChild
().
equals
(
"Y"
);
}).
map
(
categoryEntity
->
{
//1、找到子菜单,同时递归调用
categoryEntity
.
setChildren
(
getChildrens
(
categoryEntity
,
all
));
return
categoryEntity
;
}).
collect
(
Collectors
.
toList
());
}
return
children
;
\ No newline at end of file
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
View file @
4e952e04
...
@@ -9,6 +9,7 @@ import com.jz.common.constant.Constants;
...
@@ -9,6 +9,7 @@ import com.jz.common.constant.Constants;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.utils.CommonsUtil
;
import
com.jz.common.utils.CommonsUtil
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.finance.bean.*
;
import
com.jz.dm.mall.moduls.controller.finance.bean.*
;
import
com.jz.dm.mall.moduls.entity.FinanceCashOut
;
import
com.jz.dm.mall.moduls.entity.FinanceCashOut
;
...
@@ -59,17 +60,32 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
...
@@ -59,17 +60,32 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
uptAccountMoney
(
FinanceCustomerBalanceRequest
customerBalanceRequest
)
throws
Exception
{
public
Boolean
uptAccountMoney
(
FinanceCustomerBalanceRequest
customerBalanceRequest
)
throws
Exception
{
//1.充值记录表中加数据
if
(
customerBalanceRequest
.
getAssetsId
()
!=
null
&&
StringUtils
.
isNotEmpty
(
customerBalanceRequest
.
getBalanceMoney
().
toString
()))
{
FinanceCustomerBalance
financeCustomerBalance
=
new
FinanceCustomerBalance
();
// 商城企业客户资产表 冻结金额
financeCustomerBalance
.
setAssetsId
(
customerBalanceRequest
.
getAssetsId
());
//企业资产id
FinanceCustomerAssets
assets
=
financeCustomerAssetsDao
.
findById
(
customerBalanceRequest
.
getAssetsId
());
financeCustomerBalance
.
setBalanceMoney
(
customerBalanceRequest
.
getBalanceMoney
());
//充值金额
BigDecimal
frozenMoney
=
assets
.
getFrozenMoney
();
financeCustomerBalance
.
setCrePerson
(
getUser
().
getCustomerId
()+
""
);
if
(
frozenMoney
.
compareTo
(
BigDecimal
.
ZERO
)
>
-
1
)
{
financeCustomerBalance
.
setCreTime
(
new
Date
());
// 添加冻结金额
financeCustomerBalance
.
setAuditStatus
(
"01"
);
//待审核
BigDecimal
add
=
frozenMoney
.
add
(
customerBalanceRequest
.
getBalanceMoney
());
financeCustomerBalance
.
setRemark
(
customerBalanceRequest
.
getRemark
());
//备注
assets
.
setFrozenMoney
(
add
);
financeCustomerBalance
.
setDelFlag
(
"N"
);
assets
.
setUptPerson
(
getUser
().
getCustomerId
()
+
""
);
int
len
=
financeCustomerAssetsDao
.
addCoustomerCzMoney
(
financeCustomerBalance
);
assets
.
setUptTime
(
DateUtils
.
getToday
());
return
len
>
0
;
financeCustomerAssetsDao
.
updateMoney
(
assets
);
}
//1.充值记录表中加数据
FinanceCustomerBalance
financeCustomerBalance
=
new
FinanceCustomerBalance
();
financeCustomerBalance
.
setAssetsId
(
customerBalanceRequest
.
getAssetsId
());
//企业资产id
financeCustomerBalance
.
setBalanceMoney
(
customerBalanceRequest
.
getBalanceMoney
());
//充值金额
financeCustomerBalance
.
setCrePerson
(
getUser
().
getCustomerId
()+
""
);
financeCustomerBalance
.
setCreTime
(
new
Date
());
financeCustomerBalance
.
setAuditStatus
(
"01"
);
//待审核
financeCustomerBalance
.
setRemark
(
customerBalanceRequest
.
getRemark
());
//备注
financeCustomerBalance
.
setDelFlag
(
"N"
);
int
len
=
financeCustomerAssetsDao
.
addCoustomerCzMoney
(
financeCustomerBalance
);
return
len
>
0
;
}
return
false
;
}
}
@Override
@Override
...
@@ -117,29 +133,32 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
...
@@ -117,29 +133,32 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
if
(
useMoney
!=
null
&&
cashOutMoney
!=
null
)
{
if
(
useMoney
!=
null
&&
cashOutMoney
!=
null
)
{
if
(
useMoney
.
compareTo
(
cashOutMoney
)
>
-
1
)
{
//可用大于等于提现
if
(
useMoney
.
compareTo
(
cashOutMoney
)
>
-
1
)
{
//可用大于等于提现
useMoney
=
useMoney
.
subtract
(
cashOutMoney
);
//可用 减去 提现
useMoney
=
useMoney
.
subtract
(
cashOutMoney
);
//可用 减去 提现
BigDecimal
djMoney
=
new
BigDecimal
(
dto
.
getFrozenMoney
().
toString
());
//冻结金额
BigDecimal
djMoney
=
new
BigDecimal
(
dto
.
getFrozenMoney
().
toString
());
//冻结金额
djMoney
=
djMoney
.
add
(
cashOutMoney
);
//累计冻结金额
// 冻结金额必须大于等于0
if
(
djMoney
.
compareTo
(
BigDecimal
.
ZERO
)
>
-
1
)
{
//修改企业资产 金额
djMoney
=
djMoney
.
add
(
cashOutMoney
);
//累计冻结金额
FinanceCustomerAssets
assets
=
new
FinanceCustomerAssets
();
assets
.
setUptTime
(
new
Date
());
//修改企业资产 金额
assets
.
setUptPerson
(
getUser
().
getCustomerId
()+
""
);
FinanceCustomerAssets
assets
=
new
FinanceCustomerAssets
();
assets
.
setUseMoney
(
useMoney
);
assets
.
setUptTime
(
new
Date
());
assets
.
setFrozenMoney
(
djMoney
);
assets
.
setUptPerson
(
getUser
().
getCustomerId
()
+
""
);
assets
.
setTotalMoney
(
useMoney
);
assets
.
setUseMoney
(
useMoney
);
assets
.
setAssetsId
(
assetId
);
assets
.
setFrozenMoney
(
djMoney
);
int
lens
=
financeCustomerAssetsDao
.
uptAccountMoney
(
assets
);
assets
.
setTotalMoney
(
useMoney
);
if
(
lens
==
0
)
{
assets
.
setAssetsId
(
assetId
);
result
.
setMessage
(
"提交失败!"
);
int
lens
=
financeCustomerAssetsDao
.
uptAccountMoney
(
assets
);
if
(
lens
==
0
)
{
result
.
setMessage
(
"提交失败!"
);
result
.
setCode
(
500
);
return
result
;
}
}
else
{
result
.
setMessage
(
"提现金额必须小于等于可用金额!"
);
result
.
setCode
(
500
);
result
.
setCode
(
500
);
return
result
;
return
result
;
}
}
}
else
{
result
.
setMessage
(
"提现金额必须小于等于可用金额!"
);
result
.
setCode
(
500
);
return
result
;
}
}
return
Result
.
error
(
"金额小于0!"
);
}
}
return
result
;
return
result
;
}
}
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/LogInfoServiceImpl.java
View file @
4e952e04
...
@@ -56,7 +56,7 @@ public class LogInfoServiceImpl implements LogInfoService {
...
@@ -56,7 +56,7 @@ public class LogInfoServiceImpl implements LogInfoService {
public
PageInfoResponse
<
PlatformLog
>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
public
PageInfoResponse
<
PlatformLog
>
getMallUserLogInfo
(
LogInfoQueryReq
req
,
HttpServletRequest
request
)
{
PageInfoResponse
<
PlatformLog
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageInfoResponse
<
PlatformLog
>
pageInfoResponse
=
new
PageInfoResponse
<>();
//MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
//MallCustomerApiDto currentUser = CurrentUser.getCurrentUser(request);
MallCustomerApiDto
currentUser
=
(
MallCustomerApiDto
)
redisTemplate
.
opsForValue
().
get
(
"
user
_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_CUSTOMER
);
MallCustomerApiDto
currentUser
=
(
MallCustomerApiDto
)
redisTemplate
.
opsForValue
().
get
(
"
USER
_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_CUSTOMER
);
// System.out.println(currentUser.getCustomerName());
// System.out.println(currentUser.getCustomerName());
if
(
null
==
currentUser
)
{
if
(
null
==
currentUser
)
{
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/MallCustomerServiceImpl.java
View file @
4e952e04
...
@@ -3,13 +3,16 @@ package com.jz.dm.mall.moduls.service.impl;
...
@@ -3,13 +3,16 @@ package com.jz.dm.mall.moduls.service.impl;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.enums.UserTypeEnum
;
import
com.jz.common.enums.UserTypeEnum
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.common.utils.SessionUtils
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto
;
import
com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest
;
import
com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.entity.MallMenu
;
import
com.jz.dm.mall.moduls.mapper.MallCustomerDao
;
import
com.jz.dm.mall.moduls.mapper.MallCustomerDao
;
import
com.jz.dm.mall.moduls.service.MallCustomerService
;
import
com.jz.dm.mall.moduls.service.MallCustomerService
;
...
@@ -18,10 +21,9 @@ import org.springframework.data.redis.core.RedisTemplate;
...
@@ -18,10 +21,9 @@ import org.springframework.data.redis.core.RedisTemplate;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.xml.crypto.Data
;
import
java.util.List
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -62,8 +64,9 @@ public class MallCustomerServiceImpl implements MallCustomerService {
...
@@ -62,8 +64,9 @@ public class MallCustomerServiceImpl implements MallCustomerService {
request
.
getSession
().
setAttribute
(
"mallCustomer"
,
mallCustomerApiDto
);
request
.
getSession
().
setAttribute
(
"mallCustomer"
,
mallCustomerApiDto
);
// 存入到redis
// 存入到redis
redisTemplate
.
opsForValue
().
set
(
"USER_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_CUSTOMER
,
mallCustomerApiDto
,
3
,
TimeUnit
.
DAYS
);
redisTemplate
.
opsForValue
().
set
(
"USER_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_CUSTOMER
,
mallCustomerApiDto
,
3
,
TimeUnit
.
DAYS
);
}
}
return
mallCustomer
;
return
mallCustomer
;
}
}
...
@@ -167,16 +170,41 @@ public class MallCustomerServiceImpl implements MallCustomerService {
...
@@ -167,16 +170,41 @@ public class MallCustomerServiceImpl implements MallCustomerService {
return
mallCustomer
;
return
mallCustomer
;
}
}
// /**
/**
// * 忘记密码
* 根据用户id,姐角色id查找菜单
// *
*
// * @param customer
* @param userId
// */
* @param roleId
// @Override
* @return
// public void upPassword(CustomerRequest customer) {
*/
// // 通过手机号判断是否注册过
@Override
//
public
Result
getMenu
(
Long
userId
,
Long
roleId
)
{
// }
//查询用户拥有的角色
List
<
MallMenu
>
entities
=
tMallCustomerDao
.
getMenu
(
userId
,
roleId
);
// 找到所有的一级分类
List
<
MallMenu
>
level1Menus
=
entities
.
stream
().
filter
(
sysMenuEntity
->
sysMenuEntity
.
getParentId
()
==
0
&&
sysMenuEntity
.
getIfChild
().
equals
(
"N"
)
).
map
((
menu
)->{
menu
.
setChildren
(
getChildrens
(
menu
,
entities
));
return
menu
;
}).
collect
(
Collectors
.
toList
());
return
Result
.
of_success
(
ResultMsg
.
SUCCESS
,
level1Menus
);
}
private
List
<
MallMenu
>
getChildrens
(
MallMenu
sysMenu
,
List
<
MallMenu
>
all
)
{
List
<
MallMenu
>
children
=
all
.
stream
().
filter
(
sysMenuEntity
->
{
return
sysMenuEntity
.
getParentId
()
==
sysMenu
.
getMenuId
()
&&
sysMenuEntity
.
getIfChild
().
equals
(
"Y"
);
}).
map
(
sysMenuEntity
->
{
//1、找到子菜单,同时递归调用
sysMenuEntity
.
setChildren
(
getChildrens
(
sysMenuEntity
,
all
));
return
sysMenuEntity
;
}).
collect
(
Collectors
.
toList
());
return
children
;
}
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/OrderServiceImpl.java
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.bean.MallCustomerApiDto
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.common.utils.DateUtils
;
import
com.jz.common.utils.HttpsUtils
;
import
com.jz.common.utils.HttpsUtils
Test
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.order.bean.*
;
import
com.jz.dm.mall.moduls.controller.order.bean.*
;
import
com.jz.dm.mall.moduls.entity.Order
;
import
com.jz.dm.mall.moduls.entity.Order
;
import
com.jz.dm.mall.moduls.mapper.OrderDao
;
import
com.jz.dm.mall.moduls.mapper.OrderDao
;
import
com.jz.dm.mall.moduls.service.OrderService
;
import
com.jz.dm.mall.moduls.service.OrderService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -43,8 +40,8 @@ public class OrderServiceImpl implements OrderService {
...
@@ -43,8 +40,8 @@ public class OrderServiceImpl implements OrderService {
@Autowired
@Autowired
private
OrderDao
orderDao
;
private
OrderDao
orderDao
;
@Autowired
//
@Autowired
private
HttpsUtils
httpsUtils
;
//
private HttpsUtils httpsUtils;
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
...
@@ -134,8 +131,8 @@ public class OrderServiceImpl implements OrderService {
...
@@ -134,8 +131,8 @@ public class OrderServiceImpl implements OrderService {
//调用gatway
//调用gatway
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"
authCode"
,
req
.
getGoodsToken
());
object
.
put
(
"
id"
,
req
.
getId
());
String
s
=
httpsUtils
.
submitPost
(
gatewayUpSalt
,
object
.
toString
());
String
s
=
HttpsUtilsTest
.
submitPost
(
gatewayUpSalt
,
object
.
toString
());
//处理返回的参数
//处理返回的参数
JSONObject
params
=
JSONObject
.
parseObject
(
s
);
JSONObject
params
=
JSONObject
.
parseObject
(
s
);
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
params
.
get
(
"data"
)))
{
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
params
.
get
(
"data"
)))
{
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/PayServiceImpl.java
View file @
4e952e04
...
@@ -54,8 +54,8 @@ public class PayServiceImpl implements PayService {
...
@@ -54,8 +54,8 @@ public class PayServiceImpl implements PayService {
@Autowired
@Autowired
private
FinanceTradeFlowDao
financeTradeFlowDao
;
private
FinanceTradeFlowDao
financeTradeFlowDao
;
@Autowired
//
@Autowired
private
HttpsUtils
httpsUtils
;
//
private HttpsUtils httpsUtils;
@Value
(
"${domain.gatewayGetAuth}"
)
@Value
(
"${domain.gatewayGetAuth}"
)
private
String
gatewayGetAuth
;
private
String
gatewayGetAuth
;
...
@@ -125,6 +125,7 @@ public class PayServiceImpl implements PayService {
...
@@ -125,6 +125,7 @@ public class PayServiceImpl implements PayService {
// 获取企业资产信息
// 获取企业资产信息
FinanceCustomerAssets
assets
=
financeCustomerAssetsDao
.
findById
(
payDto
.
getAssetsId
());
FinanceCustomerAssets
assets
=
financeCustomerAssetsDao
.
findById
(
payDto
.
getAssetsId
());
// Long q = financeCustomerAssetsDao.findByOne(l);
// 可用金额减去支付金额
// 可用金额减去支付金额
BigDecimal
bigDecimal
=
new
BigDecimal
(
assets
.
getUseMoney
()+
""
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
assets
.
getUseMoney
()+
""
);
BigDecimal
bigDecima2
=
new
BigDecimal
(
payDto
.
getDataPrice
()+
""
);
BigDecimal
bigDecima2
=
new
BigDecimal
(
payDto
.
getDataPrice
()+
""
);
...
@@ -150,7 +151,7 @@ public class PayServiceImpl implements PayService {
...
@@ -150,7 +151,7 @@ public class PayServiceImpl implements PayService {
apiReq
.
setOrgType
(
"OUT"
);
// TODO
apiReq
.
setOrgType
(
"OUT"
);
// TODO
apiReq
.
setUserId
(
payDto
.
getCustomerId
()
+
""
);
apiReq
.
setUserId
(
payDto
.
getCustomerId
()
+
""
);
String
post
=
httpsUtils
.
submitPost
(
gatewayGetAuth
,
JSON
.
toJSONString
(
apiReq
));
String
post
=
HttpsUtilsTest
.
submitPost
(
gatewayGetAuth
,
JSON
.
toJSONString
(
apiReq
));
System
.
out
.
println
(
post
);
System
.
out
.
println
(
post
);
JSONObject
params
=
JSONObject
.
parseObject
(
post
);
JSONObject
params
=
JSONObject
.
parseObject
(
post
);
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
StringUtils
.
isEmpty
(
params
.
get
(
"data"
))){
if
(!
params
.
get
(
"code"
).
equals
(
200
)
||
StringUtils
.
isEmpty
(
params
.
get
(
"data"
))){
...
...
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/PictureServiceImpl.java
0 → 100644
View file @
4e952e04
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.jz.common.utils.FtpUtil
;
import
com.jz.common.utils.RandomUtil
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.dm.mall.moduls.service.PictureService
;
import
org.apache.commons.net.ftp.FTPClient
;
import
org.apache.commons.net.ftp.FTPReply
;
import
org.apache.tomcat.util.http.fileupload.IOUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/12
* @Version:
*/
@Service
(
"pictureService"
)
public
class
PictureServiceImpl
implements
PictureService
{
@Value
(
"${ftp.url}"
)
private
String
ftpUrl
;
@Value
(
"${ftp.port}"
)
private
Integer
port
;
@Value
(
"${ftp.username}"
)
private
String
username
;
@Value
(
"${ftp.password}"
)
private
String
password
;
/**
* 图片上传
*
* @param file
* @return
*/
@Override
public
Result
uploadPicture
(
MultipartFile
file
,
String
params
)
{
Result
result
=
new
Result
();
if
(
file
.
getSize
()
>
10240000
)
{
return
Result
.
of_error
(
"图片格式太大,不能超过10MB!"
);
}
// 获取图片名称
String
originalFilename
=
file
.
getOriginalFilename
();
// 获取图片扩展名
String
extensionName
=
originalFilename
.
substring
(
originalFilename
.
lastIndexOf
(
"."
));
// 重新命名图片
String
picture
=
RandomUtil
.
getStringRandom
(
16
)
+
extensionName
;
// 上传图片
try
{
String
filePath
=
""
;
if
(
params
.
equals
(
"logo"
))
{
filePath
=
"/picture/logo"
;
}
else
if
(
params
.
equals
(
"businessLicense"
))
{
filePath
=
"/picture/businessLicense"
;
}
boolean
flag
=
FtpUtil
.
uploadFile
(
ftpUrl
,
port
,
username
,
password
,
"/"
,
filePath
,
picture
,
file
.
getInputStream
());
if
(
flag
)
{
String
url
=
"/manage/downloadPicture?url="
+
filePath
+
"/"
+
picture
;
result
.
setData
(
url
);
result
.
setMsg
(
"图片上传成功!"
);
}
else
{
result
.
setMsg
(
"图片上传失败!"
);
result
.
setCode
(
StatusCode
.
ERROR
);
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
result
.
setMsg
(
"图片上传失败!"
);
result
.
setCode
(
StatusCode
.
ERROR
);
}
return
result
;
}
/**
* 图片下载
*
* @param url
* @return
*/
@Override
public
Result
downloadPicture
(
String
url
,
HttpServletResponse
response
)
{
Result
result
=
new
Result
();
FTPClient
ftp
=
new
FTPClient
();
String
catalog
=
url
.
substring
(
url
.
lastIndexOf
(
"="
)+
1
);
String
remotePath
=
catalog
.
substring
(
0
,
catalog
.
lastIndexOf
(
"/"
)
+
1
);
String
furl
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)
+
1
);
String
suffix
=
catalog
.
substring
(
catalog
.
lastIndexOf
(
"."
));
try
{
int
reply
;
ftp
.
connect
(
ftpUrl
,
port
);
// 登录
ftp
.
login
(
username
,
password
);
reply
=
ftp
.
getReplyCode
();
if
(!
FTPReply
.
isPositiveCompletion
(
reply
))
{
ftp
.
disconnect
();
}
ftp
.
enterLocalPassiveMode
();
// 到FTP服务器目录
ftp
.
changeWorkingDirectory
(
remotePath
);
InputStream
in
=
ftp
.
retrieveFileStream
(
furl
);
ServletOutputStream
outputStream
=
response
.
getOutputStream
();
int
len
=
0
;
byte
[]
buffer
=
new
byte
[
1024
];
while
((
len
=
in
.
read
(
buffer
))
!=
-
1
)
{
outputStream
.
write
(
buffer
,
0
,
len
);
}
// byte[] bytes = sos.toByteArray();
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
suffix
);
IOUtils
.
copy
(
in
,
outputStream
);
in
.
close
();
outputStream
.
close
();
ftp
.
logout
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
ftp
.
isConnected
())
{
try
{
ftp
.
disconnect
();
}
catch
(
Exception
ioe
)
{
}
}
}
return
result
;
}
}
jz-dm-mall/src/main/resources/application-test.yml
View file @
4e952e04
...
@@ -12,10 +12,10 @@ management:
...
@@ -12,10 +12,10 @@ management:
spring
:
spring
:
profiles
:
test
profiles
:
test
datasource
:
datasource
:
url
:
jdbc:mysql://
rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com:3306
/wj-mkt-project?characterEncoding=utf8&useSSL=false
url
:
jdbc:mysql://
192.168.1.140:3307
/wj-mkt-project?characterEncoding=utf8&useSSL=false
driverClassName
:
com.mysql.jdbc.Driver
driverClassName
:
com.mysql.jdbc.Driver
username
:
root
username
:
dmp
password
:
I
%ou$buy!ok
password
:
I
oubuy123
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
#监控统计拦截的filters
#监控统计拦截的filters
filters
:
stat
filters
:
stat
...
@@ -45,7 +45,7 @@ spring:
...
@@ -45,7 +45,7 @@ spring:
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis
:
redis
:
# database: 0
# database: 0
# host:
47.115.53
.1
# host:
127.0.0
.1
# port: 6379
# port: 6379
# password: 123456
# password: 123456
# timeout: 5000
# timeout: 5000
...
@@ -57,11 +57,12 @@ spring:
...
@@ -57,11 +57,12 @@ spring:
-
192.168.1.146:6382
-
192.168.1.146:6382
-
192.168.1.146:6383
-
192.168.1.146:6383
-
192.168.1.146:6384
-
192.168.1.146:6384
session
:
store-type
:
redis
#mybatis的配置
#mybatis的配置
mybatis
:
mybatis
:
#配置mapper.xml文件所在路径
#配置mapper.xml文件所在路径
mapper-locations
:
classpath:mapper
conf
/*.xml
mapper-locations
:
classpath:mapper
.*
/*.xml
#配置映射类所在的包名
#配置映射类所在的包名
type-aliases-package
:
com.jz.dm.mall.moduls.entity
type-aliases-package
:
com.jz.dm.mall.moduls.entity
...
@@ -70,4 +71,11 @@ logging:
...
@@ -70,4 +71,11 @@ logging:
com.jz.dm.mall
:
debug
com.jz.dm.mall
:
debug
domain
:
domain
:
apigateway
:
http://47.115.53.1:8088/api/auth/mall-user-auth-api
gatewayGetAuth
:
http://47.115.53.1:8088/api/auth/mall-user-auth-api
\ No newline at end of file
gatewayUpSalt
:
http://47.115.53.1:8088/api/auth/reset-salt
ftp
:
url
:
192.168.1.141
port
:
21
username
:
ftpuser
password
:
9zDatacn
\ No newline at end of file
jz-dm-mall/src/main/resources/mapper
conf
/DepartmentDao.xml
→
jz-dm-mall/src/main/resources/mapper
/customer
/DepartmentDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/MallCustomerDao.xml
→
jz-dm-mall/src/main/resources/mapper
/customer
/MallCustomerDao.xml
View file @
4e952e04
...
@@ -176,8 +176,8 @@
...
@@ -176,8 +176,8 @@
t1.head_portrait_url as headPortraitUrl,
t1.head_portrait_url as headPortraitUrl,
t3.assets_id as assetsId
t3.assets_id as assetsId
from t_mall_customer t1
from t_mall_customer t1
left join t_department t2 on t1.department_id=
t2.department_id
INNER JOIN t_department t2 ON t1.department_id =
t2.department_id
left join t_finance_customer_assets t3 on t3.department_id=
t2.department_id
INNER JOIN t_finance_customer_assets t3 ON t3.department_id =
t2.department_id
where 1=1 and t1.del_flag='N' and customer_account = #{username};
where 1=1 and t1.del_flag='N' and customer_account = #{username};
</select>
</select>
...
@@ -192,8 +192,8 @@
...
@@ -192,8 +192,8 @@
t1.head_portrait_url as headPortraitUrl,
t1.head_portrait_url as headPortraitUrl,
t3.assets_id as assetsId
t3.assets_id as assetsId
from t_mall_customer t1
from t_mall_customer t1
left join t_department t2 on t1.department_id=
t2.department_id
INNER JOIN t_department t2 ON t1.department_id =
t2.department_id
left join t_finance_customer_assets t3 on t3.department_id=
t2.department_id
INNER JOIN t_finance_customer_assets t3 ON t3.department_id =
t2.department_id
where 1=1 and t1.del_flag='N' and customer_phone = #{username}
where 1=1 and t1.del_flag='N' and customer_phone = #{username}
</select>
</select>
...
@@ -239,4 +239,21 @@
...
@@ -239,4 +239,21 @@
</set>
</set>
where customer_id = #{customerId}
where customer_id = #{customerId}
</update>
</update>
<select
id=
"getMenu"
resultType=
"com.jz.dm.mall.moduls.entity.MallMenu"
>
select
c.role_name AS roleName,
c.role_id AS roleId,
e.menu_id AS menuId,
e.menu_name AS menuName,
e.parent_id AS parentId,
e.url as url,
e.if_child as ifChild
from t_mall_customer a
inner join t_mall_user_role b on a.customer_id=b.customer_id
inner join t_mall_role c on c.role_id=b.role_id
inner join t_mall_role_menu d on d.role_id=c.role_id
inner join t_mall_menu e on e.menu_id=d.menu_id
where a.customer_id=#{userId} and c.role_id = #{roleId}
</select>
</mapper>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapper
conf
/FinanceCustomerAssetsDao.xml
→
jz-dm-mall/src/main/resources/mapper
/finance
/FinanceCustomerAssetsDao.xml
View file @
4e952e04
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
</update>
</update>
<!--添加一条充值记录-->
<!--添加一条充值记录-->
<insert
id=
"addCoustomerCzMoney"
keyProperty=
"c
ashOut
Id"
useGeneratedKeys=
"true"
>
<insert
id=
"addCoustomerCzMoney"
keyProperty=
"c
ustomerBalance
Id"
useGeneratedKeys=
"true"
>
insert into t_finance_customer_balance(assets_id, balance_money, remark, cre_time, cre_person, audit_status)
insert into t_finance_customer_balance(assets_id, balance_money, remark, cre_time, cre_person, audit_status)
values (#{assetsId}, #{balanceMoney}, #{remark}, #{creTime}, #{crePerson}, #{auditStatus})
values (#{assetsId}, #{balanceMoney}, #{remark}, #{creTime}, #{crePerson}, #{auditStatus})
</insert>
</insert>
...
...
jz-dm-mall/src/main/resources/mapper
conf
/FinanceTradeFlowDao.xml
→
jz-dm-mall/src/main/resources/mapper
/finance
/FinanceTradeFlowDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/DataGoodsApiDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/DataGoodsApiDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/DataGoodsCategoryDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/DataGoodsCategoryDao.xml
View file @
4e952e04
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jz.mall.moduls.mapper.DataGoodsCategoryDao"
>
<mapper
namespace=
"com.jz.
dm.
mall.moduls.mapper.DataGoodsCategoryDao"
>
<resultMap
type=
"com.jz.dm.mall.moduls.entity.DataGoodsCategory"
id=
"TDataGoodsCategoryMap"
>
<resultMap
type=
"com.jz.dm.mall.moduls.entity.DataGoodsCategory"
id=
"TDataGoodsCategoryMap"
>
<result
property=
"categoryId"
column=
"category_id"
jdbcType=
"INTEGER"
/>
<result
property=
"categoryId"
column=
"category_id"
jdbcType=
"INTEGER"
/>
...
@@ -118,4 +118,10 @@
...
@@ -118,4 +118,10 @@
delete from t_data_goods_category where category_id = #{categoryId}
delete from t_data_goods_category where category_id = #{categoryId}
</delete>
</delete>
<select
id=
"selectByList"
resultMap=
"TDataGoodsCategoryMap"
>
select
category_id, category_name, parent_id, if_child
from t_data_goods_category
where del_flag = 'N'
</select>
</mapper>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapper
conf
/DataGoodsDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/DataGoodsDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/MallHotRecommendGoodsDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/MallHotRecommendGoodsDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/PlatformLogDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/PlatformLogDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/PlatformTradeFlowInfoDao.xml
→
jz-dm-mall/src/main/resources/mapper
/goods
/PlatformTradeFlowInfoDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/OrderDao.xml
→
jz-dm-mall/src/main/resources/mapper
/order
/OrderDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/OrderGoodsInfoDao.xml
→
jz-dm-mall/src/main/resources/mapper
/order
/OrderGoodsInfoDao.xml
View file @
4e952e04
File moved
jz-dm-mall/src/main/resources/mapper
conf
/OrderPaymentDao.xml
→
jz-dm-mall/src/main/resources/mapper
/order
/OrderPaymentDao.xml
View file @
4e952e04
File moved
jz-dm-manage/pom.xml
View file @
4e952e04
...
@@ -145,6 +145,10 @@
...
@@ -145,6 +145,10 @@
<groupId>
io.projectreactor
</groupId>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-core
</artifactId>
<artifactId>
reactor-core
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
commons-net
</groupId>
<artifactId>
commons-net
</artifactId>
</dependency>
<!--阿里云服务器短信平台-->
<!--阿里云服务器短信平台-->
<dependency>
<dependency>
<groupId>
com.aliyun
</groupId>
<groupId>
com.aliyun
</groupId>
...
@@ -156,6 +160,73 @@
...
@@ -156,6 +160,73 @@
<artifactId>
aliyun-java-sdk-dysmsapi
</artifactId>
<artifactId>
aliyun-java-sdk-dysmsapi
</artifactId>
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
<excludes>
<exclude>
static/**
</exclude>
<exclude>
xls/**
</exclude>
<exclude>
conf/**
</exclude>
<exclude>
emails/**
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
false
</filtering>
<includes>
<include>
static/**
</include>
<include>
xls/**
</include>
<include>
conf/**
</include>
<include>
emails/**
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
springloaded
</artifactId>
<version>
1.2.8.RELEASE
</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>
true
</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<configuration>
<encoding>
UTF-8
</encoding>
<!-- 过滤后缀为pem、pfx的证书文件 -->
<nonFilteredFileExtensions>
<nonFilteredFileExtension>
p12
</nonFilteredFileExtension>
<nonFilteredFileExtension>
pem
</nonFilteredFileExtension>
<nonFilteredFileExtension>
pfx
</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/manageApplication.java
View file @
4e952e04
package
com
.
jz
.
manage
;
package
com
.
jz
.
manage
;
import
com.jz.common.utils.HttpsUtils
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession
;
import
org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
@SpringBootApplication
@SpringBootApplication
@EnableTransactionManagement
@EnableTransactionManagement
...
@@ -22,9 +19,9 @@ public class manageApplication {
...
@@ -22,9 +19,9 @@ public class manageApplication {
SpringApplication
.
run
(
manageApplication
.
class
,
args
);
SpringApplication
.
run
(
manageApplication
.
class
,
args
);
}
}
@Bean
//
@Bean
public
HttpsUtils
restTemplate
()
{
//
public HttpsUtils restTemplate() {
return
new
HttpsUtils
();
//
return new HttpsUtils();
}
//
}
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/PlatformTradeFlowInfoController.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
controller
.
finance
;
package
com
.
jz
.
manage
.
moduls
.
controller
.
finance
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
...
@@ -118,20 +119,21 @@ public class PlatformTradeFlowInfoController extends BaseController {
...
@@ -118,20 +119,21 @@ public class PlatformTradeFlowInfoController extends BaseController {
*/
*/
@PostMapping
(
value
=
"/cashOutList"
)
@PostMapping
(
value
=
"/cashOutList"
)
@ApiOperation
(
value
=
"提现管理--分页列表"
,
notes
=
"分页列表"
)
@ApiOperation
(
value
=
"提现管理--分页列表"
,
notes
=
"分页列表"
)
public
PageInfoResponse
<
CashOutListDto
>
getFinanceCashOutList
(
@RequestBody
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
Result
<
IPage
<
CashOutListDto
>
>
getFinanceCashOutList
(
@RequestBody
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
CashOutListDto
>
pageInfo
=
new
PageInfoResponse
<
CashOutListDto
>();
/*
PageInfoResponse<CashOutListDto> pageInfo = new PageInfoResponse<CashOutListDto>();
Map
map
=
new
HashMap
();
Map map = new HashMap();
*/
//从session中获取平台用户id
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
//map.put("userId", user.getUserId());
try
{
return
Result
.
of_success
(
platformTradeFlowInfoService
.
findListFinanceCashOut
(
cashOutListRequest
,
httpRequest
));
/* try {
pageInfo = platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest);
pageInfo = platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest);
} catch (Exception e) {
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
e.printStackTrace();
}
}
*/
return
pageInfo
;
//
return pageInfo;
}
}
/**
/**
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/platForm/CashOutListRequest.java
View file @
4e952e04
...
@@ -36,6 +36,17 @@ public class CashOutListRequest extends BasePageBean {
...
@@ -36,6 +36,17 @@ public class CashOutListRequest extends BasePageBean {
@ApiModelProperty
(
value
=
"提现时间"
)
@ApiModelProperty
(
value
=
"提现时间"
)
private
String
casOutTime
;
private
String
casOutTime
;
@ApiModelProperty
(
value
=
"企业名/提现描述"
)
private
String
key
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getDepartmentName
()
{
public
String
getDepartmentName
()
{
return
departmentName
;
return
departmentName
;
}
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/finance/platForm/TradeDetilRequest.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
controller
.
finance
.
platForm
;
package
com
.
jz
.
manage
.
moduls
.
controller
.
finance
.
platForm
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -39,13 +41,13 @@ public class TradeDetilRequest extends BasePageBean {
...
@@ -39,13 +41,13 @@ public class TradeDetilRequest extends BasePageBean {
private
String
orderMethod
;
private
String
orderMethod
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creTime
;
private
String
creTime
;
public
Date
getCreTime
()
{
public
String
getCreTime
()
{
return
creTime
;
return
creTime
;
}
}
public
void
setCreTime
(
Date
creTime
)
{
public
void
setCreTime
(
String
creTime
)
{
this
.
creTime
=
creTime
;
this
.
creTime
=
creTime
;
}
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/sys/SysUserController.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
controller
.
sys
;
package
com
.
jz
.
manage
.
moduls
.
controller
.
sys
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.controller.BaseController
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
com.jz.manage.moduls.entity.SysUser
;
import
com.jz.manage.moduls.entity.SysUser
;
import
com.jz.manage.moduls.service.SysUserService
;
import
com.jz.manage.moduls.service.SysUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 平台系统用户表(TSysUser)表控制层
* 平台系统用户表(TSysUser)表控制层
...
@@ -31,8 +36,15 @@ public class SysUserController extends BaseController {
...
@@ -31,8 +36,15 @@ public class SysUserController extends BaseController {
private
SysUserService
sysUserService
;
private
SysUserService
sysUserService
;
@PostMapping
(
"/getMenu"
)
@PostMapping
(
"/getMenu"
)
public
Result
getMenu
(
@RequestParam
(
name
=
"userId"
)
Long
userId
)
{
@ApiOperation
(
value
=
"平台--角色展示菜单"
,
notes
=
"暂时不使用"
)
List
<
SysMenu
>
list
=
sysUserService
.
selectByMenu
(
userId
);
public
Result
getMenu
(
@RequestParam
(
name
=
"userId"
)
Long
userId
,
return
new
Result
(
true
,
"成功!"
,
200
,
list
);
@RequestParam
(
name
=
"roleId"
)
Long
roleId
)
{
Result
menu
=
sysUserService
.
getMenu
(
userId
,
roleId
);
if
(!
StringUtils
.
isEmpty
(
menu
))
{
menu
.
setMsg
(
"查询菜单成功!"
);
menu
.
setCode
(
StatusCode
.
OK
);
return
menu
;
}
return
new
Result
(
false
,
"查询菜单失败!"
,
StatusCode
.
ERROR
);
}
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/sys/ValidateCodeController.java
View file @
4e952e04
...
@@ -3,10 +3,10 @@ package com.jz.manage.moduls.controller.sys;
...
@@ -3,10 +3,10 @@ package com.jz.manage.moduls.controller.sys;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.SMSUtils
;
import
com.jz.common.utils.SMSUtils
;
import
com.jz.common.utils.StatusCode
;
import
com.jz.common.utils.ValidateCodeUtils
;
import
com.jz.common.utils.ValidateCodeUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -32,21 +32,15 @@ public class ValidateCodeController {
...
@@ -32,21 +32,15 @@ public class ValidateCodeController {
// 通过手机号从redis获取验证码
// 通过手机号从redis获取验证码
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
String
codeInRedis
=
(
String
)
redisTemplate
.
opsForValue
().
get
(
key
);
if
(!
StringUtils
.
isEmpty
(
codeInRedis
))
{
if
(
codeInRedis
!=
null
&&
!
codeInRedis
.
equals
(
""
))
{
return
new
Result
(
false
,
"验证码已发送,请注意查收!"
);
// redis中的验证码还未过期
}
else
{
return
new
Result
(
false
,
"验证码发送失败!"
,
StatusCode
.
ERROR
);
// 生成验证码
}
else
{
String
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
)
+
""
;
// redis中无此手机号的验证码,发送验证码
// 发送
Integer
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
);
try
{
SMSUtils
.
sendMessage
(
SMSUtils
.
loginTemplate
,
code
,
telephone
);
SMSUtils
.
sendShortMessage
(
SMSUtils
.
VALIDATE_CODE
,
telephone
,
code
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
new
Result
(
false
,
"验证码发送失败!"
);
}
// 存入redis, 有效期为5分钟
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
redisTemplate
.
opsForValue
().
set
(
key
,
code
,
5
,
TimeUnit
.
MINUTES
);
return
new
Result
(
true
,
"验证码发送成功!"
);
return
new
Result
(
true
,
"验证码发送成功!"
,
StatusCode
.
OK
);
}
}
}
}
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/entity/DataGoodsCategory.java
View file @
4e952e04
...
@@ -48,7 +48,7 @@ public class DataGoodsCategory implements Serializable {
...
@@ -48,7 +48,7 @@ public class DataGoodsCategory implements Serializable {
private
String
delFlag
;
private
String
delFlag
;
private
List
<
DataGoodsCategory
>
C
hildren
;
private
List
<
DataGoodsCategory
>
c
hildren
;
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/PlatformTradeFlowInfoDao.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
mapper
;
package
com
.
jz
.
manage
.
moduls
.
mapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.entity.PlatformTradeFlowInfo
;
import
com.jz.common.entity.PlatformTradeFlowInfo
;
import
com.jz.manage.moduls.controller.finance.platForm.*
;
import
com.jz.manage.moduls.controller.finance.platForm.*
;
...
@@ -22,7 +25,9 @@ public interface PlatformTradeFlowInfoDao extends BaseMapper<PlatformTradeFlowIn
...
@@ -22,7 +25,9 @@ public interface PlatformTradeFlowInfoDao extends BaseMapper<PlatformTradeFlowIn
List
<
TradeDetilDto
>
findListFinanceTradeDetil
(
Map
param
)
throws
Exception
;
List
<
TradeDetilDto
>
findListFinanceTradeDetil
(
Map
param
)
throws
Exception
;
List
<
CashOutListDto
>
findListFinanceCashOut
(
Map
param
)
throws
Exception
;
List
<
CashOutListDto
>
findListFinanceCashOut
(
QueryWrapper
queryWrapper
)
throws
Exception
;
CashOutInfoDto
queryCashOutByid
(
@Param
(
"cashOutId"
)
String
cashOutId
)
throws
Exception
;
CashOutInfoDto
queryCashOutByid
(
@Param
(
"cashOutId"
)
String
cashOutId
)
throws
Exception
;
IPage
<
CashOutListDto
>
list
(
IPage
<
CashOutListDto
>
page
,
@Param
(
"ew"
)
Wrapper
<
CashOutListDto
>
query
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/mapper/SysUserDao.java
View file @
4e952e04
...
@@ -17,7 +17,9 @@ import java.util.Map;
...
@@ -17,7 +17,9 @@ import java.util.Map;
public
interface
SysUserDao
extends
BaseMapper
<
SysUser
>
{
public
interface
SysUserDao
extends
BaseMapper
<
SysUser
>
{
List
<
Map
>
getUserRoleByAccount
(
@Param
(
"account"
)
String
account
);
List
<
Map
>
getUserRoleByAccount
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"roleId"
)
Long
roleId
);
List
<
SysMenu
>
selectBuMenu
(
@Param
(
"userId"
)
Long
userId
);
List
<
SysMenu
>
getMenu
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"roleId"
)
Long
roleId
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/DataGoodsService.java
View file @
4e952e04
...
@@ -12,7 +12,7 @@ import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
...
@@ -12,7 +12,7 @@ import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
import
com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq
;
import
com.jz.manage.moduls.controller.goods.bean.request.DataApiUpReq
;
import
com.jz.manage.moduls.controller.goods.bean.request.DataGoodsListRequest
;
import
com.jz.manage.moduls.controller.goods.bean.request.DataGoodsListRequest
;
import
com.jz.manage.moduls.controller.goods.bean.request.DataGoodsRequest
;
import
com.jz.manage.moduls.controller.goods.bean.request.DataGoodsRequest
;
import
org.springframework.web.multipart.MultipartFile
;
/**
/**
* 数据商品(DataGoods)表服务接口
* 数据商品(DataGoods)表服务接口
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/PlatformTradeFlowInfoService.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
service
;
package
com
.
jz
.
manage
.
moduls
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
...
@@ -23,7 +24,7 @@ public interface PlatformTradeFlowInfoService {
...
@@ -23,7 +24,7 @@ public interface PlatformTradeFlowInfoService {
PageInfoResponse
<
TradeDetilDto
>
findListFinanceTradeDetil
(
TradeDetilRequest
tradeDetilRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
PageInfoResponse
<
TradeDetilDto
>
findListFinanceTradeDetil
(
TradeDetilRequest
tradeDetilRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
PageInfoRespons
e
<
CashOutListDto
>
findListFinanceCashOut
(
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
IPag
e
<
CashOutListDto
>
findListFinanceCashOut
(
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
CashOutInfoDto
queryCashOutByid
(
String
cashOutId
)
throws
Exception
;
CashOutInfoDto
queryCashOutByid
(
String
cashOutId
)
throws
Exception
;
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/SysUserService.java
View file @
4e952e04
...
@@ -2,6 +2,7 @@ package com.jz.manage.moduls.service;
...
@@ -2,6 +2,7 @@ package com.jz.manage.moduls.service;
import
com.jz.common.entity.SysUser
;
import
com.jz.common.entity.SysUser
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -23,7 +24,7 @@ public interface SysUserService {
...
@@ -23,7 +24,7 @@ public interface SysUserService {
SysUser
selectByPhone
(
String
telephone
,
HttpServletRequest
request
);
SysUser
selectByPhone
(
String
telephone
,
HttpServletRequest
request
);
Map
<
String
,
Object
>
getUserRoleByAccount
(
String
account
);
Map
<
String
,
Object
>
getUserRoleByAccount
(
Long
userId
,
Long
roleId
);
List
<
SysMenu
>
selectByMenu
(
Long
i
d
);
Result
getMenu
(
Long
userId
,
Long
roleI
d
);
}
}
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DataGoodsCategoryServiceImpl.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.entity.DataGoodsCategory
;
import
com.jz.manage.moduls.entity.DataGoodsCategory
;
...
@@ -9,10 +8,8 @@ import com.jz.manage.moduls.service.DataGoodsCategoryService;
...
@@ -9,10 +8,8 @@ import com.jz.manage.moduls.service.DataGoodsCategoryService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -38,15 +35,9 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
...
@@ -38,15 +35,9 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
// 找到所有的一级分类
// 找到所有的一级分类
List
<
DataGoodsCategory
>
level1Menus
=
entities
.
stream
().
filter
(
categoryEntity
->
List
<
DataGoodsCategory
>
level1Menus
=
entities
.
stream
().
filter
(
categoryEntity
->
categoryEntity
.
getParentId
()
==
0
&&
categoryEntity
.
getIfChild
().
equals
(
"N"
)
categoryEntity
.
getParentId
()
==
0
&&
categoryEntity
.
getIfChild
().
equals
(
"N"
)
).
map
((
menu
)->{
).
map
((
menu
)->{
menu
.
setChildren
(
getChildrens
(
menu
,
entities
));
menu
.
setChildren
(
getChildrens
(
menu
,
entities
));
// for (DataGoodsCategory child : menu.getChildren()) {
// if (child.getChildren().size() == 0 ) {
// return null;
// }
// return menu;
// }
return
menu
;
return
menu
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
Result
.
of_success
(
ResultMsg
.
SUCCESS
,
level1Menus
);
return
Result
.
of_success
(
ResultMsg
.
SUCCESS
,
level1Menus
);
...
@@ -64,4 +55,4 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
...
@@ -64,4 +55,4 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
return
children
;
return
children
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
View file @
4e952e04
...
@@ -11,7 +11,6 @@ import com.jz.common.bean.PageInfoResponse;
...
@@ -11,7 +11,6 @@ import com.jz.common.bean.PageInfoResponse;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.entity.DataGoods
;
import
com.jz.common.entity.DataGoods
;
import
com.jz.common.utils.*
;
import
com.jz.common.utils.*
;
...
@@ -44,7 +43,6 @@ import org.springframework.stereotype.Service;
...
@@ -44,7 +43,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.multipart.MultipartFile
;
/**
/**
...
@@ -68,8 +66,6 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -68,8 +66,6 @@ public class DataGoodsServiceImpl implements DataGoodsService {
@Autowired
@Autowired
private
DataGoodsApiDao
tDataGoodsApiDao
;
private
DataGoodsApiDao
tDataGoodsApiDao
;
@Autowired
private
HttpsUtils
httpsUtils
;
@Value
(
"${domain.apigateway}"
)
@Value
(
"${domain.apigateway}"
)
private
String
apiGateway
;
private
String
apiGateway
;
...
@@ -235,16 +231,6 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -235,16 +231,6 @@ public class DataGoodsServiceImpl implements DataGoodsService {
}
}
//
// @Override
// public Result getJoinType(String parentKey) {
// Map headers = new HashMap<>();
// headers.put("Content-type","application/x-www-form-urlencoded;charset=UTF-8");
// String url = "http://127.0.0.1:8088/api/direction/getApiTypeList";
// String s = httpsUtils.submitPost(url,parentKey , headers);
// System.out.println(s);
// return null;
// }
/**
/**
...
@@ -306,7 +292,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -306,7 +292,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
apiReq
.
setApiExample
(
dataApiUpReq
.
getReturnDataExample
());
apiReq
.
setApiExample
(
dataApiUpReq
.
getReturnDataExample
());
String
post
=
httpsUtils
.
submitPost
(
apiGateway
,
JSON
.
toJSONString
(
apiReq
));
String
post
=
HttpsUtilsTest
.
submitPost
(
apiGateway
,
JSON
.
toJSONString
(
apiReq
));
JSONObject
result
=
JSON
.
parseObject
(
post
);
JSONObject
result
=
JSON
.
parseObject
(
post
);
if
(!
result
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
result
.
get
(
"data"
))){
if
(!
result
.
get
(
"code"
).
equals
(
200
)
||
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
result
.
get
(
"data"
))){
return
Result
.
of_error
(
"制作失败!"
);
return
Result
.
of_error
(
"制作失败!"
);
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DepartmentServiceImpl.java
View file @
4e952e04
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.ResultCode
;
...
@@ -18,7 +19,7 @@ import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto;
...
@@ -18,7 +19,7 @@ import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
import
com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest
;
import
com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest
;
import
com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest
;
import
com.jz.manage.moduls.controller.sys.bean.dto.SysUserDto
;
import
com.jz.manage.moduls.entity.Department
;
import
com.jz.manage.moduls.entity.Department
;
import
com.jz.manage.moduls.entity.FinanceCustomerAssets
;
import
com.jz.manage.moduls.entity.FinanceCustomerAssets
;
import
com.jz.manage.moduls.entity.FinanceCustomerBalance
;
import
com.jz.manage.moduls.entity.FinanceCustomerBalance
;
...
@@ -31,6 +32,7 @@ import com.jz.manage.moduls.service.DepartmentService;
...
@@ -31,6 +32,7 @@ import com.jz.manage.moduls.service.DepartmentService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -156,7 +158,7 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -156,7 +158,7 @@ public class DepartmentServiceImpl implements DepartmentService {
* @param
* @param
*/
*/
@Override
@Override
@Transactional
()
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Result
add
(
SaveCustomerRequest
saveCustomerReq
,
HttpServletRequest
req
)
{
public
Result
add
(
SaveCustomerRequest
saveCustomerReq
,
HttpServletRequest
req
)
{
// 校验信息
// 校验信息
Result
s
=
userCheck
(
saveCustomerReq
);
Result
s
=
userCheck
(
saveCustomerReq
);
...
@@ -164,7 +166,6 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -164,7 +166,6 @@ public class DepartmentServiceImpl implements DepartmentService {
if
(!
success
)
{
if
(!
success
)
{
return
Result
.
error
(
"添加用户失败!"
);
return
Result
.
error
(
"添加用户失败!"
);
}
}
// SysUserDto sysUser = (SysUserDto) SessionUtils.getUserCurrent(req, "sysUser");
SysUserDto
userDto
=
(
SysUserDto
)
redisTemplate
.
opsForValue
().
get
(
"USER_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_SYS
);
SysUserDto
userDto
=
(
SysUserDto
)
redisTemplate
.
opsForValue
().
get
(
"USER_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_SYS
);
// 保存企业信息
// 保存企业信息
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/FinanceCustomerBalanceServiceImpl.java
View file @
4e952e04
...
@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.enums.AuditStatusEnum
;
import
com.jz.common.enums.TradeFlowEnum
;
import
com.jz.common.enums.TradeFlowEnum
;
import
com.jz.common.utils.NumberUtils
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.Result
;
import
com.jz.manage.moduls.controller.finance.platForm.BalanceAuditRequest
;
import
com.jz.manage.moduls.controller.finance.platForm.BalanceAuditRequest
;
import
com.jz.manage.moduls.controller.finance.platForm.BalanceInfoDto
;
import
com.jz.manage.moduls.controller.finance.platForm.BalanceInfoDto
;
...
@@ -23,6 +26,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -23,6 +26,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -54,6 +58,10 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
...
@@ -54,6 +58,10 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
@Autowired
@Autowired
private
FinanceTradeFlowDao
financeTradeFlowDao
;
private
FinanceTradeFlowDao
financeTradeFlowDao
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Override
@Override
public
PageInfoResponse
<
BalanceListDto
>
findListBalance
(
BalanceListRequest
balanceListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
PageInfoResponse
<
BalanceListDto
>
findListBalance
(
BalanceListRequest
balanceListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
BalanceListDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
PageInfoResponse
<
BalanceListDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
...
@@ -99,32 +107,32 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
...
@@ -99,32 +107,32 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Object
>
uptBalanceInfoAuditByid
(
BalanceAuditRequest
balanceAuditRequest
)
throws
Exception
{
public
Result
<
Object
>
uptBalanceInfoAuditByid
(
BalanceAuditRequest
balanceAuditRequest
)
throws
Exception
{
//1.修改充值记录状态
//1.修改充值记录状态
FinanceCustomerBalance
balance
=
new
FinanceCustomerBalance
();
FinanceCustomerBalance
balance
=
new
FinanceCustomerBalance
();
balance
.
setAuditStatus
(
balanceAuditRequest
.
getAuditStatus
());
balance
.
setRejectReason
(
balanceAuditRequest
.
getRejectReason
());
balance
.
setRejectReason
(
balanceAuditRequest
.
getRejectReason
());
balance
.
setCustomerBalanceId
(
Long
.
valueOf
(
balanceAuditRequest
.
getCustomerBalanceId
()));
balance
.
setCustomerBalanceId
(
Long
.
valueOf
(
balanceAuditRequest
.
getCustomerBalanceId
()));
//balance.setUptPerson(
);
balance
.
setUptPerson
(
getUserId
()+
""
);
balance
.
setUptTime
(
new
Date
());
balance
.
setUptTime
(
new
Date
());
int
len
=
financeCustomerBalanceDao
.
updateById
(
balance
);
//1.查询出充值金额 和 账户id
if
(
len
>
0
)
{
QueryWrapper
wrapper
=
new
QueryWrapper
();
logger
.
info
(
"###########################修改充值审核状态成功####################################"
);
wrapper
.
eq
(
"customer_balance_id"
,
balanceAuditRequest
.
getCustomerBalanceId
()
);
//2.查询出充值金额 和 账户id
wrapper
.
eq
(
"del_flag"
,
"N"
);
QueryWrapper
wrapper
=
new
QueryWrapper
(
);
FinanceCustomerBalance
financeCustomerBalance
=
financeCustomerBalanceDao
.
selectOne
(
wrapper
);
wrapper
.
eq
(
"customer_balance_id"
,
balanceAuditRequest
.
getCustomerBalanceId
());
Long
assetsId
=
financeCustomerBalance
.
getAssetsId
();
//企业用户资产id
wrapper
.
eq
(
"del_flag"
,
"N"
);
String
balanceMoney
=
financeCustomerBalance
.
getBalanceMoney
().
toString
();
//充值金额
FinanceCustomerBalance
financeCustomerBalance
=
financeCustomerBalanceDao
.
selectOne
(
wrapper
);
BigDecimal
balanceMoneyObj
=
new
BigDecimal
(
balanceMoney
);
Long
assetsId
=
financeCustomerBalance
.
getAssetsId
();
//企业用户资产id
String
balanceMoney
=
financeCustomerBalance
.
getBalanceMoney
().
toString
();
//充值
金额
//2.查询资产
金额
BigDecimal
balanceMoneyObj
=
new
BigDecimal
(
balanceMoney
);
QueryWrapper
assetsWrapper
=
new
QueryWrapper
(
);
assetsWrapper
.
eq
(
"assets_id"
,
assetsId
);
//3.查询资产金额
wrapper
.
eq
(
"del_flag"
,
"N"
);
QueryWrapper
assetsWrapper
=
new
QueryWrapper
(
);
FinanceCustomerAssets
financeCustomerAssets
=
financeCustomerAssetsDao
.
selectOne
(
assetsWrapper
);
assetsWrapper
.
eq
(
"assets_id"
,
assetsId
);
String
frozenMoney
=
financeCustomerAssets
.
getFrozenMoney
().
toString
();
// 冻结金额
wrapper
.
eq
(
"del_flag"
,
"N"
);
BigDecimal
frozenMoneyObj
=
new
BigDecimal
(
frozenMoney
);
FinanceCustomerAssets
financeCustomerAssets
=
financeCustomerAssetsDao
.
selectOne
(
assetsWrapper
);
// 冻结金额大于等于充值金额
String
frozenMoney
=
financeCustomerAssets
.
getFrozenMoney
().
toString
();
// 冻结金额
if
(
frozenMoney
.
compareTo
(
balanceMoney
.
toString
())
>
-
1
)
{
BigDecimal
frozenMoneyObj
=
new
BigDecimal
(
frozenMoney
);
// 减去冻结金额
frozenMoneyObj
=
frozenMoneyObj
.
subtract
(
balanceMoneyObj
);
frozenMoneyObj
=
frozenMoneyObj
.
subtract
(
balanceMoneyObj
);
if
(
AuditStatusEnum
.
YSH
.
getValue
().
equals
(
balanceAuditRequest
.
getAuditStatus
()))
{
if
(
AuditStatusEnum
.
YSH
.
getValue
().
equals
(
balanceAuditRequest
.
getAuditStatus
()))
{
...
@@ -144,21 +152,21 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
...
@@ -144,21 +152,21 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
saveAssets
.
setTotalMoney
(
totalMoneyObj
);
saveAssets
.
setTotalMoney
(
totalMoneyObj
);
saveAssets
.
setFrozenMoney
(
frozenMoneyObj
);
saveAssets
.
setFrozenMoney
(
frozenMoneyObj
);
saveAssets
.
setUptTime
(
new
Date
());
saveAssets
.
setUptTime
(
new
Date
());
//saveAssets.setUptPerson(
);
saveAssets
.
setUptPerson
(
getUserId
()+
""
);
financeCustomerAssetsDao
.
updateById
(
saveAssets
);
financeCustomerAssetsDao
.
updateById
(
saveAssets
);
logger
.
info
(
"###########################充值审核通过---更新企业资产成功####################################"
);
logger
.
info
(
"###########################充值审核通过---更新企业资产成功####################################"
);
balance
.
setAuditStatus
(
balanceAuditRequest
.
getAuditStatus
());
//添加流水记录
//添加流水记录
FinanceTradeFlow
financeTradeFlow
=
new
FinanceTradeFlow
();
FinanceTradeFlow
financeTradeFlow
=
new
FinanceTradeFlow
();
financeTradeFlow
.
setCreTime
(
new
Date
());
financeTradeFlow
.
setCreTime
(
new
Date
());
financeTradeFlow
.
setTradeMoney
(
balanceMoneyObj
);
financeTradeFlow
.
setTradeMoney
(
balanceMoneyObj
);
financeTradeFlow
.
setAssetsId
(
assetsId
);
financeTradeFlow
.
setAssetsId
(
assetsId
);
financeTradeFlow
.
setTradeType
(
TradeFlowEnum
.
CZ
.
getValue
());
financeTradeFlow
.
setTradeType
(
TradeFlowEnum
.
CZ
.
getValue
());
financeTradeFlow
.
setTradeFlowNumber
(
"123132"
);
financeTradeFlow
.
setTradeFlowNumber
(
NumberUtils
.
getDealNum
()
);
financeTradeFlow
.
setBalanceMoney
(
useMoneyObj
);
financeTradeFlow
.
setBalanceMoney
(
useMoneyObj
);
financeTradeFlow
.
setDelFlag
(
"N"
);
financeTradeFlow
.
setDelFlag
(
"N"
);
//
financeTradeFlow.setCashOutId();
//
financeTradeFlow.setCashOutId();
//financeTradeFlow.setCrePerson(
);
financeTradeFlow
.
setCrePerson
(
getUserId
()+
""
);
financeTradeFlowDao
.
insert
(
financeTradeFlow
);
financeTradeFlowDao
.
insert
(
financeTradeFlow
);
logger
.
info
(
"#####################商城提现流水记录添加成功#####################"
);
logger
.
info
(
"#####################商城提现流水记录添加成功#####################"
);
}
}
...
@@ -168,13 +176,21 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
...
@@ -168,13 +176,21 @@ public class FinanceCustomerBalanceServiceImpl implements FinanceCustomerBalance
saveAssets
.
setAssetsId
(
assetsId
);
saveAssets
.
setAssetsId
(
assetsId
);
saveAssets
.
setFrozenMoney
(
frozenMoneyObj
);
saveAssets
.
setFrozenMoney
(
frozenMoneyObj
);
saveAssets
.
setUptTime
(
new
Date
());
saveAssets
.
setUptTime
(
new
Date
());
//saveAssets.setUptPerson(
);
saveAssets
.
setUptPerson
(
getUserId
()+
""
);
financeCustomerAssetsDao
.
updateById
(
saveAssets
);
financeCustomerAssetsDao
.
updateById
(
saveAssets
);
logger
.
info
(
"###########################充值审核未通过--更新企业资产成功####################################"
);
logger
.
info
(
"###########################充值审核未通过--更新企业资产成功####################################"
);
balance
.
setAuditStatus
(
balanceAuditRequest
.
getAuditStatus
());
}
}
financeCustomerBalanceDao
.
updateById
(
balance
);
logger
.
info
(
"###########################修改充值审核状态成功####################################"
);
return
Result
.
ok
();
return
Result
.
ok
();
}
else
{
}
else
{
return
Result
.
error
(
"提交失败!"
);
throw
new
RuntimeException
(
"提交失败!"
);
}
}
}
}
}
public
Long
getUserId
()
{
\ No newline at end of file
SysUserDto
userDto
=
(
SysUserDto
)
redisTemplate
.
opsForValue
().
get
(
"USER_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_SYS
);
return
userDto
.
getUserId
();
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/PlatformTradeFlowInfoServiceImpl.java
View file @
4e952e04
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
package
com
.
jz
.
manage
.
moduls
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BasePageBean
;
import
com.jz.common.bean.BasePageBean
;
...
@@ -94,6 +97,7 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
...
@@ -94,6 +97,7 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
//从session中获取平台用户id
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//param.put("userId", user.getUserId());
//param.put("userId", user.getUserId());
//数据行业
//数据行业
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getCategoryId
()))
{
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getCategoryId
()))
{
param
.
put
(
"categoryId"
,
tradeDetilRequest
.
getCategoryId
());
param
.
put
(
"categoryId"
,
tradeDetilRequest
.
getCategoryId
());
...
@@ -110,7 +114,13 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
...
@@ -110,7 +114,13 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getDataName
()))
{
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getDataName
()))
{
param
.
put
(
"dataName"
,
tradeDetilRequest
.
getDataName
());
param
.
put
(
"dataName"
,
tradeDetilRequest
.
getDataName
());
}
}
if
(
StringUtils
.
isNotEmpty
(
tradeDetilRequest
.
getCreTime
()))
{
String
creTime
=
tradeDetilRequest
.
getCreTime
();
String
startTime
=
creTime
.
substring
(
0
,
10
);
String
endTime
=
creTime
.
substring
(
11
,
21
);
param
.
put
(
"startTime"
,
startTime
+
"00:00:00"
);
param
.
put
(
"endTime"
,
endTime
+
"23:59:59"
);
}
PageHelper
.
startPage
(
tradeDetilRequest
.
getPageNum
(),
tradeDetilRequest
.
getPageSize
());
PageHelper
.
startPage
(
tradeDetilRequest
.
getPageNum
(),
tradeDetilRequest
.
getPageSize
());
List
<
TradeDetilDto
>
list
=
platformTradeFlowInfoDao
.
findListFinanceTradeDetil
(
param
);
List
<
TradeDetilDto
>
list
=
platformTradeFlowInfoDao
.
findListFinanceTradeDetil
(
param
);
PageInfo
<
TradeDetilDto
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
TradeDetilDto
>
pageInfo
=
new
PageInfo
<>(
list
);
...
@@ -122,42 +132,54 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
...
@@ -122,42 +132,54 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
}
}
@Override
@Override
public
PageInfoResponse
<
CashOutListDto
>
findListFinanceCashOut
(
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
IPage
<
CashOutListDto
>
findListFinanceCashOut
(
CashOutListRequest
cashOutListRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
CashOutListDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
param
=
new
HashMap
();
IPage
<
CashOutListDto
>
page
=
new
Page
<>(
cashOutListRequest
.
getPageNum
(),
cashOutListRequest
.
getPageSize
());
//从session中获取平台用户id
QueryWrapper
<
CashOutListDto
>
query
=
new
QueryWrapper
();
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
if
(
StringUtils
.
isNotBlank
(
cashOutListRequest
.
getKey
())){
//param.put("userId", user.getUserId());
query
.
and
(
wrapper
->
wrapper
.
like
(
"t3.department_name"
,
cashOutListRequest
.
getKey
())
//提现描述
.
or
().
like
(
"t2.remark"
,
cashOutListRequest
.
getKey
()));
if
(
StringUtils
.
isNotEmpty
(
cashOutListRequest
.
getCasOutTime
()))
{
param
.
put
(
"casOutTime"
,
cashOutListRequest
.
getCasOutTime
());
}
}
//企业名
if
(
StringUtils
.
isNotBlank
(
cashOutListRequest
.
getAuditStatus
())){
if
(
StringUtils
.
isNotEmpty
(
cashOutListRequest
.
getDepartmentName
()))
{
query
.
eq
(
"t2.audit_status"
,
cashOutListRequest
.
getAuditStatus
());
param
.
put
(
"departmentName"
,
cashOutListRequest
.
getDepartmentName
());
}
//提现状态
if
(
StringUtils
.
isNotEmpty
(
cashOutListRequest
.
getAuditStatus
()))
{
param
.
put
(
"auditStatus"
,
cashOutListRequest
.
getAuditStatus
());
}
}
//提现时间
if
(
StringUtils
.
isNotBlank
(
cashOutListRequest
.
getCasOutTime
())){
if
(
StringUtils
.
isNotEmpty
(
cashOutListRequest
.
getCasOutTime
()))
{
String
casOutTimeStart
=
cashOutListRequest
.
getCasOutTime
().
substring
(
0
,
10
);
String
casOutTime
=
cashOutListRequest
.
getCasOutTime
();
String
casOutTimeEnd
=
cashOutListRequest
.
getCasOutTime
().
substring
(
11
,
21
);
// String[] times = casOutTime.split("-");
query
.
between
(
"t2.casOutTime"
,
casOutTimeStart
,
casOutTimeEnd
);
String
casOutTimeStart
=
casOutTime
.
substring
(
0
,
10
);
String
casOutTimeEnd
=
casOutTime
.
substring
(
11
,
21
);
param
.
put
(
"casOutTimeStart"
,
casOutTimeStart
+
" 00:00:00"
);
param
.
put
(
"casOutTimeEnd"
,
casOutTimeEnd
+
" 23:59:59"
);
}
}
PageHelper
.
startPage
(
cashOutListRequest
.
getPageNum
(),
cashOutListRequest
.
getPageSize
());
List
<
CashOutListDto
>
list
=
platformTradeFlowInfoDao
.
findListFinanceCashOut
(
param
);
PageInfo
<
CashOutListDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
Constants
.
SUCCESS_CODE
);
IPage
<
CashOutListDto
>
list
=
platformTradeFlowInfoDao
.
list
(
page
,
query
);
pageInfoResponse
.
setMessage
(
"查询成功"
);
return
list
;
pageInfoResponse
.
setData
(
pageInfo
);
// //提现描述
return
pageInfoResponse
;
// if (StringUtils.isNotEmpty(cashOutListRequest.getCasOutTime())) {
// param.put("casOutTime", cashOutListRequest.getCasOutTime());
// }
// //企业名
// if (StringUtils.isNotEmpty(cashOutListRequest.getDepartmentName())) {
// param.put("departmentName", cashOutListRequest.getDepartmentName());
// }
// //提现状态
// if (StringUtils.isNotEmpty(cashOutListRequest.getAuditStatus())) {
// param.put("auditStatus", cashOutListRequest.getAuditStatus());
// }
// //提现时间
// if (StringUtils.isNotEmpty(cashOutListRequest.getCasOutTime())) {
// String casOutTime = cashOutListRequest.getCasOutTime();
//// String[] times = casOutTime.split("-");
// String casOutTimeStart = casOutTime.substring(0, 10);
// String casOutTimeEnd = casOutTime.substring(11, 21);
// param.put("casOutTimeStart", casOutTimeStart + " 00:00:00");
// param.put("casOutTimeEnd", casOutTimeEnd + " 23:59:59");
// }
// PageHelper.startPage(cashOutListRequest.getPageNum(), cashOutListRequest.getPageSize());
// List<CashOutListDto> list = platformTradeFlowInfoDao.findListFinanceCashOut(query);
// PageInfo<CashOutListDto> pageInfo = new PageInfo<>(list);
//
// pageInfoResponse.setCode(Constants.SUCCESS_CODE);
// pageInfoResponse.setMessage("查询成功");
// pageInfoResponse.setData(pageInfo);
// return pageInfoResponse;
}
}
@Override
@Override
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/SysUserServiceImpl.java
View file @
4e952e04
...
@@ -3,10 +3,13 @@ package com.jz.manage.moduls.service.impl;
...
@@ -3,10 +3,13 @@ package com.jz.manage.moduls.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.bean.SysUserDto
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.entity.SysUser
;
import
com.jz.common.entity.SysUser
;
import
com.jz.common.enums.UserTypeEnum
;
import
com.jz.common.enums.UserTypeEnum
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.SessionUtils
;
import
com.jz.common.utils.SessionUtils
;
import
com.jz.manage.moduls.entity.DataGoodsCategory
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
com.jz.manage.moduls.entity.SysMenu
;
import
com.jz.manage.moduls.mapper.SysUserDao
;
import
com.jz.manage.moduls.mapper.SysUserDao
;
import
com.jz.manage.moduls.service.SysUserService
;
import
com.jz.manage.moduls.service.SysUserService
;
...
@@ -18,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -18,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
/**
/**
* 平台系统用户表(SysUser)表服务实现类
* 平台系统用户表(SysUser)表服务实现类
...
@@ -82,11 +86,11 @@ public class SysUserServiceImpl implements SysUserService {
...
@@ -82,11 +86,11 @@ public class SysUserServiceImpl implements SysUserService {
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getUserRoleByAccount
(
String
account
)
{
public
Map
<
String
,
Object
>
getUserRoleByAccount
(
Long
userId
,
Long
roleId
)
{
Set
<
String
>
roleSet
=
new
HashSet
<>();
Set
<
String
>
roleSet
=
new
HashSet
<>();
Set
<
String
>
roleMenuSet
=
new
HashSet
<>();
Set
<
String
>
roleMenuSet
=
new
HashSet
<>();
//查询用户拥有的角色
//查询用户拥有的角色
List
<
Map
>
list
=
sysUserDao
.
getUserRoleByAccount
(
account
);
List
<
Map
>
list
=
sysUserDao
.
getUserRoleByAccount
(
userId
,
roleId
);
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
for
(
Map
map
:
list
)
{
for
(
Map
map
:
list
)
{
roleSet
.
add
(
map
.
get
(
"roleName"
).
toString
());
roleSet
.
add
(
map
.
get
(
"roleName"
).
toString
());
...
@@ -104,20 +108,32 @@ public class SysUserServiceImpl implements SysUserService {
...
@@ -104,20 +108,32 @@ public class SysUserServiceImpl implements SysUserService {
}
}
@Override
@Override
public
List
<
SysMenu
>
selectByMenu
(
Long
id
)
{
public
Result
getMenu
(
Long
userId
,
Long
roleId
)
{
List
<
SysMenu
>
list
=
sysUserDao
.
selectBuMenu
(
id
);
list
=
sortTree
(
list
,
0L
);
//查询用户拥有的角色
return
list
;
List
<
SysMenu
>
entities
=
sysUserDao
.
getMenu
(
userId
,
roleId
);
// 找到所有的一级分类
List
<
SysMenu
>
level1Menus
=
entities
.
stream
().
filter
(
sysMenuEntity
->
sysMenuEntity
.
getParentId
()
==
0
&&
sysMenuEntity
.
getIfChild
().
equals
(
"N"
)
).
map
((
menu
)->{
menu
.
setChildren
(
getChildrens
(
menu
,
entities
));
return
menu
;
}).
collect
(
Collectors
.
toList
());
return
Result
.
of_success
(
ResultMsg
.
SUCCESS
,
level1Menus
);
}
}
private
List
<
SysMenu
>
sortTree
(
List
<
SysMenu
>
list
,
Long
parentId
)
{
private
List
<
SysMenu
>
getChildrens
(
SysMenu
sysMenu
,
List
<
SysMenu
>
all
)
{
List
<
SysMenu
>
returnList
=
new
ArrayList
<>();
for
(
SysMenu
sysMenu
:
list
)
{
List
<
SysMenu
>
children
=
all
.
stream
().
filter
(
sysMenuEntity
->
{
if
(
sysMenu
.
getParentId
().
equals
(
parentId
))
{
return
sysMenuEntity
.
getParentId
()
==
sysMenu
.
getMenuId
()
&&
sysMenuEntity
.
getIfChild
().
equals
(
"Y"
);
sysMenu
.
setChildren
(
sortTree
(
list
,
sysMenu
.
getMenuId
()));
}).
map
(
sysMenuEntity
->
{
returnList
.
add
(
sysMenu
);
//1、找到子菜单,同时递归调用
}
sysMenuEntity
.
setChildren
(
getChildrens
(
sysMenuEntity
,
all
));
}
return
sysMenuEntity
;
return
returnList
;
}).
collect
(
Collectors
.
toList
());
return
children
;
}
}
}
}
\ No newline at end of file
jz-dm-manage/src/main/resources/application-test.yml
View file @
4e952e04
...
@@ -12,10 +12,10 @@ management:
...
@@ -12,10 +12,10 @@ management:
spring
:
spring
:
profiles
:
test
profiles
:
test
datasource
:
datasource
:
url
:
jdbc:mysql://
rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com:3306
/wj-mkt-project?characterEncoding=utf8&useSSL=false
url
:
jdbc:mysql://
192.168.1.140:3307
/wj-mkt-project?characterEncoding=utf8&useSSL=false
driverClassName
:
com.mysql.jdbc.Driver
driverClassName
:
com.mysql.jdbc.Driver
username
:
root
username
:
dmp
password
:
I
%ou$buy!ok
password
:
I
oubuy123
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
#监控统计拦截的filters
#监控统计拦截的filters
filters
:
stat
filters
:
stat
...
@@ -72,4 +72,10 @@ logging:
...
@@ -72,4 +72,10 @@ logging:
com.jz.manage
:
debug
com.jz.manage
:
debug
domain
:
domain
:
apigateway
:
http://47.115.53.1:8088/api/producer/addDataBankApiInfo
apigateway
:
http://47.115.53.1:8088/api/producer/addDataBankApiInfo
\ No newline at end of file
ftp
:
url
:
192.168.1.141
port
:
21
username
:
ftpuser
password
:
9zDatacn
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/finance/PlatformTradeFlowInfoDao.xml
View file @
4e952e04
...
@@ -175,7 +175,8 @@
...
@@ -175,7 +175,8 @@
left join t_mall_customer t4 on t4.customer_id=t1.customer_id and t4.del_flag='N'
left join t_mall_customer t4 on t4.customer_id=t1.customer_id and t4.del_flag='N'
left join t_department t5 on t5.department_id=t4.department_id and t5.del_flag='N'
left join t_department t5 on t5.department_id=t4.department_id and t5.del_flag='N'
where 1=1 and t1.order_status='02' and t1.del_flag='N'
where 1=1 and t1.order_status='02' and t1.del_flag='N'
<if
test=
"creTime != null"
>
and date_format(t1.cre_time,'%Y-%m-%d')= #{creTime}
</if>
<if
test=
"startTime != null"
>
and t1.cre_time >= #{startTime}
</if>
<if
test=
"endTime != null"
>
and #{startTime} >= t1.cre_time
</if>
<if
test=
"departmentName != null"
>
and t5.department_name like concat('%',#{departmentName},'%')
</if>
<if
test=
"departmentName != null"
>
and t5.department_name like concat('%',#{departmentName},'%')
</if>
<if
test=
"dataName != null"
>
and t3.data_name like concat('%',#{dataName},'%')
</if>
<if
test=
"dataName != null"
>
and t3.data_name like concat('%',#{dataName},'%')
</if>
<if
test=
"categoryId != null"
>
and t3.category_id = #{categoryId}
</if>
<if
test=
"categoryId != null"
>
and t3.category_id = #{categoryId}
</if>
...
@@ -217,5 +218,25 @@
...
@@ -217,5 +218,25 @@
left join t_finance_cash_out t2 on t2.assets_id=t1.assets_id and t2.del_flag='N'
left join t_finance_cash_out t2 on t2.assets_id=t1.assets_id and t2.del_flag='N'
where 1=1 and t1.del_flag='N' and t2.cash_out_id = #{cashOutId}
where 1=1 and t1.del_flag='N' and t2.cash_out_id = #{cashOutId}
</select>
</select>
<select
id=
"list"
resultType=
"com.jz.manage.moduls.controller.finance.platForm.CashOutListDto"
>
select
t2.cash_out_id as cashOutId,
t2.cash_out_money as cashOutMoney,
t2.cash_out_time as casOutTime,
(case when t2.audit_status='01' then '待审核' when t2.audit_status='02' then '已审核'
when t2.audit_status='03' then '未通过' end) as auditStatus,
t2.remark,
t3.department_name as departmentName
from t_finance_customer_assets t1
inner join t_department t3 on t3.department_id=t1.department_id
inner join t_finance_cash_out t2 on t2.assets_id=t1.assets_id and t2.del_flag='N'
${ew.customSqlSegment}
<!--where 1=1 and t1.del_flag='N'-->
<!--<if test="departmentName != null">and t3.department_name like concat('%',#{departmentName},'%')</if>-->
<!--<if test="remark != null">and t2.remark like concat('%',#{remark},'%')</if>-->
<!--<if test="auditStatus != null">and t2.audit_status = #{auditStatus}</if>-->
<!--<if test="casOutTimeStart != null">and t2.cash_out_time >= #{casOutTimeStart}</if>-->
<!--<if test="casOutTimeEnd != null">and #{casOutTimeEnd} >= t2.cash_out_time</if>-->
</select>
</mapper>
</mapper>
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/goods/DataGoodsCategoryDao.xml
View file @
4e952e04
...
@@ -122,6 +122,6 @@
...
@@ -122,6 +122,6 @@
select
select
category_id, category_name, parent_id, if_child
category_id, category_name, parent_id, if_child
from t_data_goods_category
from t_data_goods_category
where del_flag =
"N"
where del_flag =
'N'
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
jz-dm-manage/src/main/resources/mapper/sys/SysUserDao.xml
View file @
4e952e04
...
@@ -145,23 +145,23 @@
...
@@ -145,23 +145,23 @@
inner join t_sys_role c on c.role_id=b.role_id
inner join t_sys_role c on c.role_id=b.role_id
inner join t_sys_role_menu d on d.role_id=c.role_id
inner join t_sys_role_menu d on d.role_id=c.role_id
inner join t_sys_menu e on e.menu_id=d.menu_id
inner join t_sys_menu e on e.menu_id=d.menu_id
where a.
account=#{account
}
where a.
user_id=#{userId} and c.role_id = #{roleId
}
</select>
</select>
<select
id=
"selectBuMenu"
resultType=
"com.jz.manage.moduls.entity.SysMenu"
parameterType=
"list"
>
select
t5.menu_id as menuid,
t5.menu_name as menuName,
t5.parent_id as parentId,
t5.url as url,
t5.if_child as ifChild
from
t_sys_user t1
JOIN t_sys_user_role t2 on t1.user_id = t2.user_id
Join t_sys_role t3 on t2.role_id = t3.role_id
JOIN t_sys_role_menu t4 on t3.role_id = t4.role_id
JOIN t_sys_menu t5 on t4.menu_id = t5.menu_id
where t1.user_id = #{userId}
<select
id=
"getMenu"
resultType=
"com.jz.manage.moduls.entity.SysMenu"
>
select
c.role_name AS roleName,
c.role_id AS roleId,
e.menu_id AS menuId,
e.menu_name AS menuName,
e.parent_id AS parentId,
e.url as url,
e.if_child as ifChild
from t_sys_user a
inner join t_sys_user_role b on a.user_id=b.user_id
inner join t_sys_role c on c.role_id=b.role_id
inner join t_sys_role_menu d on d.role_id=c.role_id
inner join t_sys_menu e on e.menu_id=d.menu_id
where a.user_id=#{userId} and c.role_id = #{roleId}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
pom.xml
View file @
4e952e04
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<lombok.version>
1.18.16
</lombok.version>
<lombok.version>
1.18.16
</lombok.version>
<spring-cloud.version>
Finchley.SR1
</spring-cloud.version>
<spring-cloud.version>
Finchley.SR1
</spring-cloud.version>
<commons-net.version>
3.5
</commons-net.version>
<commons-net.version>
3.5
</commons-net.version>
<http.client>
4.5.6
</http.client>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
...
@@ -222,6 +223,11 @@
...
@@ -222,6 +223,11 @@
<artifactId>
commons-net
</artifactId>
<artifactId>
commons-net
</artifactId>
<version>
${commons-net.version}
</version>
<version>
${commons-net.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<version>
${http.client}
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
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