yujian
2019-08-23 ac8e9b9d4e5f15369c1c1df49c63378fb1ae6f7b
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/IntegralControllerV2.java
@@ -31,6 +31,7 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail.TaoLiJinDetailTypeEnum;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
import com.yeshi.fanli.entity.bus.user.UserRank;
import com.yeshi.fanli.entity.integral.CodePublishRecord;
import com.yeshi.fanli.entity.integral.IntegralExchange;
@@ -420,11 +421,14 @@
      try {
         IntegralExchange exchange = integralExchangeService.exchange(uid, id);
         UserInfoExtra extraVO = userInfoExtraService.getUserInfoExtra(uid);
         GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
         Gson gson = gsonBuilder.create();
         JSONObject data = new JSONObject();
         data.put("result", gson.toJson(exchange));
         data.put("goldCoin", extraVO.getGoldCoin() + "枚");
         out.print(JsonUtil.loadTrueResult(data));
      } catch (IntegralExchangeException e) {
         out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
@@ -466,8 +470,11 @@
   @RequestMapping(value = "exchangeInviteCode", method = RequestMethod.POST)
   public void exchangeInviteCode(AcceptData acceptData, Long uid, Long id, PrintWriter out) {
      try {
         integralExchangeService.exchangeInviteCode(uid, id);
         out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
         String inviteCode = integralExchangeService.exchangeInviteCode(uid, id);
         JSONObject data = new JSONObject();
         data.put("msg", "兑换成功,金币已消耗 ");
         data.put("inviteCode", inviteCode);
         out.print(JsonUtil.loadTrueResult(data));
      } catch (IntegralExchangeException e) {
         out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
      }