Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
026f543c
提交
026f543c
authored
12月 10, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成汇率管理
上级
dbef6fb9
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
120 行增加
和
64 行删除
+120
-64
TbCfExchangeDao.java
...admin/src/main/java/com/platform/dao/TbCfExchangeDao.java
+1
-1
TbCfExchangeEntity.java
...src/main/java/com/platform/entity/TbCfExchangeEntity.java
+36
-1
TbCfExchangeServiceImpl.java
...va/com/platform/service/impl/TbCfExchangeServiceImpl.java
+5
-0
TbCfExchangeDao.xml
...n/src/main/resources/com/platform/dao/TbCfExchangeDao.xml
+60
-48
tbcfexchange.html
...-admin/src/main/webapp/WEB-INF/page/sys/tbcfexchange.html
+13
-11
tbcfexchange.js
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
+5
-3
没有找到文件。
platform-admin/src/main/java/com/platform/dao/TbCfExchangeDao.java
浏览文件 @
026f543c
...
...
@@ -6,7 +6,7 @@ import com.platform.entity.TbCfExchangeEntity;
* 汇率管理Dao
*
* @author lipengjun
* @date 2019-12-10 1
1:15:53
* @date 2019-12-10 1
2:21:26
*/
public
interface
TbCfExchangeDao
extends
BaseDao
<
TbCfExchangeEntity
>
{
...
...
platform-admin/src/main/java/com/platform/entity/TbCfExchangeEntity.java
浏览文件 @
026f543c
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
...
...
@@ -8,7 +9,7 @@ import java.util.Date;
* 表名 tb_cf_exchange
*
* @author lipengjun
* @date 2019-12-10 1
1:15:53
* @date 2019-12-10 1
5:29:22
*/
public
class
TbCfExchangeEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -17,6 +18,10 @@ public class TbCfExchangeEntity implements Serializable {
* ID
*/
private
String
id
;
/**
* 转换类型
*/
private
String
type
;
/**
* 货币
*/
...
...
@@ -25,6 +30,10 @@ public class TbCfExchangeEntity implements Serializable {
* 兑换货币
*/
private
String
exchangeCurrency
;
/**
* 汇率
*/
private
BigDecimal
exchangeRate
;
/**
* 删除标志 0:正常 1:已删除
*/
...
...
@@ -51,6 +60,19 @@ public class TbCfExchangeEntity implements Serializable {
public
String
getId
()
{
return
id
;
}
/**
* 设置:转换类型
*/
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
/**
* 获取:转换类型
*/
public
String
getType
()
{
return
type
;
}
/**
* 设置:货币
*/
...
...
@@ -77,6 +99,19 @@ public class TbCfExchangeEntity implements Serializable {
public
String
getExchangeCurrency
()
{
return
exchangeCurrency
;
}
/**
* 设置:汇率
*/
public
void
setExchangeRate
(
BigDecimal
exchangeRate
)
{
this
.
exchangeRate
=
exchangeRate
;
}
/**
* 获取:汇率
*/
public
BigDecimal
getExchangeRate
()
{
return
exchangeRate
;
}
/**
* 设置:删除标志 0:正常 1:已删除
*/
...
...
platform-admin/src/main/java/com/platform/service/impl/TbCfExchangeServiceImpl.java
浏览文件 @
026f543c
...
...
@@ -7,6 +7,7 @@ import com.platform.utils.IdUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -39,11 +40,15 @@ public class TbCfExchangeServiceImpl implements TbCfExchangeService {
@Override
public
int
save
(
TbCfExchangeEntity
tbCfExchange
)
{
tbCfExchange
.
setId
(
IdUtil
.
createIdbyUUID
());
tbCfExchange
.
setDelFlag
(
0
);
tbCfExchange
.
setCreateTime
(
new
Date
());
tbCfExchange
.
setUpdateTime
(
new
Date
());
return
tbCfExchangeDao
.
save
(
tbCfExchange
);
}
@Override
public
int
update
(
TbCfExchangeEntity
tbCfExchange
)
{
tbCfExchange
.
setUpdateTime
(
new
Date
());
return
tbCfExchangeDao
.
update
(
tbCfExchange
);
}
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfExchangeDao.xml
浏览文件 @
026f543c
...
...
@@ -5,18 +5,22 @@
<resultMap
type=
"com.platform.entity.TbCfExchangeEntity"
id=
"tbCfExchangeMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"currency"
column=
"currency"
/>
<result
property=
"exchangeCurrency"
column=
"exchange_currency"
/>
<result
property=
"exchangeRate"
column=
"exchange_rate"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
select
`id`,
`type`,
`currency`,
`exchange_currency`,
`exchange_rate`,
`del_flag`,
`create_time`,
`update_time`
...
...
@@ -24,78 +28,86 @@
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
select
`id`,
`currency`,
`exchange_currency`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_exchange
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfExchangeEntity"
>
select
`id`,
`type`,
`currency`,
`exchange_currency`,
`exchange_rate`,
`del_flag`,
`create_time`,
`update_time`
from tb_cf_exchange
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
<otherwise>
order by id desc
</otherwise>
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_exchange
WHERE 1=1
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_exchange
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
insert into tb_cf_exchange(
`id`,
`type`,
`currency`,
`exchange_currency`,
`exchange_rate`,
`del_flag`,
`create_time`,
`update_time`)
values(
#{id},
#{type},
#{currency},
#{exchangeCurrency},
#{exchangeRate},
#{delFlag},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
update tb_cf_exchange
<set>
<if
test=
"currency != null"
>
`currency` = #{currency},
</if>
<if
test=
"exchangeCurrency != null"
>
`exchange_currency` = #{exchangeCurrency},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfExchangeEntity"
>
update tb_cf_exchange
<set>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"currency != null"
>
`currency` = #{currency},
</if>
<if
test=
"exchangeCurrency != null"
>
`exchange_currency` = #{exchangeCurrency},
</if>
<if
test=
"exchangeRate != null"
>
`exchange_rate` = #{exchangeRate},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_exchange where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_exchange where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_exchange where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfexchange.html
浏览文件 @
026f543c
...
...
@@ -6,7 +6,7 @@
</head>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
...
...
@@ -27,34 +27,36 @@
#end
</div>
</Row>
<table
id=
"jqGrid"
></table>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfExchange"
:rules=
"ruleValidate"
:label-width=
"80"
>
<i-form
ref=
"formValidate"
:model=
"tbCfExchange"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"转换类型"
prop=
"type"
>
<i-input
v-model=
"tbCfExchange.type"
placeholder=
"转换类型"
/>
</Form-item>
<Form-item
label=
"货币"
prop=
"currency"
>
<i-input
v-model=
"tbCfExchange.currency"
placeholder=
"货币"
/>
</Form-item>
<Form-item
label=
"兑换货币"
prop=
"exchangeCurrency"
>
<i-input
v-model=
"tbCfExchange.exchangeCurrency"
placeholder=
"兑换货币"
/>
</Form-item>
<Form-item
label=
"
删除标志 0:正常 1:已删除"
prop=
"delFlag
"
>
<i-input
v-model=
"tbCfExchange.
delFlag"
placeholder=
"删除标志 0:正常 1:已删除
"
/>
<Form-item
label=
"
汇率"
prop=
"exchangeRate
"
>
<i-input
v-model=
"tbCfExchange.
exchangeRate"
placeholder=
"汇率
"
/>
</Form-item>
<Form-item
label=
"
创建时间"
prop=
"createTime
"
>
<i-input
v-model=
"tbCfExchange.
createTime"
placeholder=
"创建时间
"
/>
<Form-item
label=
"
状态"
prop=
"delFlag
"
>
<i-input
v-model=
"tbCfExchange.
delFlag"
placeholder=
"状态
"
/>
</Form-item>
<Form-item
label=
"更新时间"
prop=
"updateTime"
>
<i-input
v-model=
"tbCfExchange.updateTime"
placeholder=
"更新时间"
/>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
</Card>
</div>
<script
src=
"${rc.contextPath}/js/sys/tbcfexchange.js?_${date.systemTime}"
></script>
...
...
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
浏览文件 @
026f543c
...
...
@@ -3,11 +3,13 @@ $(function () {
url
:
'../tbcfexchange/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'转换类型'
,
name
:
'type'
,
index
:
'type'
,
width
:
80
},
{
label
:
'货币'
,
name
:
'currency'
,
index
:
'currency'
,
width
:
80
},
{
label
:
'兑换货币'
,
name
:
'exchangeCurrency'
,
index
:
'exchange_currency'
,
width
:
80
},
{
label
:
'删除标志 0:正常 1:已删除'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}]
{
label
:
'汇率'
,
name
:
'exchangeRate'
,
index
:
'exchange_rate'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}
]
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论