Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
Details
Activity
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
licc
data-server
Commits
3124eba0
Commit
3124eba0
authored
Mar 15, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增税率查询接口
parent
b2bf9919
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
16 deletions
+22
-16
VariableMapper.java
...per/src/main/java/cn/wisenergy/mapper/VariableMapper.java
+3
-3
ProgressPrizeMapper.xml
...-mapper/src/main/resources/mapper/ProgressPrizeMapper.xml
+1
-1
VariableMapper.xml
...nergy-mapper/src/main/resources/mapper/VariableMapper.xml
+9
-10
Variable.java
...-model/src/main/java/cn/wisenergy/model/app/Variable.java
+1
-1
ProgressPrizeVo.java
.../src/main/java/cn/wisenergy/model/vo/ProgressPrizeVo.java
+7
-0
BankServiceImpl.java
...n/java/cn/wisenergy/service/app/impl/BankServiceImpl.java
+1
-1
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/VariableMapper.java
View file @
3124eba0
...
...
@@ -37,8 +37,8 @@ public interface VariableMapper extends BaseMapper<Variable> {
/**
* 根据key,获取变量信息
* @param
k
ey 变量唯一标识
* @return
* @param
variableK
ey 变量唯一标识
* @return
变量信息
*/
Variable
getByKey
(
@Param
(
"
key"
)
String
k
ey
);
Variable
getByKey
(
@Param
(
"
variableKey"
)
String
variableK
ey
);
}
wisenergy-mapper/src/main/resources/mapper/ProgressPrizeMapper.xml
View file @
3124eba0
...
...
@@ -87,7 +87,7 @@
</select>
<select
id=
"getByTime"
resultType=
"cn.wisenergy.model.vo.ProgressPrizeVo"
>
select p.user_id as userId,p.`growth_rate` as growthRate, p.award_money as awardMoney
select p.user_id as userId,
u.head_image as headImage,
p.`growth_rate` as growthRate, p.award_money as awardMoney
from
progress_prize p ,user_info u
where
...
...
wisenergy-mapper/src/main/resources/mapper/VariableMapper.xml
View file @
3124eba0
...
...
@@ -4,7 +4,7 @@
<mapper
namespace=
"cn.wisenergy.mapper.VariableMapper"
>
<resultMap
id=
"variableMap"
type=
"cn.wisenergy.model.app.Variable"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"
key"
property=
"k
ey"
/>
<result
column=
"
variable_key"
property=
"variableK
ey"
/>
<result
column=
"variable_value"
property=
"variableValue"
/>
<result
column=
"desc"
property=
"desc"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
...
@@ -21,25 +21,25 @@
</sql>
<sql
id=
"cols_exclude_id"
>
key,password,variable_value,desc
,create_time,update_time
variable_key,variable_value,`desc`
,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{
k
ey},#{variableValue},#{desc},now(),now()
#{
variableK
ey},#{variableValue},#{desc},now(),now()
</sql>
<sql
id=
"updateCondition"
>
<if
test=
"
key != null"
>
key = #{k
ey},
</if>
<if
test=
"
variableKey != null"
>
variable_key = #{variableK
ey},
</if>
<if
test=
"variableValue != null"
>
variable_value =#{variableValue},
</if>
<if
test=
"desc != null"
>
desc
=#{desc},
</if>
<if
test=
"desc != null"
>
`desc`
=#{desc},
</if>
update_time =now()
</sql>
<sql
id=
"criteria"
>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"
key != null"
>
and key = #{k
ey}
</if>
<if
test=
"
variableKey != null"
>
and variable_key = #{variableK
ey}
</if>
<if
test=
"variableValue != null"
>
and variable_value =#{variableValue}
</if>
<if
test=
"desc != null"
>
and
desc
=#{desc}
</if>
<if
test=
"desc != null"
>
and
`desc`
=#{desc}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
...
...
@@ -70,14 +70,13 @@
<include
refid=
"table"
/>
where id = #{id}
</delete>
<select
id=
"getByKey"
resultType=
"cn.wisenergy.model.app.Variable"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
<where>
key=#{key}
</where>
where variable_key=#{variableKey}
</select>
</mapper>
wisenergy-model/src/main/java/cn/wisenergy/model/app/Variable.java
View file @
3124eba0
...
...
@@ -19,7 +19,7 @@ public class Variable {
/**
* 变量唯一标识
*/
private
String
k
ey
;
private
String
variableK
ey
;
/**
* 变量值
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/vo/ProgressPrizeVo.java
View file @
3124eba0
...
...
@@ -19,6 +19,13 @@ public class ProgressPrizeVo {
@ApiModelProperty
(
value
=
"用户id"
,
name
=
"userId"
)
private
String
userId
;
/**
* 用户头像
*/
@ApiModelProperty
(
value
=
"用户头像"
,
name
=
"headImage"
)
private
String
headImage
;
/**
* 增长率
*/
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/BankServiceImpl.java
View file @
3124eba0
...
...
@@ -208,7 +208,7 @@ public class BankServiceImpl extends ServiceImpl<BankInfoMapper, BankInfo> imple
TaxRateVo
taxRateVo
=
new
TaxRateVo
();
Double
value
=
Double
.
valueOf
(
validate
.
getVariableValue
());
Double
taxMoney
=
Math
.
floor
(
money
*
value
/
100
)
;
Double
taxMoney
=
money
*
value
/
100
;
Double
actualMoney
=
money
-
taxMoney
;
taxRateVo
.
setActualMoney
(
actualMoney
);
taxRateVo
.
setTaxMoney
(
taxMoney
);
...
...
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