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
9bac04e6
Commit
9bac04e6
authored
Dec 03, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit 实体类
parent
297a626b
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1475 additions
and
0 deletions
+1475
-0
CompanyAuthController.java
...mall/moduls/controller/company/CompanyAuthController.java
+62
-0
CompanyAddReq.java
...dm/mall/moduls/controller/company/bean/CompanyAddReq.java
+67
-0
ValidateCodeController.java
...ll/moduls/controller/customer/ValidateCodeController.java
+81
-0
FinanceTradeFlowController.java
...moduls/controller/finance/FinanceTradeFlowController.java
+43
-0
DataGoodsApiDto.java
...dm/mall/moduls/controller/order/bean/DataGoodsApiDto.java
+242
-0
DataGoodsApiParamsDto.java
...l/moduls/controller/order/bean/DataGoodsApiParamsDto.java
+134
-0
FinanceCustomerAssets.java
...a/com/jz/dm/mall/moduls/entity/FinanceCustomerAssets.java
+156
-0
FinanceTradeFlow.java
...n/java/com/jz/dm/mall/moduls/entity/FinanceTradeFlow.java
+142
-0
DepartmentDao.java
...main/java/com/jz/dm/mall/moduls/mapper/DepartmentDao.java
+21
-0
FinanceCustomerAssetsDao.java
...om/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
+14
-0
FinanceTradeFlowDao.java
...ava/com/jz/dm/mall/moduls/mapper/FinanceTradeFlowDao.java
+16
-0
CompanyAuthService.java
...ava/com/jz/dm/mall/moduls/service/CompanyAuthService.java
+32
-0
FinanceTradeFlowService.java
...om/jz/dm/mall/moduls/service/FinanceTradeFlowService.java
+12
-0
CompanyAuthServiceImpl.java
...z/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
+124
-0
FinanceTradeFlowServiceImpl.java
...mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
+19
-0
DepartmentDao.xml
jz-dm-mall/src/main/resources/mapperconf/DepartmentDao.xml
+57
-0
FinanceCustomerAssetsDao.xml
...rc/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
+130
-0
PlatformTradeFlowInfoDao.xml
...rc/main/resources/mapperconf/PlatformTradeFlowInfoDao.xml
+123
-0
No files found.
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/CompanyAuthController.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
company
;
import
com.aliyuncs.http.HttpRequest
;
import
com.jz.common.entity.Department
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq
;
import
com.jz.dm.mall.moduls.entity.MallCustomer
;
import
com.jz.dm.mall.moduls.service.CompanyAuthService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
reactor.core.publisher.Mono
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.controller.company
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAuthController
* @USER: key
* @DATE: 2020-12-2/16:33
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@RestController
@RequestMapping
(
"/companyAuth"
)
@Api
(
tags
=
"企业认证controller"
)
public
class
CompanyAuthController
{
@Autowired
private
CompanyAuthService
companyAuthService
;
/**
* @Description: 添加企业认证信息
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"企业信息提交"
)
public
Mono
<
Result
>
addCompanyAuth
(
@RequestBody
@Validated
CompanyAddReq
req
)
{
return
Mono
.
fromSupplier
(()
->
companyAuthService
.
addCompanyData
(
req
));
}
/**
* @Description: 企业认证信息查询
* @Author: Mr.zhang
* @Date: 2020-12-2
*/
@GetMapping
(
"/findCompany"
)
@ApiOperation
(
value
=
"企业认证信息查询"
)
public
Mono
<
Result
>
selectCompany
(
HttpServletRequest
httpRequest
)
{
return
Mono
.
fromSupplier
(()
->{
//TODO 获取当前登录用户
//httpRequest.getSession().getServletContext().getAttribute("customer_id");
return
Result
.
ok
(
companyAuthService
.
selectCompany
());
});
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/company/bean/CompanyAddReq.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
company
.
bean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.controller.company.bean
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAddReq
* @USER: key
* @DATE: 2020-12-2/16:42
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@Data
@ApiModel
(
"添加企业认证请求体"
)
public
class
CompanyAddReq
implements
Serializable
{
@ApiModelProperty
(
name
=
"企业名称"
,
required
=
true
)
@NotNull
(
message
=
"企业名称不能为空"
)
private
String
departmentName
;
@ApiModelProperty
(
name
=
"省"
,
required
=
true
)
@NotNull
(
message
=
"省信息不能为空"
)
private
String
province
;
@ApiModelProperty
(
name
=
"市"
,
required
=
true
)
@NotNull
(
message
=
"市信息不能为空"
)
private
String
city
;
@ApiModelProperty
(
name
=
"公司详细地址"
,
required
=
true
)
@NotNull
(
message
=
"公司详细地址不能为空"
)
private
String
registeredAddress
;
@ApiModelProperty
(
name
=
"统一社会编码"
,
required
=
true
)
@NotNull
(
message
=
"统一社会编码不能忍为空"
)
private
String
unifiedCreditCode
;
@ApiModelProperty
(
name
=
"营业执照照片"
,
required
=
true
)
@NotNull
(
message
=
"营业执照照片不能忍为空"
)
private
String
businessLicense
;
@ApiModelProperty
(
name
=
"开户银行"
,
required
=
true
)
@NotNull
(
message
=
"开户银行不能为空"
)
private
String
bankName
;
@ApiModelProperty
(
name
=
"银行账户"
,
required
=
true
)
@NotNull
(
message
=
"银行账户不能忍为空"
)
private
String
bankCardNumber
;
@ApiModelProperty
(
name
=
"联系人名称"
,
required
=
true
)
@NotNull
(
message
=
"联系人名称不能为空"
)
private
String
linkman
;
@ApiModelProperty
(
name
=
"联系人电话"
,
required
=
true
)
@NotNull
(
message
=
"联系人电话不能为空"
)
private
String
telephone
;
@ApiModelProperty
(
name
=
"登录用户id"
,
hidden
=
true
)
private
Long
customerId
;
@ApiModelProperty
(
name
=
"登录用户名称"
,
hidden
=
true
)
private
String
LoginName
;
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/customer/ValidateCodeController.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
customer
;
import
com.aliyuncs.exceptions.ClientException
;
import
com.jz.common.constant.RedisMessageConstant
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.SMSUtils
;
import
com.jz.common.utils.ValidateCodeUtils
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
redis.clients.jedis.Jedis
;
import
redis.clients.jedis.JedisPool
;
/**
* @ClassName: 短信发送接口
* @Author: Carl
* @Date: 2020/12/2
* @Version:
*/
@RestController
@RequestMapping
(
"/validateCode"
)
@Api
(
tags
=
"短信发送api"
)
public
class
ValidateCodeController
{
@Autowired
private
JedisPool
jedisPool
;
/**
* 注册时发送的验证码
* @param telephone
* @return
*/
@PostMapping
(
"/send4Login"
)
public
Result
send4Login
(
String
telephone
)
{
// 查询redis里是否存在该手机号
Jedis
jedis
=
jedisPool
.
getResource
();
String
key
=
RedisMessageConstant
.
SENDTYPE_LOGIN
+
"_"
+
telephone
;
String
codeInRedis
=
jedis
.
get
(
key
);
if
(
codeInRedis
!=
null
&&
!
codeInRedis
.
equals
(
""
))
{
// redis中的数据还未过期
return
new
Result
(
false
,
"验证码已发送,请注意查收!"
);
}
else
{
Integer
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
);
try
{
SMSUtils
.
sendShortMessage
(
SMSUtils
.
VALIDATE_CODE
,
telephone
,
code
.
toString
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
jedis
.
setex
(
key
,
5
*
60
,
code
+
""
);
return
new
Result
(
true
,
"验证码发送成功!"
);
}
}
/**
* 修改密码发送验证码
* @param telephone
* @return
*/
@PostMapping
(
"/send4Code"
)
public
Result
send4Code
(
String
telephone
)
{
// 查询redis里是否存在该手机号
Jedis
jedis
=
jedisPool
.
getResource
();
String
key
=
RedisMessageConstant
.
SENDTYPE_GETPWD
+
"_"
+
telephone
;
String
codeInRedis
=
jedis
.
get
(
key
);
if
(
codeInRedis
!=
null
&&
!
codeInRedis
.
equals
(
""
))
{
// redis中的数据还未过期
return
new
Result
(
false
,
"验证码已发送,请注意查收!"
);
}
else
{
Integer
code
=
ValidateCodeUtils
.
generateValidateCode
(
6
);
try
{
SMSUtils
.
sendShortMessage
(
SMSUtils
.
VALIDATE_CODE
,
telephone
,
code
.
toString
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
jedis
.
setex
(
key
,
5
*
60
,
code
+
""
);
return
new
Result
(
true
,
"验证码发送成功!"
);
}
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/finance/FinanceTradeFlowController.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
finance
;
import
com.jz.common.base.BaseController
;
import
com.jz.common.utils.Result
;
import
com.jz.dm.mall.moduls.controller.order.bean.OrderDto
;
import
com.jz.dm.mall.moduls.service.FinanceTradeFlowService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
* 企业客户交易流水(TFinanceTradeFlow)表控制层
*
* @author Bellamy
* @since 2020-12-01 10:41:39
*/
@RestController
@RequestMapping
(
"/financeTradeFlow"
)
@Api
(
tags
=
"利润中心"
)
public
class
FinanceTradeFlowController
extends
BaseController
{
/**
* 服务对象
*/
@Autowired
private
FinanceTradeFlowService
financeTradeFlowService
;
/**
* 订单管理列表(分页查询)
*
* @author Bellamy
*/
@GetMapping
(
value
=
"/getAccountMoney"
)
@ApiOperation
(
value
=
"充值----获取账户余额"
,
notes
=
"获取账户余额"
)
public
Result
<
OrderDto
>
getAccountMoney
(
HttpServletRequest
req
)
throws
Exception
{
return
new
Result
<>();
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/order/bean/DataGoodsApiDto.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
order
.
bean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* api商品(DataGoodsApiDto)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
@ApiModel
public
class
DataGoodsApiDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
14346819849726413L
;
/**
* api商品id
*/
@ApiModelProperty
(
value
=
"api商品id"
)
private
Long
goodsApi
;
/**
* 数据id
*/
@ApiModelProperty
(
value
=
"数据id"
)
private
Long
dataGoodsId
;
/**
* api服务名称
*/
@ApiModelProperty
(
value
=
"api服务名称"
)
private
String
apiName
;
/**
* 请求类型(方式)
*/
@ApiModelProperty
(
value
=
"请求类型(方式)"
)
private
String
requestType
;
/**
* api接口地址
*/
@ApiModelProperty
(
value
=
"api接口地址"
)
private
String
apiUrl
;
/**
* api接口方法
*/
@ApiModelProperty
(
value
=
"api接口方法"
)
private
String
apiMethod
;
/**
* api请求协议:http,https
*/
@ApiModelProperty
(
value
=
"api请求协议:http,https"
)
private
String
apiProtocl
;
/**
* api返回数据样例
*/
@ApiModelProperty
(
value
=
"api返回数据样例"
)
private
String
returnDataExample
;
/**
* api请求样例
*/
@ApiModelProperty
(
value
=
"api请求样例"
)
private
String
requestExample
;
/**
* 返回类型
*/
@ApiModelProperty
(
value
=
"返回类型"
)
private
String
returnType
;
/**
* apikey
*/
@ApiModelProperty
(
value
=
"apikey"
)
private
String
apiKey
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creTime
;
/**
* 创建人
*/
@ApiModelProperty
(
value
=
"创建人"
)
private
String
crePerson
;
/**
* 更新人
*/
@ApiModelProperty
(
value
=
"更新人"
)
private
String
uptPerson
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
uptTime
;
/**
* 授权码token
*/
@ApiModelProperty
(
value
=
"授权码token"
)
private
String
requestToken
;
/**
* 接口参数信息
*/
@ApiModelProperty
(
value
=
"接口参数信息"
)
private
List
<
DataGoodsApiParamsDto
>
apiParamsDto
;
public
Long
getGoodsApi
()
{
return
goodsApi
;
}
public
void
setGoodsApi
(
Long
goodsApi
)
{
this
.
goodsApi
=
goodsApi
;
}
public
Long
getDataGoodsId
()
{
return
dataGoodsId
;
}
public
void
setDataGoodsId
(
Long
dataGoodsId
)
{
this
.
dataGoodsId
=
dataGoodsId
;
}
public
String
getApiName
()
{
return
apiName
;
}
public
void
setApiName
(
String
apiName
)
{
this
.
apiName
=
apiName
;
}
public
String
getRequestType
()
{
return
requestType
;
}
public
void
setRequestType
(
String
requestType
)
{
this
.
requestType
=
requestType
;
}
public
String
getApiUrl
()
{
return
apiUrl
;
}
public
void
setApiUrl
(
String
apiUrl
)
{
this
.
apiUrl
=
apiUrl
;
}
public
String
getApiMethod
()
{
return
apiMethod
;
}
public
void
setApiMethod
(
String
apiMethod
)
{
this
.
apiMethod
=
apiMethod
;
}
public
String
getApiProtocl
()
{
return
apiProtocl
;
}
public
void
setApiProtocl
(
String
apiProtocl
)
{
this
.
apiProtocl
=
apiProtocl
;
}
public
String
getReturnDataExample
()
{
return
returnDataExample
;
}
public
void
setReturnDataExample
(
String
returnDataExample
)
{
this
.
returnDataExample
=
returnDataExample
;
}
public
String
getRequestExample
()
{
return
requestExample
;
}
public
void
setRequestExample
(
String
requestExample
)
{
this
.
requestExample
=
requestExample
;
}
public
String
getReturnType
()
{
return
returnType
;
}
public
void
setReturnType
(
String
returnType
)
{
this
.
returnType
=
returnType
;
}
public
String
getApiKey
()
{
return
apiKey
;
}
public
void
setApiKey
(
String
apiKey
)
{
this
.
apiKey
=
apiKey
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
String
getCrePerson
()
{
return
crePerson
;
}
public
void
setCrePerson
(
String
crePerson
)
{
this
.
crePerson
=
crePerson
;
}
public
String
getUptPerson
()
{
return
uptPerson
;
}
public
void
setUptPerson
(
String
uptPerson
)
{
this
.
uptPerson
=
uptPerson
;
}
public
Date
getUptTime
()
{
return
uptTime
;
}
public
void
setUptTime
(
Date
uptTime
)
{
this
.
uptTime
=
uptTime
;
}
public
String
getRequestToken
()
{
return
requestToken
;
}
public
void
setRequestToken
(
String
requestToken
)
{
this
.
requestToken
=
requestToken
;
}
public
List
<
DataGoodsApiParamsDto
>
getApiParamsDto
()
{
return
apiParamsDto
;
}
public
void
setApiParamsDto
(
List
<
DataGoodsApiParamsDto
>
apiParamsDto
)
{
this
.
apiParamsDto
=
apiParamsDto
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/controller/order/bean/DataGoodsApiParamsDto.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
controller
.
order
.
bean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
/**
* api商品参数配置(TDataGoodsApiParams)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
@ApiModel
public
class
DataGoodsApiParamsDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
944366688061324185L
;
/**
* api参数id
*/
@ApiModelProperty
(
value
=
"api参数id"
)
private
Long
apiParamsId
;
/**
* api商品id
*/
@ApiModelProperty
(
value
=
"api商品id"
)
private
Long
goodsApi
;
/**
* 参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数
*/
@ApiModelProperty
(
value
=
"参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数"
)
private
String
paramsDiff
;
/**
* 参数名称
*/
@ApiModelProperty
(
value
=
"参数名称"
)
private
String
paramsName
;
/**
* 参数类型
*/
@ApiModelProperty
(
value
=
"参数类型"
)
private
String
paramsType
;
/**
* 参数描述
*/
@ApiModelProperty
(
value
=
"参数描述"
)
private
String
paramsDesc
;
/**
* 默认值
*/
@ApiModelProperty
(
value
=
"默认值"
)
private
String
defaultValue
;
/**
* 是否必选:Y是,N否
*/
@ApiModelProperty
(
value
=
"是否必选:Y是,N否"
)
private
String
ifRequird
;
/*
* 参数分类:名称
* */
@ApiModelProperty
(
value
=
"参数分类名称"
)
private
String
paramsDiffName
;
public
Long
getGoodsApi
()
{
return
goodsApi
;
}
public
void
setGoodsApi
(
Long
goodsApi
)
{
this
.
goodsApi
=
goodsApi
;
}
public
String
getParamsDiff
()
{
return
paramsDiff
;
}
public
void
setParamsDiff
(
String
paramsDiff
)
{
this
.
paramsDiff
=
paramsDiff
;
}
public
String
getParamsName
()
{
return
paramsName
;
}
public
void
setParamsName
(
String
paramsName
)
{
this
.
paramsName
=
paramsName
;
}
public
String
getParamsType
()
{
return
paramsType
;
}
public
void
setParamsType
(
String
paramsType
)
{
this
.
paramsType
=
paramsType
;
}
public
String
getParamsDesc
()
{
return
paramsDesc
;
}
public
void
setParamsDesc
(
String
paramsDesc
)
{
this
.
paramsDesc
=
paramsDesc
;
}
public
String
getDefaultValue
()
{
return
defaultValue
;
}
public
void
setDefaultValue
(
String
defaultValue
)
{
this
.
defaultValue
=
defaultValue
;
}
public
String
getIfRequird
()
{
return
ifRequird
;
}
public
void
setIfRequird
(
String
ifRequird
)
{
this
.
ifRequird
=
ifRequird
;
}
public
String
getParamsDiffName
()
{
return
paramsDiffName
;
}
public
void
setParamsDiffName
(
String
paramsDiffName
)
{
this
.
paramsDiffName
=
paramsDiffName
;
}
public
Long
getApiParamsId
()
{
return
apiParamsId
;
}
public
void
setApiParamsId
(
Long
apiParamsId
)
{
this
.
apiParamsId
=
apiParamsId
;
}
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/entity/FinanceCustomerAssets.java
0 → 100644
View file @
9bac04e6
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
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 商城企业客户资产(TFinanceCustomerAssets)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:38
*/
@TableName
(
"t_finance_customer_assets"
)
@ApiModel
public
class
FinanceCustomerAssets
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
86484762300825431L
;
/**
* 资产id
*/
@TableId
(
value
=
"customer_id"
,
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"企业id"
)
private
Long
assetsId
;
/**
* 企业id
*/
@ApiModelProperty
(
value
=
"企业id"
)
private
Long
departmentId
;
/**
* 可用金额
*/
@ApiModelProperty
(
value
=
"可用金额"
)
private
BigDecimal
useMoney
;
/**
* 冻结金额
*/
@ApiModelProperty
(
value
=
"冻结金额"
)
private
BigDecimal
frozenMoney
;
/**
* 总金额
*/
@ApiModelProperty
(
value
=
"总金额"
)
private
BigDecimal
totalMoney
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creTime
;
/**
* 创建人
*/
@ApiModelProperty
(
value
=
"创建人"
)
private
String
crePerson
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
uptTime
;
/**
* 更新人
*/
@ApiModelProperty
(
value
=
"更新人"
)
private
String
uptPerson
;
/**
* 删除标识
*/
@ApiModelProperty
(
value
=
"删除标识"
)
private
String
delFlag
;
public
Long
getAssetsId
()
{
return
assetsId
;
}
public
void
setAssetsId
(
Long
assetsId
)
{
this
.
assetsId
=
assetsId
;
}
public
Long
getDepartmentId
()
{
return
departmentId
;
}
public
void
setDepartmentId
(
Long
departmentId
)
{
this
.
departmentId
=
departmentId
;
}
public
BigDecimal
getUseMoney
()
{
return
useMoney
;
}
public
void
setUseMoney
(
BigDecimal
useMoney
)
{
this
.
useMoney
=
useMoney
;
}
public
BigDecimal
getFrozenMoney
()
{
return
frozenMoney
;
}
public
void
setFrozenMoney
(
BigDecimal
frozenMoney
)
{
this
.
frozenMoney
=
frozenMoney
;
}
public
BigDecimal
getTotalMoney
()
{
return
totalMoney
;
}
public
void
setTotalMoney
(
BigDecimal
totalMoney
)
{
this
.
totalMoney
=
totalMoney
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
String
getCrePerson
()
{
return
crePerson
;
}
public
void
setCrePerson
(
String
crePerson
)
{
this
.
crePerson
=
crePerson
;
}
public
Date
getUptTime
()
{
return
uptTime
;
}
public
void
setUptTime
(
Date
uptTime
)
{
this
.
uptTime
=
uptTime
;
}
public
String
getUptPerson
()
{
return
uptPerson
;
}
public
void
setUptPerson
(
String
uptPerson
)
{
this
.
uptPerson
=
uptPerson
;
}
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/FinanceTradeFlow.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 企业客户交易流水(TFinanceTradeFlow)实体类
*
* @author makejava
* @since 2020-12-01 10:41:39
*/
@TableName
(
"t_finance_trade_flow"
)
@ApiModel
public
class
FinanceTradeFlow
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
55257582310832314L
;
/**
* 交易流水id
*/
private
Long
tradeFlowId
;
/**
* 订单id
*/
private
Long
orderId
;
/**
* 提现id
*/
private
Long
cashOutId
;
/**
* 充值id
*/
private
Long
customerBalanceId
;
/**
* 交易流水编号
*/
private
String
tradeFlowNumber
;
/**
* 交易流水金额
*/
private
BigDecimal
tradeMoney
;
/**
* 交易类型:01提现,02充值,03付款,04收款,05续费
*/
private
String
tradeType
;
/**
* 创建时间
*/
private
Date
creTime
;
/**
* 创建人
*/
private
String
crePerson
;
/**
* 删除标识
*/
private
String
delFlag
;
public
Long
getTradeFlowId
()
{
return
tradeFlowId
;
}
public
void
setTradeFlowId
(
Long
tradeFlowId
)
{
this
.
tradeFlowId
=
tradeFlowId
;
}
public
Long
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
Long
orderId
)
{
this
.
orderId
=
orderId
;
}
public
Long
getCashOutId
()
{
return
cashOutId
;
}
public
void
setCashOutId
(
Long
cashOutId
)
{
this
.
cashOutId
=
cashOutId
;
}
public
Long
getCustomerBalanceId
()
{
return
customerBalanceId
;
}
public
void
setCustomerBalanceId
(
Long
customerBalanceId
)
{
this
.
customerBalanceId
=
customerBalanceId
;
}
public
String
getTradeFlowNumber
()
{
return
tradeFlowNumber
;
}
public
void
setTradeFlowNumber
(
String
tradeFlowNumber
)
{
this
.
tradeFlowNumber
=
tradeFlowNumber
;
}
public
BigDecimal
getTradeMoney
()
{
return
tradeMoney
;
}
public
void
setTradeMoney
(
BigDecimal
tradeMoney
)
{
this
.
tradeMoney
=
tradeMoney
;
}
public
String
getTradeType
()
{
return
tradeType
;
}
public
void
setTradeType
(
String
tradeType
)
{
this
.
tradeType
=
tradeType
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
String
getCrePerson
()
{
return
crePerson
;
}
public
void
setCrePerson
(
String
crePerson
)
{
this
.
crePerson
=
crePerson
;
}
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/mapper/DepartmentDao.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.common.entity.Department
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq
;
/**
* 企业(TDepartment)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:35
*/
public
interface
DepartmentDao
extends
BaseMapper
<
Department
>
{
/**
* 查询企业信息
* @param req
* @return
*/
Department
selectDepartmentData
(
CompanyAddReq
req
);
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/FinanceCustomerAssetsDao.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.entity.FinanceCustomerAssets
;
/**
* 商城企业客户资产(TFinanceCustomerAssets)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:38
*/
public
interface
FinanceCustomerAssetsDao
extends
BaseMapper
<
FinanceCustomerAssets
>
{
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/mapper/FinanceTradeFlowDao.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
mapper
;
import
com.jz.common.base.BaseMapper
;
import
com.jz.dm.mall.moduls.entity.FinanceTradeFlow
;
/**
* 企业客户交易流水(TFinanceTradeFlow)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:39
*/
public
interface
FinanceTradeFlowDao
extends
BaseMapper
<
FinanceTradeFlow
>
{
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/CompanyAuthService.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
import
com.jz.common.entity.Department
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq
;
import
com.jz.common.utils.Result
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.service
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAuthService
* @USER: key
* @DATE: 2020-12-2/16:34
* @DAY_NAME_SHORT: 周三
* @Description:
**/
public
interface
CompanyAuthService
{
/**
* 添加企业认证
* @param req
* @return
*/
Result
addCompanyData
(
CompanyAddReq
req
);
/**
* 查询企业认证详情
* @return
*/
Result
<
Department
>
selectCompany
();
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/FinanceTradeFlowService.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
;
/**
* 企业客户交易流水(TFinanceTradeFlow)表服务接口
*
* @author Bellamy
* @since 2020-12-01 10:41:39
*/
public
interface
FinanceTradeFlowService
{
}
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/CompanyAuthServiceImpl.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
java.math.BigDecimal
;
import
com.jz.common.entity.Department
;
import
com.jz.common.entity.FinanceCustomerAssets
;
import
com.jz.common.entity.MallCustomer
;
import
com.jz.common.utils.Result
;
import
com.jz.common.utils.UserContextUtil
;
import
com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq
;
import
com.jz.dm.mall.moduls.mapper.DepartmentDao
;
import
com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao
;
import
com.jz.dm.mall.moduls.mapper.MallCustomerDao
;
import
com.jz.dm.mall.moduls.service.CompanyAuthService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.Date
;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.mall.moduls.service.impl
* @PROJECT_NAME: jz-dm-parent
* @NAME: CompanyAuthServiceImpl
* @USER: key
* @DATE: 2020-12-2/16:35
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@Service
(
"companyAuthService"
)
@Slf4j
public
class
CompanyAuthServiceImpl
implements
CompanyAuthService
{
@Resource
private
DepartmentDao
departmentDao
;
@Resource
private
FinanceCustomerAssetsDao
financeCustomerAssetsDao
;
@Resource
private
MallCustomerDao
mallCustomerDao
;
/**
* 添加企业认证
*
* @param req
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Result
addCompanyData
(
CompanyAddReq
req
)
{
//TODO 获取当前用户ID判断当前用户是否已经关联企业
Long
customerId
=
(
Long
)
UserContextUtil
.
pop
(
"customer_id"
);
if
(
null
==
customerId
){
return
Result
.
error
(
"获取用户信息失败"
);
}
MallCustomer
mallCustomer
=
mallCustomerDao
.
findById
(
customerId
);
if
(
null
==
mallCustomer
){
return
Result
.
error
(
"用户信息不存在"
);
}
if
(
null
!=
mallCustomer
.
getDepartmentId
()){
return
Result
.
error
(
"用户已关联企业,请勿重复操作"
);
}
req
.
setCustomerId
(
mallCustomer
.
getCustomerId
());
if
(
StringUtils
.
isNotBlank
(
req
.
getDepartmentName
())
&&
StringUtils
.
isNotBlank
(
req
.
getUnifiedCreditCode
()))
{
//企业名称 && 营业执照
Department
department
=
departmentDao
.
selectDepartmentData
(
req
);
if
(
null
!=
department
)
{
return
Result
.
error
(
"企业用户信息已存在"
);
}
}
insetCompany
(
req
);
return
Result
.
ok
(
"添加企业用户成功"
);
}
/**
* 查询企业认证详情
* @return
*/
@Override
public
Result
<
Department
>
selectCompany
()
{
//查询用户判断用户是否认证
// if (){
//
// }
return
null
;
}
/**
* 保存企业信息
* @param req
*/
private
void
insetCompany
(
CompanyAddReq
req
)
{
//保存企业信息
Department
departmentInset
=
new
Department
();
departmentInset
.
setAuditStatus
(
"01"
);
//待审核
departmentInset
.
setCreTime
(
new
Date
());
departmentInset
.
setCrePerson
(
req
.
getLoginName
());
BeanUtils
.
copyProperties
(
req
,
departmentInset
);
if
(
departmentDao
.
insert
(
departmentInset
)
!=
1
){
throw
new
RuntimeException
(
"保存企业信息失败"
);
}
//初始化用户资产表
FinanceCustomerAssets
finance
=
new
FinanceCustomerAssets
();
finance
.
setDepartmentId
(
departmentInset
.
getDepartmentId
());
//企业ID
finance
.
setCreTime
(
new
Date
());
finance
.
setCrePerson
(
req
.
getLoginName
());
if
(
financeCustomerAssetsDao
.
insert
(
finance
)
!=
1
){
throw
new
RuntimeException
(
"初始化用户资产失败"
);
}
//更新用户企业信息
MallCustomer
mallCustomer
=
new
MallCustomer
();
mallCustomer
.
setCustomerId
(
req
.
getCustomerId
());
//用户ID
mallCustomer
.
setDepartmentId
(
departmentInset
.
getDepartmentId
());
mallCustomer
.
setUptTime
(
new
Date
());
mallCustomer
.
setUptPerson
(
req
.
getLoginName
());
if
(
mallCustomerDao
.
updateById
(
mallCustomer
)
!=
1
){
throw
new
RuntimeException
(
"更新用户企业信息失败"
);
}
}
}
jz-dm-mall/src/main/java/com/jz/dm/mall/moduls/service/impl/FinanceTradeFlowServiceImpl.java
0 → 100644
View file @
9bac04e6
package
com
.
jz
.
dm
.
mall
.
moduls
.
service
.
impl
;
import
com.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao
;
import
com.jz.dm.mall.moduls.service.FinanceTradeFlowService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 企业客户交易流水(TFinanceTradeFlow)表服务实现类
*
* @author Bellamy
* @since 2020-12-01 10:41:39
*/
@Service
(
"financeTradeFlowService"
)
public
class
FinanceTradeFlowServiceImpl
implements
FinanceTradeFlowService
{
@Autowired
private
FinanceTradeFlowDao
tFinanceTradeFlowDao
;
}
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/DepartmentDao.xml
0 → 100644
View file @
9bac04e6
<?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">
<mapper
namespace=
"com.jz.dm.mall.moduls.mapper.DepartmentDao"
>
<!--<resultMap type="com.jz.manage.moduls.entity.Department" id="TDepartmentMap">
<result property="departmentId" column="department_id" jdbcType="INTEGER"/>
<result property="departmentName" column="department_name" jdbcType="VARCHAR"/>
<result property="legalRepresentative" column="legal_representative" jdbcType="VARCHAR"/>
<result property="province" column="province" jdbcType="VARCHAR"/>
<result property="city" column="city" jdbcType="VARCHAR"/>
<result property="industry" column="industry" jdbcType="VARCHAR"/>
<result property="telephone" column="telephone" jdbcType="VARCHAR"/>
<result property="registeredAddress" column="registered_address" jdbcType="VARCHAR"/>
<result property="zoneCode" column="zone_code" jdbcType="OTHER"/>
<result property="departPicture" column="depart_picture" jdbcType="VARCHAR"/>
<result property="businessLicense" column="business_license" jdbcType="VARCHAR"/>
<result property="taxRegistration" column="tax_registration" jdbcType="VARCHAR"/>
<result property="departPictureTime" column="depart_picture_time" jdbcType="TIMESTAMP"/>
<result property="businessLicenseTime" column="business_license_time" jdbcType="TIMESTAMP"/>
<result property="taxRegistrationTime" column="tax_registration_time" jdbcType="TIMESTAMP"/>
<result property="unifiedCreditCode" column="unified_credit_code" jdbcType="VARCHAR"/>
<result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
<result property="bankCardNumber" column="bank_card_number" jdbcType="VARCHAR"/>
<result property="bankAddress" column="bank_address" jdbcType="VARCHAR"/>
<result property="bankNo" column="bank_no" jdbcType="VARCHAR"/>
<result property="auditStatus" column="audit_status" jdbcType="VARCHAR"/>
<result property="rejectReason" column="reject_reason" jdbcType="VARCHAR"/>
<result property="auditPerson" column="audit_person" jdbcType="VARCHAR"/>
<result property="auditTime" column="audit_time" jdbcType="TIMESTAMP"/>
<result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>
<result property="crePerson" column="cre_person" jdbcType="VARCHAR"/>
<result property="uptTime" column="upt_time" jdbcType="TIMESTAMP"/>
<result property="uptPerson" column="upt_person" jdbcType="VARCHAR"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
</resultMap>
-->
<sql
id=
"department"
>
department_id,department_name,legal_representative,province,city,industry,linkman,telephone,registered_address,
depart_picture,business_license,tax_registration,depart_picture_time,business_license_time,tax_registration_time,
unified_credit_code,bank_name,bank_card_number,bank_address,bank_no,audit_status,audit_status,audit_person,cre_time,
cre_person,del_flag
</sql>
<select
id=
"selectDepartmentData"
resultType=
"com.jz.common.entity.Department"
>
SELECT
<include
refid=
"department"
/>
FROM t_department
WHERE 1=1
<if
test=
"req.departmentName != null and req.departmentName !=''"
>
AND department_name =#{req.departmentName}
</if>
<if
test=
"req.unifiedCreditCode != null and req.unifiedCreditCode !=''"
>
AND unified_credit_code =#{req.unifiedCreditCode}
</if>
</select>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/FinanceCustomerAssetsDao.xml
0 → 100644
View file @
9bac04e6
<?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">
<mapper
namespace=
"com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao"
>
<!-- <resultMap type="com.jz.manage.moduls.entity.FinanceCustomerAssets" id="TFinanceCustomerAssetsMap">-->
<!-- <result property="assetsId" column="assets_id" jdbcType="INTEGER"/>-->
<!-- <result property="departmentId" column="department_id" jdbcType="INTEGER"/>-->
<!-- <result property="useMoney" column="use_money" jdbcType="NUMERIC"/>-->
<!-- <result property="frozenMoney" column="frozen_money" jdbcType="NUMERIC"/>-->
<!-- <result property="totalMoney" column="total_money" jdbcType="NUMERIC"/>-->
<!-- <result property="creTime" column="cre_time" jdbcType="TIMESTAMP"/>-->
<!-- <result property="crePerson" column="cre_person" jdbcType="VARCHAR"/>-->
<!-- <result property="uptTime" column="upt_time" jdbcType="TIMESTAMP"/>-->
<!-- <result property="uptPerson" column="upt_person" jdbcType="VARCHAR"/>-->
<!-- <result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>-->
<!-- </resultMap>-->
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TFinanceCustomerAssetsMap"
>
select
assets_id, department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person, del_flag
from t_finance_customer_assets
where assets_id = #{assetsId}
</select>
<!--查询指定行数据-->
<select
id=
"queryAllByLimit"
resultMap=
"TFinanceCustomerAssetsMap"
>
select
assets_id, department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person, del_flag
from t_finance_customer_assets
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryAll"
resultMap=
"TFinanceCustomerAssetsMap"
>
select
assets_id, department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person,
del_flag
from t_finance_customer_assets
<where>
<if
test=
"assetsId != null"
>
and assets_id = #{assetsId}
</if>
<if
test=
"departmentId != null"
>
and department_id = #{departmentId}
</if>
<if
test=
"useMoney != null"
>
and use_money = #{useMoney}
</if>
<if
test=
"frozenMoney != null"
>
and frozen_money = #{frozenMoney}
</if>
<if
test=
"totalMoney != null"
>
and total_money = #{totalMoney}
</if>
<if
test=
"creTime != null"
>
and cre_time = #{creTime}
</if>
<if
test=
"crePerson != null and crePerson != ''"
>
and cre_person = #{crePerson}
</if>
<if
test=
"uptTime != null"
>
and upt_time = #{uptTime}
</if>
<if
test=
"uptPerson != null and uptPerson != ''"
>
and upt_person = #{uptPerson}
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
and del_flag = #{delFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"assetsId"
useGeneratedKeys=
"true"
>
insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person, del_flag)
values (#{departmentId}, #{useMoney}, #{frozenMoney}, #{totalMoney}, #{creTime}, #{crePerson}, #{uptTime}, #{uptPerson}, #{delFlag})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"assetsId"
useGeneratedKeys=
"true"
>
insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money,
cre_time, cre_person, upt_time, upt_person, del_flag)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.departmentId}, #{entity.useMoney}, #{entity.frozenMoney}, #{entity.totalMoney}, #{entity.creTime},
#{entity.crePerson}, #{entity.uptTime}, #{entity.uptPerson}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
>
update t_finance_customer_assets
<set>
<if
test=
"departmentId != null"
>
department_id = #{departmentId},
</if>
<if
test=
"useMoney != null"
>
use_money = #{useMoney},
</if>
<if
test=
"frozenMoney != null"
>
frozen_money = #{frozenMoney},
</if>
<if
test=
"totalMoney != null"
>
total_money = #{totalMoney},
</if>
<if
test=
"creTime != null"
>
cre_time = #{creTime},
</if>
<if
test=
"crePerson != null and crePerson != ''"
>
cre_person = #{crePerson},
</if>
<if
test=
"uptTime != null"
>
upt_time = #{uptTime},
</if>
<if
test=
"uptPerson != null and uptPerson != ''"
>
upt_person = #{uptPerson},
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
del_flag = #{delFlag},
</if>
</set>
where assets_id = #{assetsId}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
delete from t_finance_customer_assets where assets_id = #{assetsId}
</delete>
</mapper>
\ No newline at end of file
jz-dm-mall/src/main/resources/mapperconf/PlatformTradeFlowInfoDao.xml
0 → 100644
View file @
9bac04e6
<?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">
<mapper
namespace=
"com.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao"
>
<resultMap
type=
"com.jz.dm.mall.moduls.entity.FinanceTradeFlow"
id=
"TPlatformTradeFlowInfoMap"
>
<result
property=
"tradeFlowInfoId"
column=
"trade_flow_info_id"
jdbcType=
"INTEGER"
/>
<result
property=
"receiveInfoId"
column=
"receive_info_id"
jdbcType=
"INTEGER"
/>
<result
property=
"platformTradeMoney"
column=
"platform_trade_money"
jdbcType=
"NUMERIC"
/>
<result
property=
"tradeType"
column=
"trade_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"creTime"
column=
"cre_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"crePerson"
column=
"cre_person"
jdbcType=
"VARCHAR"
/>
<result
property=
"uptTime"
column=
"upt_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"uptPerson"
column=
"upt_person"
jdbcType=
"VARCHAR"
/>
<result
property=
"delFlag"
column=
"del_flag"
jdbcType=
"VARCHAR"
/>
</resultMap>
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TPlatformTradeFlowInfoMap"
>
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag
from t_platform_trade_flow_info
where trade_flow_info_id = #{tradeFlowInfoId}
</select>
<!--查询指定行数据-->
<select
id=
"queryAllByLimit"
resultMap=
"TPlatformTradeFlowInfoMap"
>
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag
from t_platform_trade_flow_info
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryAll"
resultMap=
"TPlatformTradeFlowInfoMap"
>
select
trade_flow_info_id, receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time,
upt_person, del_flag
from t_platform_trade_flow_info
<where>
<if
test=
"tradeFlowInfoId != null"
>
and trade_flow_info_id = #{tradeFlowInfoId}
</if>
<if
test=
"receiveInfoId != null"
>
and receive_info_id = #{receiveInfoId}
</if>
<if
test=
"platformTradeMoney != null"
>
and platform_trade_money = #{platformTradeMoney}
</if>
<if
test=
"tradeType != null and tradeType != ''"
>
and trade_type = #{tradeType}
</if>
<if
test=
"creTime != null"
>
and cre_time = #{creTime}
</if>
<if
test=
"crePerson != null and crePerson != ''"
>
and cre_person = #{crePerson}
</if>
<if
test=
"uptTime != null"
>
and upt_time = #{uptTime}
</if>
<if
test=
"uptPerson != null and uptPerson != ''"
>
and upt_person = #{uptPerson}
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
and del_flag = #{delFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"tradeFlowInfoId"
useGeneratedKeys=
"true"
>
insert into t_platform_trade_flow_info(receive_info_id, platform_trade_money, trade_type, cre_time, cre_person, upt_time, upt_person, del_flag)
values (#{receiveInfoId}, #{platformTradeMoney}, #{tradeType}, #{creTime}, #{crePerson}, #{uptTime}, #{uptPerson}, #{delFlag})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"tradeFlowInfoId"
useGeneratedKeys=
"true"
>
insert into t_platform_trade_flow_info(receive_info_id, platform_trade_money, trade_type,
cre_time, cre_person, upt_time, upt_person, del_flag)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.receiveInfoId}, #{entity.platformTradeMoney}, #{entity.tradeType}, #{entity.creTime},
#{entity.crePerson}, #{entity.uptTime}, #{entity.uptPerson}, #{entity.delFlag})
</foreach>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
>
update t_platform_trade_flow_info
<set>
<if
test=
"receiveInfoId != null"
>
receive_info_id = #{receiveInfoId},
</if>
<if
test=
"platformTradeMoney != null"
>
platform_trade_money = #{platformTradeMoney},
</if>
<if
test=
"tradeType != null and tradeType != ''"
>
trade_type = #{tradeType},
</if>
<if
test=
"creTime != null"
>
cre_time = #{creTime},
</if>
<if
test=
"crePerson != null and crePerson != ''"
>
cre_person = #{crePerson},
</if>
<if
test=
"uptTime != null"
>
upt_time = #{uptTime},
</if>
<if
test=
"uptPerson != null and uptPerson != ''"
>
upt_person = #{uptPerson},
</if>
<if
test=
"delFlag != null and delFlag != ''"
>
del_flag = #{delFlag},
</if>
</set>
where trade_flow_info_id = #{tradeFlowInfoId}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
delete from t_platform_trade_flow_info where trade_flow_info_id = #{tradeFlowInfoId}
</delete>
</mapper>
\ No newline at end of file
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