Преглед изворни кода

Merge branch 'release_real_202101' of https://git.malls.iformall.com/server/formallProject into release_real_202101

release_toaliyun_real
xiaohanzi пре 5 година
родитељ
комит
a2235689a8
1 измењених фајлова са 41 додато и 32 уклоњено
  1. +41
    -32
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicSignServiceImpl.java

+ 41
- 32
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicSignServiceImpl.java Прегледај датотеку

@@ -153,50 +153,59 @@ public class WxCUserBasicSignServiceImpl implements WxCUserBasicSignService {
if(lastSignIn != null){
long daysL = DateUtils.startToEnd(lastSignIn.getSigninDate(), new Date());
int daysI = new Long(daysL).intValue();
if(daysI <= 1){
if(daysI == 0){
map.put("continueSign",lastSignIn.getContinueSign()%28);
map.put("signInDay",1);//今日已签到
}else if(daysI == 1){
map.put("continueSign",lastSignIn.getContinueSign()%28);
map.put("signInDay",0);
}else{
map.put("continueSign",0);
map.put("signInDay",0);
}
}else{
map.put("continueSign",0);
map.put("signInDay",0);
}


// if(lastSignIn != null && DateUtils.isSameMonth(lastSignIn.getSigninDate(),new Date())){
// //本月连续签到天数
// map.put("continueMonthSign",lastSignIn.getContinueMonthSign());
// }else{
// map.put("continueMonthSign",0);
// }
WxCreditHistory wxCreditHistory = new WxCreditHistory();
wxCreditHistory.setTenantId(record.getFinalTenantId());
wxCreditHistory.setCUserId(record.getUserId());
wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_DAY.getCode());
//每日签到
if(wxCreditHistoryMapper.loginCount(wxCreditHistory) > 0){
map.put("signInDay",1);
}else{
map.put("signInDay",0);
}
//7日连续
wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_SEVENDAY.getCode());
if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
map.put("signInSevenDay",1);
}else{
map.put("signInSevenDay",0);
}
//14日连续
wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_FTDAY.getCode());
if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
map.put("signInFTDay",1);
}else{
map.put("signInFTDay",0);
}
//28日连续
wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_TEDAY.getCode());
if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
map.put("signInTEDay",1);
}else{
map.put("signInTEDay",0);
}
// WxCreditHistory wxCreditHistory = new WxCreditHistory();
// wxCreditHistory.setTenantId(record.getFinalTenantId());
// wxCreditHistory.setCUserId(record.getUserId());
// wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_DAY.getCode());
// //每日签到
// if(wxCreditHistoryMapper.loginCount(wxCreditHistory) > 0){
// map.put("signInDay",1);
// }else{
// map.put("signInDay",0);
// }
// //7日连续
// wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_SEVENDAY.getCode());
// if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
// map.put("signInSevenDay",1);
// }else{
// map.put("signInSevenDay",0);
// }
// //14日连续
// wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_FTDAY.getCode());
// if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
// map.put("signInFTDay",1);
// }else{
// map.put("signInFTDay",0);
// }
// //28日连续
// wxCreditHistory.setCreditType(EnumScoreType.SIGN_IN_TEDAY.getCode());
// if(wxCreditHistoryMapper.monthCount(wxCreditHistory) > 0 ){
// map.put("signInTEDay",1);
// }else{
// map.put("signInTEDay",0);
// }
return map;
}



Loading…
Откажи
Сачувај