Compare commits

...

4 Commits

Author SHA1 Message Date
99a62c66f5 种草社区接口优化,营销商品bug修复,新增计算营销活动状态方法,关闭后台文档地址提示信息 2024-09-19 17:50:41 +08:00
f5f0ae372d Merge branch 'master' of http://101.43.112.107:3000/root/allLikeMall into zzw-one 2024-09-14 12:02:15 +08:00
941a4f8787 更新 yudao-server/run.sh
All checks were successful
continuous-integration/drone Build is passing
2024-09-13 17:23:57 +08:00
072e0f8fd3 Merge pull request '后台配置文件调整' (#11) from zzw-one into master
All checks were successful
continuous-integration/drone Build is passing
Reviewed-on: #11
2024-09-13 15:37:34 +08:00
5 changed files with 38 additions and 4 deletions

View File

@ -14,7 +14,7 @@ VITE_APP_TENANT_ENABLE=true
VITE_APP_CAPTCHA_ENABLE=true
# 文档地址的开关
VITE_APP_DOCALERT_ENABLE=true
VITE_APP_DOCALERT_ENABLE=false
# 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc

View File

@ -23,6 +23,7 @@ import javax.validation.Valid;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@Tag(name = "用户 APP - 商城动态") // 用于提供跨多个活动的 HTTP 接口
@RestController
@ -77,12 +78,29 @@ public class AppCircleController {
return success(true);
}
@GetMapping("/doReview")
@PostMapping("/doReview")
@Operation(summary = "评论/回复")
@PreAuthenticated
public CommonResult<Boolean> doReview(@RequestBody CircleReviewSaveReqVO createReqVO){
createReqVO.setUserId(getLoginUserId());
circleReviewService.createCircleReview(createReqVO);
return success(true);
}
@GetMapping("/doReviewDelete")
@Operation(summary = "删除评论")
@PreAuthenticated
public CommonResult<Boolean> doReviewDelete(@RequestParam("id") Long lookId){
circleReviewService.deleteCircleReview(lookId);
return success(true);
}
@GetMapping("/doCircleDelete")
@Operation(summary = "删除动态")
@PreAuthenticated
public CommonResult<Boolean> doCircleDelete(@RequestParam("id") Long lookId){
circleService.deleteCircle(lookId);
return success(true);
}
}

View File

@ -44,7 +44,8 @@ public class RewardActivityServiceImpl implements RewardActivityService {
// 插入
RewardActivityDO rewardActivity = RewardActivityConvert.INSTANCE.convert(createReqVO)
.setStatus(PromotionUtils.calculateActivityStatus(createReqVO.getEndTime()));
.setStatus(PromotionUtils.calculateRewardActivityStatus(createReqVO.getStartTime(),
createReqVO.getEndTime()));
rewardActivityMapper.insert(rewardActivity);
// 返回
return rewardActivity.getId();

View File

@ -2,8 +2,10 @@ package cn.iocoder.yudao.module.promotion.util;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils;
import cn.iocoder.yudao.module.promotion.enums.common.PromotionActivityStatusEnum;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
* 活动工具类
@ -22,4 +24,17 @@ public class PromotionUtils {
return LocalDateTimeUtils.beforeNow(endTime) ? CommonStatusEnum.DISABLE.getStatus() : CommonStatusEnum.ENABLE.getStatus();
}
public static Integer calculateRewardActivityStatus(LocalDateTime starTime, LocalDateTime endTime) {
if (LocalDateTimeUtils.afterNow(starTime)){
return PromotionActivityStatusEnum.WAIT.getStatus();
}
if (LocalDateTimeUtils.beforeNow(starTime) && LocalDateTimeUtils.afterNow(endTime)){
return PromotionActivityStatusEnum.RUN.getStatus();
}
if (LocalDateTimeUtils.beforeNow(endTime)){
return PromotionActivityStatusEnum.END.getStatus();
}
return PromotionActivityStatusEnum.CLOSE.getStatus();
}
}

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
echo '----start container----'
docker run -d -p 6127:6127 --name ${app_name} ${app_name}:${app_version}
docker run -d -p 6127:6127 --name ${app_name} --restart always ${app_name}:${app_version}