Commit 3124eba0 authored by licc's avatar licc

新增税率查询接口

parent b2bf9919
......@@ -37,8 +37,8 @@ public interface VariableMapper extends BaseMapper<Variable> {
/**
* 根据key,获取变量信息
* @param key 变量唯一标识
* @return
* @param variableKey 变量唯一标识
* @return 变量信息
*/
Variable getByKey(@Param("key") String key);
Variable getByKey(@Param("variableKey") String variableKey);
}
......@@ -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
......
......@@ -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="key"/>
<result column="variable_key" property="variableKey"/>
<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">
#{key},#{variableValue},#{desc},now(),now()
#{variableKey},#{variableValue},#{desc},now(),now()
</sql>
<sql id="updateCondition">
<if test="key != null">key = #{key},</if>
<if test="variableKey != null">variable_key = #{variableKey},</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 = #{key}</if>
<if test="variableKey != null">and variable_key = #{variableKey}</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 &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= 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>
......@@ -19,7 +19,7 @@ public class Variable {
/**
* 变量唯一标识
*/
private String key;
private String variableKey;
/**
* 变量值
......
......@@ -19,6 +19,13 @@ public class ProgressPrizeVo {
@ApiModelProperty(value = "用户id", name = "userId")
private String userId;
/**
* 用户头像
*/
@ApiModelProperty(value = "用户头像", name = "headImage")
private String headImage;
/**
* 增长率
*/
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment