Commit 60850979 by wangxu

等级费率接口修改

parent 9710e88b
...@@ -20,8 +20,8 @@ public class RateEntity extends BaseEntity implements Serializable { ...@@ -20,8 +20,8 @@ public class RateEntity extends BaseEntity implements Serializable {
private String serviceType; private String serviceType;
private String rateType; private String rateType;
private String siglePrice; private String siglePrice; //单笔价格
public RateEntity() { public RateEntity() {
} }
...@@ -31,8 +31,8 @@ public class RateEntity extends BaseEntity implements Serializable { ...@@ -31,8 +31,8 @@ public class RateEntity extends BaseEntity implements Serializable {
this.payMethod = payMethod; this.payMethod = payMethod;
this.payChannel = payChannel; this.payChannel = payChannel;
} }
public String getUserLevel() { public String getUserLevel() {
return userLevel; return userLevel;
} }
......
...@@ -9,11 +9,11 @@ import com.thinkgem.jeesite.common.utils.IdGen; ...@@ -9,11 +9,11 @@ import com.thinkgem.jeesite.common.utils.IdGen;
import com.thinkgem.jeesite.common.utils.MD5; import com.thinkgem.jeesite.common.utils.MD5;
import com.thinkgem.jeesite.modules.commonError.MyException; import com.thinkgem.jeesite.modules.commonError.MyException;
import com.thinkgem.jeesite.modules.message.MessageUtils; import com.thinkgem.jeesite.modules.message.MessageUtils;
import com.thinkgem.jeesite.modules.pay.entity.RateEntity;
import com.thinkgem.jeesite.modules.pay.juhezhong.dto.MerchantDto; import com.thinkgem.jeesite.modules.pay.juhezhong.dto.MerchantDto;
import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayIntegralService; import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayIntegralService;
import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayJFenService; import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayJFenService;
import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayService; import com.thinkgem.jeesite.modules.pay.juhezhong.service.JuHeZhongPayService;
import com.thinkgem.jeesite.modules.pay.entity.RateEntity;
import com.thinkgem.jeesite.modules.pay.juhezhong.utils.MakeOrderNum; import com.thinkgem.jeesite.modules.pay.juhezhong.utils.MakeOrderNum;
import com.thinkgem.jeesite.modules.user.bean.IdentityCodeRequest; import com.thinkgem.jeesite.modules.user.bean.IdentityCodeRequest;
import com.thinkgem.jeesite.modules.user.bean.UserRequest; import com.thinkgem.jeesite.modules.user.bean.UserRequest;
...@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -666,7 +667,20 @@ public class UserApiService { ...@@ -666,7 +667,20 @@ public class UserApiService {
} }
public List<RateEntity> getRateListByLevel(RateEntity rateEntityParam){ public List<RateEntity> getRateListByLevel(RateEntity rateEntityParam){
return userDao.getRateListByLevel(rateEntityParam); List < RateEntity > rateListByLevel = userDao.getRateListByLevel ( rateEntityParam );
for ( RateEntity rateEntity : rateListByLevel ) {
String singlePrice = " + 0元";
if ( StringUtils.isNotBlank ( rateEntity.getSiglePrice ( ) ) ) {
singlePrice = " + " + rateEntity.getSiglePrice ( ) + "元";
}
if ( StringUtils.isNotBlank ( rateEntity.getRate ( ) ) ) {
DecimalFormat decimalFormat = new DecimalFormat ( "##0.00" );
rateEntity.setRate ( decimalFormat.format ( Float.parseFloat ( rateEntity.getRate ( ) ) * 100 ) + "%" + singlePrice );
} else {
rateEntity.setRate ( "0.00%" + singlePrice );
}
}
return rateListByLevel;
} }
public Level getLevelByUserLevel(UserRequest request){ public Level getLevelByUserLevel(UserRequest request){
......
...@@ -758,15 +758,17 @@ ...@@ -758,15 +758,17 @@
yr.pay_method AS payMethod, yr.pay_method AS payMethod,
yr.rate, yr.rate,
yr.balance, yr.balance,
yr.sigle_price as siglePrice,
yr.single_limit AS singleLimit, yr.single_limit AS singleLimit,
yr.day_limit AS dayLimit, yr.day_limit AS dayLimit,
sd.img AS "img", sd.img AS "img",
sd.label AS "payMethodLabel" sd.label AS "payMethodLabel"
FROM FROM
youka_rate yr sys_dict sd
LEFT JOIN sys_dict sd ON sd.`value` = yr.pay_method LEFT JOIN youka_rate yr ON sd.`value` = yr.pay_channel
WHERE WHERE
yr.user_level = #{userLevel} yr.user_level = #{userLevel}
AND sd.del_flag = '0'
ORDER BY sd.sort DESC ORDER BY sd.sort DESC
</select> </select>
<select id="getLevelByUserLevel" resultType="com.thinkgem.jeesite.modules.user.entity.Level"> <select id="getLevelByUserLevel" resultType="com.thinkgem.jeesite.modules.user.entity.Level">
......
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