Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-charging-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ef692ee5
authored
Nov 09, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]计算模型提交
1 parent
ff393b86
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
234 additions
and
62 deletions
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/entity/ChargingModel.java
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/entity/ChargingPile.java
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/mapper/ChargingModelMapper.java
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/mapper/ChargingPileMapper.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/ServerMain.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/ModelChargingRspData.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelChargingReqHandler.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelValReqHandler.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/service/ChargingPileService.java
platform-charging/src/main/resources/mapper/ChargingModelMapper.xml
platform-charging/src/main/resources/mapper/ChargingPileMapper.xml
platform-charging/src/test/java/cn/com/glsx/charging/gbt/ocpp16/ModelChargingTest.java
platform-charging/src/test/java/cn/com/glsx/charging/gbt/ocpp16/ModelValTest.java
platform-charging/src/test/resources/generatorConfig.xml
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/entity/ChargingModel.java
0 → 100644
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
entity
;
import
javax.persistence.*
;
@Table
(
name
=
"charging_model"
)
public
class
ChargingModel
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
/**
* 计费模型
*/
@Column
(
name
=
"model_code"
)
private
String
modelCode
;
/**
* @return id
*/
public
Integer
getId
()
{
return
id
;
}
/**
* @param id
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取计费模型
*
* @return model_code - 计费模型
*/
public
String
getModelCode
()
{
return
modelCode
;
}
/**
* 设置计费模型
*
* @param modelCode 计费模型
*/
public
void
setModelCode
(
String
modelCode
)
{
this
.
modelCode
=
modelCode
==
null
?
null
:
modelCode
.
trim
();
}
}
\ No newline at end of file
\ No newline at end of file
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/entity/ChargingPile.java
0 → 100644
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
entity
;
import
javax.persistence.*
;
@Table
(
name
=
"charging_pile"
)
public
class
ChargingPile
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
@Column
(
name
=
"pile_id"
)
private
String
pileId
;
@Column
(
name
=
"model_code"
)
private
String
modelCode
;
/**
* @return id
*/
public
Integer
getId
()
{
return
id
;
}
/**
* @param id
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* @return pile_id
*/
public
String
getPileId
()
{
return
pileId
;
}
/**
* @param pileId
*/
public
void
setPileId
(
String
pileId
)
{
this
.
pileId
=
pileId
==
null
?
null
:
pileId
.
trim
();
}
/**
* @return model_code
*/
public
String
getModelCode
()
{
return
modelCode
;
}
/**
* @param modelCode
*/
public
void
setModelCode
(
String
modelCode
)
{
this
.
modelCode
=
modelCode
==
null
?
null
:
modelCode
.
trim
();
}
}
\ No newline at end of file
\ No newline at end of file
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/mapper/ChargingModelMapper.java
0 → 100644
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
mapper
;
import
cn.com.glsx.charging.modules.entity.ChargingModel
;
import
com.glsx.plat.mybatis.mapper.CommonBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
ChargingModelMapper
extends
CommonBaseMapper
<
ChargingModel
>
{
}
\ No newline at end of file
\ No newline at end of file
platform-charging-api/src/main/java/cn/com/glsx/charging/modules/mapper/ChargingPileMapper.java
0 → 100644
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
mapper
;
import
cn.com.glsx.charging.modules.entity.ChargingPile
;
import
com.glsx.plat.mybatis.mapper.CommonBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
ChargingPileMapper
extends
CommonBaseMapper
<
ChargingPile
>
{
ChargingPile
findByPileId
(
@Param
(
"pileId"
)
String
pileId
);
}
\ No newline at end of file
\ No newline at end of file
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/ServerMain.java
View file @
ef692ee
...
@@ -43,11 +43,11 @@ public class ServerMain {
...
@@ -43,11 +43,11 @@ public class ServerMain {
TcpServer
server
=
start
(
host
,
port
);
TcpServer
server
=
start
(
host
,
port
);
TimeSettingReq
timeReq
=
new
TimeSettingReq
();
/*
TimeSettingReq timeReq = new TimeSettingReq();
timeReq.setData(new TimeSettingReqData());
timeReq.setData(new TimeSettingReqData());
TcpCallback<TcpRsp> callback = server.sendSync(timeReq);
TcpCallback<TcpRsp> callback = server.sendSync(timeReq);
TcpRsp
rsp
=
callback
.
get
();
TcpRsp rsp = callback.get();
*/
}
}
}
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/data/ModelChargingRspData.java
View file @
ef692ee
...
@@ -29,7 +29,7 @@ public class ModelChargingRspData extends TcpData {
...
@@ -29,7 +29,7 @@ public class ModelChargingRspData extends TcpData {
/**
/**
* 计费模型编号:固定值:01 00
* 计费模型编号:固定值:01 00
*/
*/
private
byte
modelCode
;
private
byte
[]
modelCode
=
new
byte
[
2
]
;
/**
/**
* 尖费电费费率
* 尖费电费费率
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelChargingReqHandler.java
View file @
ef692ee
...
@@ -22,7 +22,8 @@ public class ModelChargingReqHandler implements TcpHandler<ModelChargingReq, Mod
...
@@ -22,7 +22,8 @@ public class ModelChargingReqHandler implements TcpHandler<ModelChargingReq, Mod
// 查业务系统
// 查业务系统
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
data
.
setPileId
(
req
.
getData
().
getPileId
());
data
.
setPileId
(
req
.
getData
().
getPileId
());
data
.
setModelCode
((
byte
)
0100
);
byte
[]
modelcodeByte
=
new
byte
[]{(
byte
)
0x00
,
0x00
};
data
.
setModelCode
(
modelcodeByte
);
byte
[]
byteArray
=
new
byte
[]{(
byte
)
0x9C
,
0x40
,
0x00
,
0x00
};
byte
[]
byteArray
=
new
byte
[]{(
byte
)
0x9C
,
0x40
,
0x00
,
0x00
};
data
.
setValleyDreRate
(
byteArray
);
data
.
setValleyDreRate
(
byteArray
);
data
.
setValleyEleRate
(
byteArray
);
data
.
setValleyEleRate
(
byteArray
);
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelValReqHandler.java
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
;
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
;
import
cn.com.glsx.charging.modules.entity.ChargingPile
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.Ocpp16Helper
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.Ocpp16Helper
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.ModelValRspData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.ModelValRspData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ModelValReq
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ModelValReq
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ModelValRsp
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ModelValRsp
;
import
cn.com.glsx.charging.modules.service.ChargingPileService
;
import
cn.com.glsx.charging.util.SpringContextUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
io.netty.channel.Channel
;
import
io.netty.channel.Channel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
@Slf4j
@Slf4j
@Component
public
class
ModelValReqHandler
implements
TcpHandler
<
ModelValReq
,
ModelValRsp
>
{
public
class
ModelValReqHandler
implements
TcpHandler
<
ModelValReq
,
ModelValRsp
>
{
@Override
@Override
...
@@ -21,9 +26,16 @@ public class ModelValReqHandler implements TcpHandler<ModelValReq, ModelValRsp>
...
@@ -21,9 +26,16 @@ public class ModelValReqHandler implements TcpHandler<ModelValReq, ModelValRsp>
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
data
.
setPileId
(
req
.
getData
().
getPileId
());
data
.
setPileId
(
req
.
getData
().
getPileId
());
log
.
info
(
"请求验证的计费模型编号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getModelCode
()));
log
.
info
(
"请求验证的计费模型编号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getModelCode
()));
ChargingPileService
chargingPileService
=
SpringContextUtil
.
getBean
(
ChargingPileService
.
class
);
data
.
setModelCode
(
req
.
getData
().
getModelCode
());
data
.
setModelCode
(
req
.
getData
().
getModelCode
());
data
.
setValidationRes
((
byte
)
0x00
);
ChargingPile
byPileId
=
chargingPileService
.
findByPileId
(
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
if
(
byPileId
!=
null
&&
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getModelCode
())
.
equals
(
byPileId
.
getModelCode
()))
{
data
.
setValidationRes
((
byte
)
0
);
}
else
{
data
.
setValidationRes
((
byte
)
1
);
}
log
.
info
(
"sendData{}"
,
JSONObject
.
toJSONString
(
data
));
log
.
info
(
"sendData{}"
,
JSONObject
.
toJSONString
(
data
));
rsp
.
setData
(
data
);
rsp
.
setData
(
data
);
return
rsp
;
return
rsp
;
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/service/ChargingPileService.java
0 → 100644
View file @
ef692ee
package
cn
.
com
.
glsx
.
charging
.
modules
.
service
;
import
cn.com.glsx.charging.modules.entity.ChargingPile
;
import
cn.com.glsx.charging.modules.mapper.ChargingPileMapper
;
import
javax.annotation.Resource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
public
class
ChargingPileService
{
@Autowired
private
ChargingPileMapper
chargingPileMapper
;
public
ChargingPile
findByPileId
(
String
s
)
{
return
chargingPileMapper
.
findByPileId
(
s
);
}
}
platform-charging/src/main/resources/mapper/ChargingModelMapper.xml
0 → 100644
View file @
ef692ee
<?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=
"cn.com.glsx.charging.modules.mapper.ChargingModelMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.charging.modules.entity.ChargingModel"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"model_code"
jdbcType=
"VARCHAR"
property=
"modelCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, model_code
</sql>
</mapper>
\ No newline at end of file
\ No newline at end of file
platform-charging/src/main/resources/mapper/ChargingPileMapper.xml
0 → 100644
View file @
ef692ee
<?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=
"cn.com.glsx.charging.modules.mapper.ChargingPileMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.charging.modules.entity.ChargingPile"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"pile_id"
jdbcType=
"VARCHAR"
property=
"pileId"
/>
<result
column=
"model_code"
jdbcType=
"VARCHAR"
property=
"modelCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, pile_id, model_code
</sql>
<select
id=
"findByPileId"
resultMap=
"BaseResultMap"
>
SELECT * FROM charging_pile where pile_id=#{pileId}
</select>
</mapper>
\ No newline at end of file
\ No newline at end of file
platform-charging/src/test/java/cn/com/glsx/charging/gbt/ocpp16/ModelChargingTest.java
View file @
ef692ee
...
@@ -29,7 +29,7 @@ public class ModelChargingTest {
...
@@ -29,7 +29,7 @@ public class ModelChargingTest {
ModelChargingReq
req
=
new
ModelChargingReq
();
ModelChargingReq
req
=
new
ModelChargingReq
();
ModelChargingReqData
modelChargingReqData
=
new
ModelChargingReqData
();
ModelChargingReqData
modelChargingReqData
=
new
ModelChargingReqData
();
req
.
setData
(
modelChargingReqData
);
req
.
setData
(
modelChargingReqData
);
req
.
getData
().
setPileId
(
Ocpp16Helper
.
strToBcd
(
"
55031412782305
"
,
req
.
getData
().
getPileId
()));
req
.
getData
().
setPileId
(
Ocpp16Helper
.
strToBcd
(
"
00000002100010
"
,
req
.
getData
().
getPileId
()));
client
.
sendSync
(
req
);
client
.
sendSync
(
req
);
...
...
platform-charging/src/test/java/cn/com/glsx/charging/gbt/ocpp16/ModelValTest.java
View file @
ef692ee
...
@@ -26,7 +26,7 @@ public class ModelValTest {
...
@@ -26,7 +26,7 @@ public class ModelValTest {
ModelValReq
req
=
new
ModelValReq
();
ModelValReq
req
=
new
ModelValReq
();
req
.
setData
(
new
ModelValReqData
());
req
.
setData
(
new
ModelValReqData
());
req
.
getData
().
setPileId
(
Ocpp16Helper
.
strToBcd
(
"
55031412782305
"
,
req
.
getData
().
getPileId
()));
req
.
getData
().
setPileId
(
Ocpp16Helper
.
strToBcd
(
"
00000002100010
"
,
req
.
getData
().
getPileId
()));
req
.
getData
().
setModelCode
(
Ocpp16Helper
.
strToBcd
(
"0000"
,
req
.
getData
().
getModelCode
()));
req
.
getData
().
setModelCode
(
Ocpp16Helper
.
strToBcd
(
"0000"
,
req
.
getData
().
getModelCode
()));
client
.
sendSync
(
req
);
client
.
sendSync
(
req
);
...
...
platform-charging/src/test/resources/generatorConfig.xml
View file @
ef692ee
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration PUBLIC
<?xml version="1.0" encoding="UTF-8" ?>
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 确保已安装mybatis generator eclipse插件 -->
<!-- 配置生成器 -->
<generatorConfiguration>
<generatorConfiguration>
<!--classPathEntry:数据库的JDBC驱动,换成你自己的驱动位置 可选 -->
<!-- <classPathEntry location="F://jdbc//mysql-connector-java-8.0.18.jar"/>-->
<!-- 一个数据库一个context -->
<context
id=
"DB2Tables"
targetRuntime=
"Mybatis3"
>
<!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
<property
name=
"autoDelimitKeywords"
value=
"true"
/>
<!-- 生成的Java文件的编码 -->
<property
name=
"javaFileEncoding"
value=
"utf-8"
/>
<!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
<property
name=
"beginningDelimiter"
value=
"`"
/>
<property
name=
"endingDelimiter"
value=
"`"
/>
<!-- 格式化java代码 -->
<property
name=
"javaFormatter"
value=
"org.mybatis.generator.api.dom.DefaultJavaFormatter"
/>
<!-- 格式化XML代码 -->
<property
name=
"xmlFormatter"
value=
"org.mybatis.generator.api.dom.DefaultXmlFormatter"
/>
<plugin
type=
"org.mybatis.generator.plugins.SerializablePlugin"
/>
<plugin
type=
"org.mybatis.generator.plugins.ToStringPlugin"
/>
<!-- 配置 tk.mybatis 插件 -->
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
>
<property
name=
"javaFileEncoding"
value=
"UTF-8"
/>
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
<property
name=
"caseSensitive"
value=
"true"
/>
<property
name=
"useActualColumnNames"
value=
"true"
/>
<!--<property name="beginningDelimiter" value="`"/>-->
<!--<property name="endingDelimiter" value="`"/>-->
</plugin>
</plugin>
<!--配置生成注释信息,最多配置一个 -->
<commentGenerator>
<!-- 阻止生成注释包含时间戳 默认为false -->
<property
name=
"suppressDate"
value=
"true"
/>
<!-- 注释是否添加数据库表的备注信息 默认为false -->
<property
name=
"addRemarkComments"
value=
"true"
/>
</commentGenerator>
<!-- jdbc连接-->
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.0.39:3306/seata_storage
?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
connectionURL=
"jdbc:mysql://192.168.3.227:3306/platform_charging
?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId=
"root
"
userId=
"dev_admin
"
password=
"123456
"
>
password=
"1f7e1ed2
"
>
<!--防止生成其他库同名表-->
<!--防止生成其他库同名表-->
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
</jdbcConnection>
</jdbcConnection>
<!-- 类型转换 -->
<javaTypeResolver>
<javaTypeResolver>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property
name=
"forceBigDecimals"
value=
"false"
/>
<property
name=
"forceBigDecimals"
value=
"false"
/>
</javaTypeResolver>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<!-- api绝对路径-->
<javaModelGenerator
targetPackage=
"cn.com.payu.modules.entity"
targetProject=
"src/main/java"
>
<javaModelGenerator
targetPackage=
"cn.com.glsx.charging.modules.entity"
targetProject=
"F:\360MoveData\Users\11\Desktop\企微SAAS\2023\11\cdz\platform-charging-server\platform-charging-server\platform-charging-api\src\main\java"
>
<!-- 是否让schema作为包的后缀 -->
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
<!-- 从数据库返回的值去掉前后空格 -->
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
</javaModelGenerator>
<sqlMapGenerator
targetPackage=
"mapper"
targetProject=
"src\main\resources"
>
<!-- 生成mapper.xml文件存放地址 -->
<property
name=
"enableSubPackages"
value=
"false"
/>
<sqlMapGenerator
targetPackage=
"mapper"
targetProject=
"src/main/resources"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
</sqlMapGenerator>
</sqlMapGenerator>
<!--
生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
-->
<!--
api绝对路径
-->
<javaClientGenerator
targetPackage=
"cn.com.
payu.modules.mapper"
targetProject=
"src/main/
java"
type=
"XMLMAPPER"
>
<javaClientGenerator
targetPackage=
"cn.com.
glsx.charging.modules.mapper"
targetProject=
"F:\360MoveData\Users\11\Desktop\企微SAAS\2023\11\cdz\platform-charging-server\platform-charging-server\platform-charging-api\src\main\
java"
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"
false"
/>
<property
name=
"enableSubPackages"
value=
"
true"
/>
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"platform_charging_pile"
domainObjectName=
"ChargingPile"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<table
tableName=
"t_storage"
domainObjectName=
"Storage"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<table
tableName=
"platform_charging_model"
domainObjectName=
"ChargingModel"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment