Commit 375049a9 by Java-聂换换

汇率数据结构修改

parent ba92ea7a
...@@ -12,8 +12,12 @@ public class RateEntity extends BaseEntity implements Serializable { ...@@ -12,8 +12,12 @@ public class RateEntity extends BaseEntity implements Serializable {
private String singleLimit; // 单笔限额 private String singleLimit; // 单笔限额
private String dayLimit; // 当天额度 private String dayLimit; // 当天额度
private String img; // 图标
private String payMethodLabel;// 支付方式名称 private String payMethodLabel;// 支付方式名称
public RateEntity() { public RateEntity() {
} }
...@@ -77,4 +81,13 @@ public class RateEntity extends BaseEntity implements Serializable { ...@@ -77,4 +81,13 @@ public class RateEntity extends BaseEntity implements Serializable {
public void setPayMethodLabel(String payMethodLabel) { public void setPayMethodLabel(String payMethodLabel) {
this.payMethodLabel = payMethodLabel; this.payMethodLabel = payMethodLabel;
} }
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
} }
...@@ -10,6 +10,7 @@ import com.thinkgem.jeesite.modules.sys.entity.User; ...@@ -10,6 +10,7 @@ import com.thinkgem.jeesite.modules.sys.entity.User;
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;
import com.thinkgem.jeesite.modules.user.entity.IdentityCodeEntity; import com.thinkgem.jeesite.modules.user.entity.IdentityCodeEntity;
import com.thinkgem.jeesite.modules.user.entity.Level;
import com.thinkgem.jeesite.modules.user.entity.UserEntity; import com.thinkgem.jeesite.modules.user.entity.UserEntity;
import com.thinkgem.jeesite.modules.user.service.UserApiService; import com.thinkgem.jeesite.modules.user.service.UserApiService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -564,9 +565,14 @@ public class UserApiController { ...@@ -564,9 +565,14 @@ public class UserApiController {
return resp; return resp;
} }
try { try {
Level level = userService.getLevelByUserLevel(request);
if(level == null){
level = new Level();
}
RateEntity rateEntityParam = new RateEntity(); RateEntity rateEntityParam = new RateEntity();
rateEntityParam.setUserLevel(request.getLevel()); rateEntityParam.setUserLevel(request.getLevel());
resp.setData(userService.getRateListByLevel(rateEntityParam)); level.setRateList(userService.getRateListByLevel(rateEntityParam));
resp.setData(level);
resp.setStatus(ComCode.STATUS_CODE_2000); resp.setStatus(ComCode.STATUS_CODE_2000);
resp.setMessage(ComCode.STATUS_CODE_2000_DESC); resp.setMessage(ComCode.STATUS_CODE_2000_DESC);
}catch (Exception e){ }catch (Exception e){
......
...@@ -79,4 +79,6 @@ public interface UserApiDao { ...@@ -79,4 +79,6 @@ public interface UserApiDao {
List<BelongBankEntity> getBelongBank(UserRequest request); List<BelongBankEntity> getBelongBank(UserRequest request);
Level getLevelByUserLevel(UserRequest request);
} }
package com.thinkgem.jeesite.modules.user.entity;
import com.thinkgem.jeesite.modules.pay.entity.RateEntity;
import java.util.List;
/**
* @author niehh
* @Description: 等级
* @date 2018年03月21日 17:35
*/
public class Level {
private String rightInterest; // 权益说明
private List<RateEntity> rateList;
public String getRightInterest() {
return rightInterest;
}
public void setRightInterest(String rightInterest) {
this.rightInterest = rightInterest;
}
public List<RateEntity> getRateList() {
return rateList;
}
public void setRateList(List<RateEntity> rateList) {
this.rateList = rateList;
}
}
...@@ -368,5 +368,8 @@ public class UserApiService { ...@@ -368,5 +368,8 @@ public class UserApiService {
return userDao.getRateListByLevel(rateEntityParam); return userDao.getRateListByLevel(rateEntityParam);
} }
public Level getLevelByUserLevel(UserRequest request){
return userDao.getLevelByUserLevel(request);
}
} }
...@@ -650,6 +650,7 @@ ...@@ -650,6 +650,7 @@
yr.balance, yr.balance,
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.label AS "payMethodLabel" sd.label AS "payMethodLabel"
FROM FROM
youka_rate yr youka_rate yr
...@@ -658,4 +659,13 @@ ...@@ -658,4 +659,13 @@
yr.user_level = #{userLevel} yr.user_level = #{userLevel}
ORDER BY sd.sort DESC ORDER BY sd.sort DESC
</select> </select>
<select id="getLevelByUserLevel" resultType="com.thinkgem.jeesite.modules.user.entity.Level">
SELECT
yl.right_interest AS "rightInterest"
FROM
youka_levels yl
WHERE
yl.`level` = #{level}
</select>
</mapper> </mapper>
\ No newline at end of file
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