...
|
...
|
@@ -8,8 +8,10 @@ import com.yoho.service.model.union.bo.*; |
|
|
import com.yoho.service.model.union.request.*;
|
|
|
import com.yoho.service.model.union.response.*;
|
|
|
import com.yoho.unions.common.constant.Constant;
|
|
|
import com.yoho.unions.common.redis.RedisValueCache;
|
|
|
import com.yoho.unions.dal.model.*;
|
|
|
import com.yoho.unions.server.task.CpsNewUserActivityTask;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -30,6 +32,7 @@ import com.yoho.unions.common.ApiResponse; |
|
|
import com.yoho.unions.server.service.IUnionShareService;
|
|
|
import com.yoho.unions.server.task.CpsOrderExtraActivityTask;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
...
|
...
|
@@ -52,6 +55,9 @@ public class UnionShareRest { |
|
|
@Autowired
|
|
|
CpsNewUserActivityTask cpsNewUserActivityTask;
|
|
|
|
|
|
@Resource
|
|
|
RedisValueCache redisValueCache;
|
|
|
|
|
|
@RequestMapping("/getShareInfoByUid")
|
|
|
@ResponseBody
|
|
|
public ShareUserSettlementInfoBo getShareInfoByUid(@RequestBody int uid){
|
...
|
...
|
@@ -589,12 +595,16 @@ public class UnionShareRest { |
|
|
log.info("specialAward req is {}", req);
|
|
|
UserInfoBO userInfoBO= (UserInfoBO) session.getAttribute("userSession");
|
|
|
if (userInfoBO == null) {
|
|
|
return new UnionResponse(403, "请刷新页面重新操作");
|
|
|
userInfoBO=getFromredis(req.getString("pid"));
|
|
|
if (userInfoBO == null){
|
|
|
return new UnionResponse(403, "请刷新页面重新操作");
|
|
|
}
|
|
|
}
|
|
|
log.info("specialAward req is {},account is {}", req,userInfoBO);
|
|
|
boolean result = unionShareService.specialAward(req,userInfoBO);
|
|
|
return new UnionResponse(200, "specialAward end",result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 特殊佣金状态变更
|
|
|
* @param req
|
...
|
...
|
@@ -607,7 +617,10 @@ public class UnionShareRest { |
|
|
log.info("specialAwardChange req is {}", req);
|
|
|
UserInfoBO userInfoBO= (UserInfoBO) session.getAttribute("userSession");
|
|
|
if (userInfoBO == null) {
|
|
|
return new UnionResponse(403, "请刷新页面重新操作");
|
|
|
userInfoBO=getFromredis(req.getString("pid"));
|
|
|
if (userInfoBO == null){
|
|
|
return new UnionResponse(403, "请刷新页面重新操作");
|
|
|
}
|
|
|
}
|
|
|
log.info("specialAwardChange req is {},account is {}", req,userInfoBO);
|
|
|
int result = unionShareService.specialAwardChange(req);
|
...
|
...
|
@@ -802,4 +815,11 @@ public class UnionShareRest { |
|
|
|
|
|
}
|
|
|
|
|
|
private UserInfoBO getFromredis(String pid) {
|
|
|
if (StringUtils.isBlank(pid)) {
|
|
|
return null;
|
|
|
}
|
|
|
UserInfoBO userInfoResponseBO=redisValueCache.get("yh:union:pid:"+pid,UserInfoBO.class);
|
|
|
return userInfoResponseBO;
|
|
|
}
|
|
|
} |
...
|
...
|
|