|
@@ -18,6 +18,7 @@ import com.yvan.platform.YvanUtil;
|
|
import com.yvan.springmvc.HttpParameterParser;
|
|
import com.yvan.springmvc.HttpParameterParser;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
|
|
+import org.joda.time.DateTime;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -281,6 +282,10 @@ public class YeWeiHuiController {
|
|
public ModelAndView groupBuyingCx(@Pd(name = "jmId") Long jmId, @Pd(name = "userId") Long userId, @Pd(name = "operation") String operation, ModelMap model) throws JsonProcessingException {
|
|
public ModelAndView groupBuyingCx(@Pd(name = "jmId") Long jmId, @Pd(name = "userId") Long userId, @Pd(name = "operation") String operation, ModelMap model) throws JsonProcessingException {
|
|
|
|
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
|
|
+ if (item.getTgEndTime().getTime() < new DateTime().getMillis() && item.getTgStatus() == 1) {
|
|
|
|
+ item.setTgStatus(4);
|
|
|
|
+ }
|
|
|
|
+
|
|
model.put("tgItemJson", new JsonWapper(item));
|
|
model.put("tgItemJson", new JsonWapper(item));
|
|
model.put("tgItem", item);
|
|
model.put("tgItem", item);
|
|
|
|
|
|
@@ -296,6 +301,10 @@ public class YeWeiHuiController {
|
|
|
|
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
|
|
|
|
|
|
+ if (item.getTgEndTime().getTime() < new DateTime().getMillis() && item.getTgStatus() == 1) {
|
|
|
|
+ item.setTgStatus(4);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (item.getUserId().equals(userId)) {
|
|
if (item.getUserId().equals(userId)) {
|
|
model.put("isMine", "mine");
|
|
model.put("isMine", "mine");
|
|
}
|
|
}
|
|
@@ -315,6 +324,10 @@ public class YeWeiHuiController {
|
|
|
|
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
JmTuangou item = jmTuangouService.queryByJmId(jmId);
|
|
|
|
|
|
|
|
+ if (item.getTgEndTime().getTime() < new DateTime().getMillis() && item.getTgStatus() == 1) {
|
|
|
|
+ item.setTgStatus(4);
|
|
|
|
+ }
|
|
|
|
+
|
|
List<JmTuangouMember> members = jmTuangouMemberService.querMemberListByJmId(jmId);
|
|
List<JmTuangouMember> members = jmTuangouMemberService.querMemberListByJmId(jmId);
|
|
|
|
|
|
model.put("tgItemJson", new JsonWapper(item));
|
|
model.put("tgItemJson", new JsonWapper(item));
|
|
@@ -370,6 +383,13 @@ public class YeWeiHuiController {
|
|
|
|
|
|
List<JmTuangou> list = jmTuangouService.queryTuangouListByTitle(userId, title);
|
|
List<JmTuangou> list = jmTuangouService.queryTuangouListByTitle(userId, title);
|
|
|
|
|
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
|
+ JmTuangou item = list.get(i);
|
|
|
|
+ if (item.getTgEndTime().getTime() < new DateTime().getMillis() && item.getTgStatus() == 1) {
|
|
|
|
+ item.setTgStatus(4);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
return Model.newSuccess(list);
|
|
return Model.newSuccess(list);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -378,6 +398,13 @@ public class YeWeiHuiController {
|
|
|
|
|
|
List<JmTuangou> myList = jmTuangouService.queryTuangouMyListByTitle(userId, title);
|
|
List<JmTuangou> myList = jmTuangouService.queryTuangouMyListByTitle(userId, title);
|
|
|
|
|
|
|
|
+ for (int i = 0; i < myList.size(); i++) {
|
|
|
|
+ JmTuangou item = myList.get(i);
|
|
|
|
+ if (item.getTgEndTime().getTime() < new DateTime().getMillis() && item.getTgStatus() == 1) {
|
|
|
|
+ item.setTgStatus(4);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
return Model.newSuccess(myList);
|
|
return Model.newSuccess(myList);
|
|
}
|
|
}
|
|
|
|
|