Merge remote-tracking branch 'origin/div' into div
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionAuthRecord;
|
| | | import com.yeshi.fanli.exception.taobao.TaoBaoAuthException;
|
| | | import com.yeshi.fanli.exception.user.UserExtraTaoBaoInfoException;
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionAuthRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserAccountMsgNotificationService userAccountMsgNotificationService;
|
| | | |
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
| | | LogHelper.test(e.getMsg());
|
| | | errCode = 5;
|
| | | }
|
| | | |
| | | final String relationId2 = relationId;
|
| | | // 异步申请会员ID
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | |
| | | LogHelper.test(uid + "会员备案失败");
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addSpecialId(uid, specialId, taoBaoUid, name, true);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(specialId) && !StringUtil.isNullOrEmpty(relationId2))
|
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | |
| | | errCode = 5;
|
| | | }
|
| | |
|
| | | final String specialId2 = specialId;
|
| | | // 异步申请渠道ID
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | |
| | | LogHelper.test(uid + "渠道备案失败");
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addRelationId(uid, relationId, taoBaoUid, name, true);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(specialId2) && !StringUtil.isNullOrEmpty(relationId))
|
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | |
| | | try {
|
| | | userExtraTaoBaoInfoService.saveUserTaoBaoInfo(uid, relationId, specialId, taoBaoUid, nickName,
|
| | | true);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(specialId) && !StringUtil.isNullOrEmpty(relationId))
|
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | errCode = 6;
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | |
| | | data.put("link", link);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | // 1.6.5 自购立减添加 金币
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | integralGetService.addTaoLiJinBuy(uid, auctionId);
|
| | | |
| | | integralGetService.addTaoLiJinBuy(uid, auctionId);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | // 获得金币
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | integralGetService.addCouponRebate(uid);
|
| | | integralGetService.addCouponRebate(uid);
|
| | |
|
| | | } catch (Exception e) {
|
| | |
|
| | |
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | |
|
| | | // 获得金币
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | integralGetService.addCloseRecommendGoods(uid);
|
| | | integralGetService.addCloseRecommendGoods(uid);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.LoginResult;
|
| | | import com.yeshi.fanli.entity.bus.user.SMSHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserTaoLiJinOriginService userTaoLiJinOriginService;
|
| | | |
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | |
| | | else
|
| | | out.print(JsonUtil.loadTrue(0, JsonUtil.getGson().toJson(bindingAccount),
|
| | | "系统已成功转账0.1元到提现账号中,提现账号验证通过,恭喜你!可以提现了。注:此0.1元将会在后续产生的余额中合理扣除,敬请知晓。"));
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindAlipay, account);
|
| | | } catch (AlipayTransferException e1) {
|
| | | if (e1.getSubCode().equalsIgnoreCase("PAYEE_NOT_EXIST")) {
|
| | | String msg = "系统未能成功转账0.1元,提现账号信息有误,请核对后重新填写。";
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | |
| | | @Resource
|
| | | private UserTaoLiJinDetailService userTaoLiJinDetailService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | |
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | |
| | | userInfoService.uploadPortrait(file, uid);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | |
|
| | | |
| | | } catch (UserInfoException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | try {
|
| | |
| | | return;
|
| | | }
|
| | | userInfoService.saveUserInfo(nickName, uid);
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.nickName, nickName);
|
| | | }
|
| | |
|
| | | // 修改微信号
|
| | |
| | | extra.setId(userInfoExtra.getId());
|
| | | extra.setWeiXin(weiXin);
|
| | | userInfoExtraService.saveUserInfoExtra(extra);
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.setWeiXinNum, weiXin);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | extra.setId(userInfoExtra.getId());
|
| | | extra.setSex(sex);
|
| | | userInfoExtraService.saveUserInfoExtra(extra);
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.gender, sex + "");
|
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | |
| | | 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.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.integral.CodePublishRecord;
|
| | | import com.yeshi.fanli.entity.integral.IntegralExchange;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTask;
|
| | |
| | | import com.yeshi.fanli.exception.integral.IntegralGetException;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.integral.CodePublishRecordService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralDetailService;
|
| | |
| | | @Resource
|
| | | private IntegralGetService integralGetService;
|
| | |
|
| | | @Resource
|
| | | private JumpDetailV2Service jumpDetailV2Service;
|
| | | |
| | | |
| | | /**
|
| | | * 获取任务列表
|
| | | *
|
| | |
| | | }
|
| | |
|
| | | for (IntegralTaskClassVO taskClassVO : list) {
|
| | | UniqueKeyEnum uniqueKey = taskClassVO.getUniqueKey(); |
| | | |
| | | UserInfoExtraVO extraVO = userInfoExtraService.getInfoExtraVOByUid(uid);
|
| | | if (extraVO == null || StringUtil.isNullOrEmpty(extraVO.getInviteCode())) {
|
| | | JumpDetailV2 jumpDetailV2 = jumpDetailV2Service.getByTypeCache("invite_activate",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()));
|
| | | |
| | | taskClassVO.setJumpDetail(jumpDetailV2);
|
| | | }
|
| | | |
| | | |
| | | String progress = taskClassVO.getProgress();
|
| | | if (StringUtil.isNullOrEmpty(progress))
|
| | | continue;
|
| | |
| | | if (taskNum == null)
|
| | | continue;
|
| | |
|
| | | UniqueKeyEnum uniqueKey = taskClassVO.getUniqueKey();
|
| | | if (uniqueKey == UniqueKeyEnum.dailySign) {
|
| | | if (signState == 0) {
|
| | | taskClassVO.setLightUp(true); // 签到失败
|
| | |
| | | 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()));
|
| | |
| | | @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()));
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.user; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord; |
| | | |
| | | public interface UserInfoModifyRecordMapper extends BaseMapper<UserInfoModifyRecord> { |
| | | |
| | | /** |
| | | * 统计修改次数 |
| | | * @param uid |
| | | * @param type 可为空则查询所有类型 |
| | | * @return |
| | | */ |
| | | long countByUid(@Param("uid") Long uid, @Param("type") String type); |
| | | |
| | | } |
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;
|
| | | }
|
| | | }
|
| | |
| | | public final static String SOURCE_NEWBIES = "新人抽奖";
|
| | | public final static String SOURCE_YAOQING = "邀请奖励";
|
| | | public final static String SOURCE_SYSTEM_PUSH = "系统赠送";
|
| | | public final static String SOURCE_DAILY_REBATE = "奖励券天天抽";
|
| | | public final static String SOURCE_DAILY_REBATE = "天天抽";
|
| | | public final static String SOURCE_EXCHANGE = "金币兑换";
|
| | | public final static String SOURCE_GIVE = "好友赠送";
|
| | |
|
| | |
| | | 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;
|
| | |
|
| | |
| | | @Column(name = "sc_amount")
|
| | | private String amount;
|
| | |
|
| | | // 有效期天-剩余激活时间
|
| | | @Column(name = "sc_activate_day")
|
| | | private Integer activateDay;
|
| | |
|
| | | // 有效期天数
|
| | | @Column(name = "sc_expiry_day")
|
| | | private Integer expiryDay;
|
| | |
|
| | | |
| | | // 规则
|
| | | @Column(name = "sc_rule")
|
| | | private String rule;
|
| | |
| | | public void setRuleLink(String ruleLink) {
|
| | | this.ruleLink = ruleLink;
|
| | | }
|
| | | |
| | |
|
| | | public Integer getActivateDay() {
|
| | | return activateDay;
|
| | | }
|
| | |
|
| | | public void setActivateDay(Integer activateDay) {
|
| | | this.activateDay = activateDay;
|
| | | }
|
| | | }
|
| | |
| | | <result column="sc_percent" property="percent" jdbcType="DECIMAL"/>
|
| | | <result column="sc_amount" property="amount" jdbcType="VARCHAR"/>
|
| | | <result column="sc_expiry_day" property="expiryDay" jdbcType="INTEGER"/>
|
| | | <result column="sc_activate_day" property="activateDay" jdbcType="INTEGER"/>
|
| | | <result column="sc_rule" property="rule" jdbcType="VARCHAR"/>
|
| | | <result column="sc_remark" property="remark" jdbcType="VARCHAR"/>
|
| | | <result column="sc_rule_link" property="ruleLink" jdbcType="VARCHAR"/>
|
| | |
| | | <result column="sc_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
| | | <result column="sc_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
| | | </resultMap>
|
| | | <sql id="Base_Column_List">sc_id,sc_name,sc_picture,sc_picture_invalid,sc_effect,sc_type,sc_percent,sc_amount,sc_expiry_day,sc_rule,sc_remark,sc_rule_link,sc_state,sc_create_time,sc_update_time</sql>
|
| | | <sql id="Base_Column_List">sc_id,sc_name,sc_picture,sc_picture_invalid,sc_effect,sc_type,sc_percent,sc_amount,sc_expiry_day,sc_activate_day,sc_rule,sc_remark,sc_rule_link,sc_state,sc_create_time,sc_update_time</sql>
|
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
| | | <include refid="Base_Column_List"/>from yeshi_ec_system_coupon where sc_id = #{id,jdbcType=BIGINT}
|
| | | </select>
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_system_coupon where sc_id = #{id,jdbcType=BIGINT}</delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_coupon (sc_id,sc_name,sc_picture,sc_picture_invalid,sc_effect,sc_type,sc_percent,sc_amount,sc_expiry_day,sc_rule,sc_remark,sc_rule_link,sc_state,sc_create_time,sc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{pictureInvalid,jdbcType=VARCHAR},#{effect,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{percent,jdbcType=DECIMAL},#{amount,jdbcType=VARCHAR},#{expiryDay,jdbcType=INTEGER},#{rule,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{ruleLink,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_coupon (sc_id,sc_name,sc_picture,sc_picture_invalid,sc_effect,sc_type,sc_percent,sc_amount,sc_expiry_day,sc_activate_day,sc_rule,sc_remark,sc_rule_link,sc_state,sc_create_time,sc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{pictureInvalid,jdbcType=VARCHAR},#{effect,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{percent,jdbcType=DECIMAL},#{amount,jdbcType=VARCHAR},#{expiryDay,jdbcType=INTEGER},#{activateDay,jdbcType=INTEGER},#{rule,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{ruleLink,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.system.SystemCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_coupon
|
| | | <trim prefix="(" suffix=")" suffixOverrides=",">
|
| | | <if test="id != null">sc_id,</if>
|
| | |
| | | <if test="percent != null">sc_percent,</if>
|
| | | <if test="amount != null">sc_amount,</if>
|
| | | <if test="expiryDay != null">sc_expiry_day,</if>
|
| | | <if test="activateDay != null">sc_activate_day,</if>
|
| | | <if test="rule != null">sc_rule,</if>
|
| | | <if test="remark != null">sc_remark,</if>
|
| | | <if test="ruleLink != null">sc_rule_link,</if>
|
| | |
| | | <if test="percent != null">#{percent,jdbcType=DECIMAL},</if>
|
| | | <if test="amount != null">#{amount,jdbcType=VARCHAR},</if>
|
| | | <if test="expiryDay != null">#{expiryDay,jdbcType=INTEGER},</if>
|
| | | <if test="activateDay != null">#{activateDay,jdbcType=INTEGER},</if>
|
| | | <if test="rule != null">#{rule,jdbcType=VARCHAR},</if>
|
| | | <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
|
| | | <if test="ruleLink != null">#{ruleLink,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
| | | </trim>
|
| | | </insert>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.system.SystemCoupon">update yeshi_ec_system_coupon set sc_name = #{name,jdbcType=VARCHAR},sc_picture = #{picture,jdbcType=VARCHAR},sc_picture_invalid = #{pictureInvalid,jdbcType=VARCHAR},sc_effect = #{effect,jdbcType=VARCHAR},sc_type = #{type,jdbcType=VARCHAR},sc_percent = #{percent,jdbcType=DECIMAL},sc_amount = #{amount,jdbcType=VARCHAR},sc_expiry_day = #{expiryDay,jdbcType=INTEGER},sc_rule = #{rule,jdbcType=VARCHAR},sc_remark = #{remark,jdbcType=VARCHAR},sc_rule_link = #{ruleLink,jdbcType=VARCHAR},sc_state = #{state,jdbcType=INTEGER},sc_create_time = #{createTime,jdbcType=TIMESTAMP},sc_update_time = #{updateTime,jdbcType=TIMESTAMP} where sc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.system.SystemCoupon">update yeshi_ec_system_coupon set sc_name = #{name,jdbcType=VARCHAR},sc_picture = #{picture,jdbcType=VARCHAR},sc_picture_invalid = #{pictureInvalid,jdbcType=VARCHAR},sc_effect = #{effect,jdbcType=VARCHAR},sc_type = #{type,jdbcType=VARCHAR},sc_percent = #{percent,jdbcType=DECIMAL},sc_amount = #{amount,jdbcType=VARCHAR},sc_expiry_day = #{expiryDay,jdbcType=INTEGER},sc_activate_day = #{activateDay,jdbcType=INTEGER},sc_rule = #{rule,jdbcType=VARCHAR},sc_remark = #{remark,jdbcType=VARCHAR},sc_rule_link = #{ruleLink,jdbcType=VARCHAR},sc_state = #{state,jdbcType=INTEGER},sc_create_time = #{createTime,jdbcType=TIMESTAMP},sc_update_time = #{updateTime,jdbcType=TIMESTAMP} where sc_id = #{id,jdbcType=BIGINT}</update>
|
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.system.SystemCoupon">update yeshi_ec_system_coupon
|
| | | <set>
|
| | | <if test="name != null">sc_name=#{name,jdbcType=VARCHAR},</if>
|
| | |
| | | <if test="percent != null">sc_percent=#{percent,jdbcType=DECIMAL},</if>
|
| | | <if test="amount != null">sc_amount=#{amount,jdbcType=VARCHAR},</if>
|
| | | <if test="expiryDay != null">sc_expiry_day=#{expiryDay,jdbcType=INTEGER},</if>
|
| | | <if test="activateDay != null">sc_activate_day=#{activateDay,jdbcType=INTEGER},</if>
|
| | | <if test="rule != null">sc_rule=#{rule,jdbcType=VARCHAR},</if>
|
| | | <if test="remark != null">sc_remark=#{remark,jdbcType=VARCHAR},</if>
|
| | | <if test="ruleLink != null">sc_rule_link=#{ruleLink,jdbcType=VARCHAR},</if>
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserInfoModifyRecordMapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord"> |
| | | <id column="umr_id" property="id" jdbcType="BIGINT"/> |
| | | <result column="umr_uid" property="uid" jdbcType="BIGINT"/> |
| | | <result column="umr_type" property="type" jdbcType="VARCHAR"/> |
| | | <result column="umr_value" property="value" jdbcType="VARCHAR"/> |
| | | <result column="umr_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">umr_id,umr_uid,umr_type,umr_value,umr_create_time</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_user_modify_record where umr_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_modify_record where umr_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_modify_record (umr_id,umr_uid,umr_type,umr_value,umr_create_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_modify_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">umr_id,</if> |
| | | <if test="uid != null">umr_uid,</if> |
| | | <if test="type != null">umr_type,</if> |
| | | <if test="value != null">umr_value,</if> |
| | | <if test="createTime != null">umr_create_time,</if> |
| | | </trim>values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="type != null">#{type,jdbcType=VARCHAR},</if> |
| | | <if test="value != null">#{value,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord">update yeshi_ec_user_modify_record set umr_uid = #{uid,jdbcType=BIGINT},umr_type = #{type,jdbcType=VARCHAR},umr_value = #{value,jdbcType=VARCHAR},umr_create_time = #{createTime,jdbcType=TIMESTAMP} where umr_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord">update yeshi_ec_user_modify_record |
| | | <set> |
| | | <if test="uid != null">umr_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="type != null">umr_type=#{type,jdbcType=VARCHAR},</if> |
| | | <if test="value != null">umr_value=#{value,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">umr_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | </set> where umr_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <select id="countByUid" resultMap="BaseResultMap"> |
| | | SELECT IFNULL(COUNT(d.`umr_id`),0) FROM yeshi_ec_user_modify_record d |
| | | WHERE d.`umr_uid` = #{uid} |
| | | <if test="">AND d.`umr_type`= #{type}</if> |
| | | </select> |
| | | </mapper> |
| | |
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | if (activeLog != null && !StringUtil.isNullOrEmpty(activeLog.getVersionCode()) ) {
|
| | | String versionCode = activeLog.getVersionCode();
|
| | | String channel = activeLog.getChannel();
|
| | | |
| | | boolean result = false;
|
| | | if (!StringUtil.isNullOrEmpty(channel) && "appstore".equalsIgnoreCase(channel)) {
|
| | | result = VersionUtil.greaterThan_1_6_5("ios", versionCode);
|
| | | } else {
|
| | | result = VersionUtil.greaterThan_1_6_5("android", versionCode);
|
| | | }
|
| | | |
| | | if (result) {
|
| | | // 邀请金币
|
| | | integralGetService.addInviteLevelOne(inviter.getId(), invitee.getId());
|
| | | }
|
| | | }
|
| | | // 邀请金币
|
| | | integralGetService.addInviteLevelOne(inviter.getId(), invitee.getId());
|
| | | }
|
| | | });
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // 邀请码激活卡,兑换项,如果当前用户已经激活了邀请功能,则不需要显示该兑换项。
|
| | | if (type == ExchangeTypeEnum.inviteCodeActivate && hasCode) {
|
| | | listValid.remove(i);
|
| | | i --;
|
| | | continue;
|
| | | if (type == ExchangeTypeEnum.inviteCodeActivate) {
|
| | | if (hasCode) {
|
| | | listValid.remove(i);
|
| | | i --;
|
| | | continue;
|
| | | } |
| | | |
| | | // 兑换一次之后隐藏
|
| | | long num = integralExchangeRecordMapper.countRecordByUid(id, uid, null);
|
| | | if (num >= 1) {
|
| | | listValid.remove(i);
|
| | | i --;
|
| | | continue;
|
| | | }
|
| | | }
|
| | |
|
| | | // 邀请码发布卡,兑换项,如果当前用户未激活邀请功能,则不需要显示该兑换项。
|
| | |
| | | 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(codePublishRecordService.countValidRecord(uid) > 0)
|
| | | throw new IntegralExchangeException(1, "三天之内不可重复兑换");
|
| | | codePublishRecordService.publishInviteCode(uid);
|
| | | |
| | | exchange.setNeedJump(true);
|
| | | exchange.setBtnName("去查看");
|
| | | } else if (ExchangeTypeEnum.taoLiJin == type) {
|
| | | thing = "推广红包";
|
| | | thingNum = exchange.getAmount() + "元";
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | if (once) // 兑换之后消失
|
| | | exchange = null;
|
| | | |
| | | return exchange;
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void exchangeInviteCode(Long uid, Long id) throws IntegralExchangeException {
|
| | | public String exchangeInviteCode(Long uid, Long id) throws IntegralExchangeException {
|
| | | if (uid == null || uid <= 0)
|
| | | throw new IntegralExchangeException(1, "用户未登录");
|
| | |
|
| | |
| | | throw new IntegralExchangeException(1, "兑换失败,该用户邀请码不存在");
|
| | |
|
| | | String inviteCode = inviteExtra.getInviteCode();
|
| | | userInfoExtraService.activateInviteCode(uid, inviteExtra.getInviteCode());
|
| | |
|
| | | // 剩余金币
|
| | | int surplus = goldCoinHas.intValue() - goldCoin.intValue();
|
| | |
| | | userOtherMsgNotificationService.exchangeMsg(uid, beizu, msgOther);
|
| | | }
|
| | | });
|
| | | |
| | | return inviteCode;
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | throw new IntegralExchangeException(1, "兑换失败");
|
| | | }
|
| | | |
| | | |
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskRecordService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskService;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addInShopLevelOne(Long uid) {
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addInShopLevelTwo(Long uid) {
|
| | | try {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addTaoLiJinBuy(Long uid, Long goodsId) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteLevelOne(Long uid, Long workerId) {
|
| | |
| | | * 间接邀请
|
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addInviteLevelTwo(Long uid) {
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareSingleGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareMultipleGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareTLJGoods(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveRebateCoupon(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveFreeCoupon(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveTaoLiJin(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addCloseRecommendGoods(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addCouponRebate(Long uid) {
|
| | |
| | | * 一级队员领券返利
|
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addCouponRebateLevelOne(Long uid) {
|
| | | try {
|
| | |
| | | * 二级队员领券返利
|
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addCouponRebateLevelTwo(Long uid) {
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addRebateOrder(Long uid) {
|
| | |
| | | * 一级队员邀请订单
|
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addInviteOrderLevelOne(Long uid) {
|
| | | try {
|
| | |
| | | * 二级队员邀请订单
|
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | private void addInviteOrderLevelTwo(Long uid) {
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareOrder(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindWeiXin(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindPhone(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindTaoBao(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetWeiXinNum(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetGender(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetPortrait(Long uid) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @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);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindAlipay(Long uid) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @IntegralGetVersionLimit(uid="#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteActivate(Long uid) {
|
| | |
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "返利已到账后再奖励返利的" + percent + "%"));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "使用本券已到账的返利再返" + percent + "%"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | getLeftDay(coupon), coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "返利已到账后再奖励返利的" + percent + "%"));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "使用本券已到账的返利再返" + percent + "%"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserConnectHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.exception.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FileUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private JedisPool jedisPool;
|
| | |
|
| | | |
| | | |
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | | |
| | | @Transactional
|
| | | @Override
|
| | | public LoginResult login(HttpServletRequest request, Boolean first, String appId, String code, String phone,
|
| | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(user.getPhone())) |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindPhone, user.getPhone());
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(user.getWxUnionId())) |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindWeiXin, user.getWxUnionId());
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | update.setPhone(phone);
|
| | | userInfoMapper.updateByPrimaryKeySelective(update);
|
| | | userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_PHONE);
|
| | | |
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindPhone, phone);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | userInfoMapper.updateByPrimaryKeySelective(updateUserInfo);
|
| | |
|
| | | userAccountMsgNotificationService.changeBindingSuccess(uid, MsgAccountDetailFactory.TYPE_WX);
|
| | | |
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindWeiXin, weiXinUser.getUnionid());
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(userInfo.getId(), ModifyTypeEnum.bindPhone, phone);
|
| | | }
|
| | |
|
| | | return userInfo;
|
| | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(userInfo.getId(), ModifyTypeEnum.bindWeiXin, weiXinUser.getUnionid());
|
| | | }
|
| | | return userInfo;
|
| | | }
|
| | |
| | |
|
| | | // 发送消息
|
| | | userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_PHONE);
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindPhone, phone);
|
| | | |
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | userAccountBindingHistoryService.addUserAccountBindingHistory(history);
|
| | |
|
| | | userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_WX);
|
| | | |
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindWeiXin, wxUnionId);
|
| | | }
|
| | |
|
| | | @Override
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.user;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.UserInfoModifyRecordMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralGetService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class UserInfoModifyRecordServiceImpl implements UserInfoModifyRecordService {
|
| | |
|
| | | @Resource
|
| | | private UserInfoModifyRecordMapper userInfoModifyRecordMapper;
|
| | | |
| | | @Resource
|
| | | private IntegralGetService integralGetService;
|
| | |
|
| | | @Async()
|
| | | @Override
|
| | | public void addModifyRecord(Long uid, ModifyTypeEnum type, String value) {
|
| | | try {
|
| | | if (uid == null || StringUtil.isNullOrEmpty(value))
|
| | | return;
|
| | | |
| | | long count = countByUid(uid, type.name());
|
| | | if (count == 0) {
|
| | | if (type == ModifyTypeEnum.bindPhone) {
|
| | | integralGetService.addBindPhone(uid);
|
| | | } else if (type == ModifyTypeEnum.bindAlipay) {
|
| | | integralGetService.addBindAlipay(uid);
|
| | | } else if (type == ModifyTypeEnum.bindTaoBao) {
|
| | | integralGetService.addBindTaoBao(uid);
|
| | | } else if (type == ModifyTypeEnum.bindWeiXin) {
|
| | | integralGetService.addBindWeiXin(uid);
|
| | | } else if (type == ModifyTypeEnum.gender) {
|
| | | integralGetService.addSetGender(uid);
|
| | | } else if (type == ModifyTypeEnum.nickName) {
|
| | | integralGetService.addSetNickname(uid);
|
| | | } else if (type == ModifyTypeEnum.portrait) {
|
| | | integralGetService.addSetPortrait(uid);
|
| | | } else if (type == ModifyTypeEnum.setWeiXinNum) {
|
| | | integralGetService.addSetWeiXinNum(uid);
|
| | | }
|
| | | }
|
| | | |
| | | UserInfoModifyRecord record = new UserInfoModifyRecord();
|
| | | record.setUid(uid);
|
| | | record.setType(type);
|
| | | record.setValue(value);
|
| | | record.setCreateTime(new Date());
|
| | | userInfoModifyRecordMapper.insertSelective(record);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countByUid(Long uid, String type) {
|
| | | return userInfoModifyRecordMapper.countByUid(uid, type);
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.InviteUser;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.exception.ThreeSaleException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | |
|
| | | @Resource
|
| | | private BindingAccountService bindingAccountService;
|
| | | |
| | | @Resource
|
| | | private UserInfoModifyRecordService userInfoModifyRecordService;
|
| | | |
| | |
|
| | | public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) {
|
| | | List<UserInfo> list = null;
|
| | |
| | | if (!StringUtil.isNullOrEmpty(portrait) && portrait.contains("/img/user/")) {
|
| | | COSManager.getInstance().deleteFile(portrait);
|
| | | }
|
| | |
|
| | | |
| | | userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.portrait, fileLink);
|
| | | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | |
| | | import com.yeshi.fanli.util.ImageUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
| | | // 清理缓存
|
| | | redisManager.removeCommonString(shareKey);
|
| | |
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (singleGoods) {
|
| | | if (taolijin) {
|
| | | integralGetService.addShareTLJGoods(uid);
|
| | | } else {
|
| | | integralGetService.addShareSingleGoods(uid);
|
| | | }
|
| | | if (singleGoods) {
|
| | | if (taolijin) {
|
| | | integralGetService.addShareTLJGoods(uid);
|
| | | } else {
|
| | | integralGetService.addShareMultipleGoods(uid);
|
| | | integralGetService.addShareSingleGoods(uid);
|
| | | }
|
| | | } else {
|
| | | integralGetService.addShareMultipleGoods(uid);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | coupon = systemCouponService.getCouponByType(couponType);
|
| | | } else if (couponType.equals(CouponTypeEnum.rebatePercentCoupon.name())) {
|
| | | // 随机奖励券
|
| | | if (percent == null || percent.compareTo(new BigDecimal(0)) > 0) {
|
| | | if (percent == null || percent.compareTo(new BigDecimal(0)) < 1) {
|
| | | randomRewardCoupon(1, uid, source);
|
| | | return;
|
| | | } else {
|
| | |
| | | stateActivated = 0;
|
| | | }
|
| | |
|
| | | Integer expiryDay = null;
|
| | | if (stateActivated == 0) |
| | | expiryDay = coupon.getActivateDay();
|
| | | |
| | | if (expiryDay == null || expiryDay == 0) |
| | | expiryDay = coupon.getExpiryDay();
|
| | | |
| | | // 结束日期
|
| | | // 今天在内 减去一天
|
| | | String endDay = DateUtil.plusDay(coupon.getExpiryDay() - 1, new Date());
|
| | | String endDay = DateUtil.plusDay(expiryDay - 1, new Date());
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
| | | Date endTime = format.parse(endDay);
|
| | |
|
| | |
| | | } else if (couponType == CouponTypeEnum.welfareFreeCoupon.name() && threeSaleSerivce.countSuccessFirstTeam(uid) <= 0) {
|
| | | stateActivated = 0; // 无下级队员 --待激活
|
| | | }
|
| | |
|
| | | |
| | | |
| | | Integer expiryDay = null;
|
| | | if (stateActivated == 0) |
| | | expiryDay = coupon.getActivateDay();
|
| | | |
| | | if (expiryDay == null || expiryDay == 0) |
| | | expiryDay = coupon.getExpiryDay();
|
| | | |
| | | |
| | | // 计算结束日期:今天在内 减去一天
|
| | | String endDay = DateUtil.plusDay(coupon.getExpiryDay() - 1, new Date());
|
| | | String endDay = DateUtil.plusDay(expiryDay - 1, new Date());
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
| | | Date endTime = format.parse(endDay);
|
| | |
|
| | |
| | | continue; // 券信息不完整
|
| | | }
|
| | |
|
| | | userCouponVO.setSource("来源:" + userCouponVO.getSource());
|
| | | String source = userCouponVO.getSource();
|
| | | if (source != null && "奖励券天天抽".equals(source)) {
|
| | | source = "天天抽";
|
| | | }
|
| | | |
| | | userCouponVO.setSource("来源:" + source);
|
| | | userCouponVO.setCouponName(systemCoupon.getName());
|
| | | userCouponVO.setCouponEffect(systemCoupon.getEffect());
|
| | | userCouponVO.setCouponRule(systemCoupon.getRule());
|
| | |
| | | give = false;
|
| | | }
|
| | |
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
|
| | | |
| | | if (UserSystemCoupon.STATE_CAN_USE == state) {
|
| | | Map<String, Object> jumpLink = new HashMap<String, Object>();
|
| | | if (CouponTypeEnum.freeCouponGive == type) {
|
| | |
| | | userCouponVO.setCouponEffect("赠送中");
|
| | | userCouponVO.setCouponRule(systemCoupon.getRemark());
|
| | | String tips = null;
|
| | | |
| | | TokenTypeEnum tokenType = null;
|
| | | if (CouponTypeEnum.freeCouponGive == type) {
|
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_IN);
|
| | | tips = configService.get("give_free_coupon_tips");
|
| | | tokenType = TokenTypeEnum.freeCoupon;
|
| | | }
|
| | |
|
| | | if (CouponTypeEnum.rebatePercentCoupon == type) {
|
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_IN);
|
| | | tips = configService.get("give_free_coupon_tips");
|
| | | tokenType = TokenTypeEnum.rebatePercentCoupon;
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(tips)) {
|
| | | if (!StringUtil.isNullOrEmpty(tips) && tokenType != null) {
|
| | | UserSystemCouponGiveRecord record = userSystemCouponGiveRecordService.getRecordByUidAndCouponId(uid, userCouponVO.getId());
|
| | | if (record != null) {
|
| | | TokenRecord tokenRecord = tokenRecordService.getNearByTypeAndIdentify(CouponTypeEnum.freeCoupon.name(), record.getId().toString());
|
| | | TokenRecord tokenRecord = tokenRecordService.getNearByTypeAndIdentify(tokenType.name(), record.getId().toString());
|
| | | if (tokenRecord != null && !StringUtil.isNullOrEmpty(tokenRecord.getToken())) {
|
| | | String projectChineseName = Constant.systemCommonConfig.getProjectChineseName();
|
| | | while(tips.contains("{APP名称}")) {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | } else if (give && UserSystemCoupon.STATE_END_USE == state) {
|
| | | userCouponVO.setCouponRule(systemCoupon.getRemark());
|
| | | if (CouponTypeEnum.freeCouponGive == type) {
|
| | |
| | | if (CouponTypeEnum.rebatePercentCoupon == type) {
|
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_END);
|
| | | }
|
| | | }else if (give && UserSystemCoupon.STATE_OVERDUE == state) {
|
| | | userCouponVO.setCouponRule(systemCoupon.getRemark());
|
| | | |
| | | Date useTime = userCouponVO.getUseTime();
|
| | | if (useTime != null) {
|
| | | Map<String, Object> remainDays = new HashMap<String, Object>();
|
| | | remainDays.put("content", "于" + sdf.format(useTime) + "成功赠送");
|
| | | remainDays.put("fontColor", "#999999");
|
| | | userCouponVO.setRemainDays(remainDays);
|
| | | }
|
| | | }else if (UserSystemCoupon.STATE_OVERDUE == state) {
|
| | | if (endTime != null) {
|
| | | Map<String, Object> remainDays = new HashMap<String, Object>();
|
| | | remainDays.put("content", "于" + sdf.format(endTime) + "过期");
|
| | | remainDays.put("fontColor", "#999999");
|
| | | userCouponVO.setRemainDays(remainDays);
|
| | | }
|
| | | |
| | | if(give)
|
| | | userCouponVO.setCouponRule(systemCoupon.getRemark());
|
| | | }
|
| | | userCouponVO.setJumpBtn(jumpBtn);
|
| | | }
|
| | |
| | | * @return
|
| | | * @throws IntegralExchangeException
|
| | | */
|
| | | public void exchangeInviteCode(Long uid, Long id) throws IntegralExchangeException;
|
| | | public String exchangeInviteCode(Long uid, Long id) throws IntegralExchangeException;
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.user;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | |
|
| | | public interface UserInfoModifyRecordService {
|
| | |
|
| | | public void addModifyRecord(Long uid, ModifyTypeEnum type, String value);
|
| | |
|
| | | /**
|
| | | * 统计修改次数
|
| | | * @param uid
|
| | | * @param type 可为空则查询所有类型
|
| | | * @return
|
| | | */
|
| | | public long countByUid(Long uid, String type);
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getLeftDay() + "", COLOR_HIGHLIGHT_CONTENT));
|
| | |
|
| | | if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan) {
|
| | | if (msg.getType() == MsgTypeOtherTypeEnum.couponReward) {
|
| | | contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
|
| | | } else if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan) {
|
| | | contentList.add(new ClientTextStyleVO("天(未使用将会过期)", COLOR_CONTENT));
|
| | | } else {
|
| | | contentList.add(new ClientTextStyleVO("天", COLOR_CONTENT));
|
| | |
| | | if (!StringUtil.isNullOrEmpty(dto.getTotalGold())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getTotalGold() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("金币总数", COLOR_TITLE), contentList));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("剩余", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getThing())) {
|