| @@ -2,6 +2,7 @@ package com.iformall.controller; | |||||
| import cn.binarywang.wx.miniapp.api.WxMaService; | import cn.binarywang.wx.miniapp.api.WxMaService; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.po.WxAppinfo; | import com.iformall.domain.po.WxAppinfo; | ||||
| import com.iformall.domain.po.WxCUser; | import com.iformall.domain.po.WxCUser; | ||||
| @@ -204,12 +205,14 @@ public class BaseController { | |||||
| byId.setPhone(userPhone); | byId.setPhone(userPhone); | ||||
| byId.setNickName(userName); | byId.setNickName(userName); | ||||
| byId.setAvatarUrl(avatarUrl); | byId.setAvatarUrl(avatarUrl); | ||||
| byId.setSex(sex); | |||||
| wxCUserBasicInfoService.update(byId); | wxCUserBasicInfoService.update(byId); | ||||
| return null; | return null; | ||||
| }else{ | }else{ | ||||
| Date cur = new Date(); | Date cur = new Date(); | ||||
| basicInfo = new WxCUserBasicInfo(); | basicInfo = new WxCUserBasicInfo(); | ||||
| basicInfo.setId(userId); | |||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| basicInfo.setId(idWorker.nextId()); | |||||
| basicInfo.updateTenantInfo(tenantEntity); | basicInfo.updateTenantInfo(tenantEntity); | ||||
| basicInfo.undateFinalTenantId(tenantEntity); | basicInfo.undateFinalTenantId(tenantEntity); | ||||
| basicInfo.setPhone(userPhone); | basicInfo.setPhone(userPhone); | ||||
| @@ -221,7 +224,7 @@ public class BaseController { | |||||
| basicInfo.setCreateDate(cur); | basicInfo.setCreateDate(cur); | ||||
| basicInfo.setUpdateDate(cur); | basicInfo.setUpdateDate(cur); | ||||
| wxCUserBasicInfoService.save(basicInfo); | wxCUserBasicInfoService.save(basicInfo); | ||||
| return userId; | |||||
| return basicInfo.getId(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -665,6 +665,10 @@ public class WxUserGrantController extends BaseController { | |||||
| } | } | ||||
| wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, user); | wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_PHONE, user); | ||||
| } | } | ||||
| String key = Constant.tokenPrev + user.getOpenId(); | |||||
| if(cUserTokenRedisTemplate.hasKey(key)){ | |||||
| cUserTokenRedisTemplate.delete(key); | |||||
| } | |||||
| if(isFirstPhone) { | if(isFirstPhone) { | ||||
| // 首次授权, 增加成长值及积分 | // 首次授权, 增加成长值及积分 | ||||
| @@ -633,12 +633,12 @@ | |||||
| <select id="findExpiredFreeCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> | <select id="findExpiredFreeCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> | ||||
| select <include refid="allColumns" /> from wx_coupon_order | select <include refid="allColumns" /> from wx_coupon_order | ||||
| where expired_time >= date_sub(curdate(),interval 360 day) and expired_time < now() and coupon_price = 0 and coupon_order_status = 0 | |||||
| where expired_time >= date_sub(curdate(),interval 360 day) and expired_time < now() and coupon_price = 0 and coupon_order_status in (0, 4) | |||||
| </select> | </select> | ||||
| <select id="findExpiredCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> | <select id="findExpiredCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> | ||||
| select <include refid="allColumns" /> from wx_coupon_order | select <include refid="allColumns" /> from wx_coupon_order | ||||
| where expired_time >= date_sub(curdate(),interval 360 day) and expired_time < now() and coupon_price > 0 and coupon_order_status = 0 | |||||
| where expired_time >= date_sub(curdate(),interval 360 day) and expired_time < now() and coupon_price > 0 and coupon_order_status in (0, 4) | |||||
| </select> | </select> | ||||