|
@@ -10,6 +10,7 @@ import com.miaxis.newgzpt.service.IGzptVideoVipService;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.util.Date;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -41,7 +42,21 @@ public class GzptVideoVipServiceImpl extends ServiceImpl<GzptVideoVipMapper, Gzp
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public GzptVideoVip getGzptVideoVipByUserId(GzptVideoVipDTO gzptVideoVipDTO) {
|
|
public GzptVideoVip getGzptVideoVipByUserId(GzptVideoVipDTO gzptVideoVipDTO) {
|
|
- return mapper.getGzptVideoVipByUserId(gzptVideoVipDTO);
|
|
|
|
|
|
+ GzptVideoVip vv = mapper.getGzptVideoVipByUserId(gzptVideoVipDTO);
|
|
|
|
+ Date now = new Date();
|
|
|
|
+ if(vv!=null) {
|
|
|
|
+ if(vv.getSubject2()!=null) {
|
|
|
|
+ if(vv.getSubject2().compareTo(now)<0){
|
|
|
|
+ vv.setSubject2(null);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(vv.getSubject3()!=null) {
|
|
|
|
+ if(vv.getSubject3().compareTo(now)<0){
|
|
|
|
+ vv.setSubject3(null);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return vv;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|