| | |
| | | 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;
|
| | |
| | | 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("userGoldCoin", extraVO.getGoldCoin());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (IntegralExchangeException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
New file |
| | |
| | | package com.yeshi.fanli.entity.bus.user;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 修改记录
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_user_modify_record")
|
| | | public class UserInfoModifyRecord implements Serializable {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | public enum ModifyTypeEnum {
|
| | | bindWeiXin("微信授权"), bindPhone("绑定手机"), bindTaoBao("淘宝授权"), setWeiXinNum("添加微信号"),
|
| | | gender("设置性别"), portrait("修改头像"), nickName("修改昵称"), bindAlipay("绑定支付宝");
|
| | | |
| | | private final String desc;
|
| | |
|
| | | private ModifyTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @Column(name = "umr_id")
|
| | | private Long id;
|
| | |
|
| | | @Column(name = "umr_uid")
|
| | | private Long uid ; |
| | | |
| | | @Column(name = "umr_type")
|
| | | private ModifyTypeEnum type;
|
| | |
|
| | | @Column(name = "umr_value")
|
| | | private String value; // 唯一值
|
| | |
|
| | | @Column(name = "umr_create_time")
|
| | | private Date createTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public ModifyTypeEnum getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(ModifyTypeEnum type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public String getValue() {
|
| | | return value;
|
| | | }
|
| | |
|
| | | public void setValue(String value) {
|
| | | this.value = value;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | | }
|
| | |
| | | closeRecommendGoods("关闭推荐商品"),couponRebate("点击领券返利"),couponRebateLevelOne("浏览购物车页"),couponRebateLevelTwo("浏览购物车页"),
|
| | | rebateOrder("完成返利订单"),inviteOrderLevelOne("一级队员邀请订单"),inviteOrderLevelTwo("二级队员邀请订单"),shareOrder("分享订单"),
|
| | | bindWeiXin("微信授权"),bindPhone("绑定手机"),bindTaoBao("淘宝授权"), setWeiXinNum("添加微信号"),setGender("首次设置性别"),
|
| | | setPortrait("首次修改头像"), setNickname("修改昵称"),bindAlipay("绑定支付宝"),inviteActivate("激活邀请");
|
| | | setPortrait("首次修改头像"), setNickName("修改昵称"),bindAlipay("绑定支付宝"),inviteActivate("激活邀请");
|
| | |
|
| | | private final String desc;
|
| | |
|
| | |
| | | String thing = "";
|
| | | String thingNum = "";
|
| | | int couponNews = 0;
|
| | | boolean once = false; // 兑换一次是否消失
|
| | | try {
|
| | | if (ExchangeTypeEnum.freeCouponBuy == type) {
|
| | | thing = "自购免单券";
|
| | | thingNum = "1张";
|
| | | userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, null);
|
| | | |
| | | once = true; |
| | | couponNews = 1;
|
| | | } else if (ExchangeTypeEnum.freeCouponGive == type) {
|
| | | thing = "赠送免单券";
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | if (once) // 兑换之后消失
|
| | | exchange = null;
|
| | | |
| | | |
| | | return exchange;
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | @Override
|
| | | public void addSetNickname(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setNickname.name(), null);
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name(), null);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|