Compare commits

..

No commits in common. "837aa53c11a3f510631ea13b0d2a205440afbd43" and "e9c46ea4e1fe07d84ff2b247fcde0d31150243d9" have entirely different histories.

14 changed files with 13 additions and 122 deletions

View File

@ -117,7 +117,6 @@ const submitForm = async () => {
if (formType.value === 'create') {
await LitemallBrandApi.createLitemallBrand(data)
message.success(t('common.createSuccess'))
} else {
await LitemallBrandApi.updateLitemallBrand(data)
message.success(t('common.updateSuccess'))

View File

@ -56,7 +56,7 @@
<!-- <el-table-column label="门店管理员" align="center" prop="userId" />-->
<el-table-column label="门店图片" align="center" prop="picUrl">
<template #default="{ row }">
<div class="flex justify-center items-center">
<div class="flex">
<el-image fit="cover" :src="row.picUrl" class="flex-none w-50px h-50px"
@click="imagePreview(row.picUrl)" />
</div>
@ -79,7 +79,7 @@
</template>
</el-table-column>
<!-- <el-table-column label="权重" align="center" prop="weight" />-->
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" :formatter="dateFormatter" width="180px" />
<el-table-column label="操作" align="center" fixed="right" width="110">
<template #default="scope">

View File

@ -8,14 +8,10 @@
v-loading="formLoading"
>
<el-form-item label="门店" prop="brandId">
<!-- <el-input v-model="formData.brandId" placeholder="请输入门店id" />-->
<el-select v-model="formData.brandId" placeholder="请选择门店" clearable class="!w-240px">
<el-option
v-for="organizationNameOptions in option"
:key="organizationNameOptions.id"
:label="organizationNameOptions.name"
:value="organizationNameOptions.id"
:disabled="organizationNameOptions.disabled"
/>
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
</el-select>
</el-form-item>
<el-form-item label="项目名称" prop="name">

View File

@ -54,7 +54,7 @@
<!-- <el-table-column label="项目图片" align="center" prop="pictrue" /> -->
<el-table-column label="项目图片" align="center" prop="pictrue">
<template #default="{ row }">
<div class="flex justify-center items-center" style="display: flex; align-items: center;">
<div class="flex" style="display: flex; align-items: center;">
<el-image fit="cover" :src="row.pictrue" class="flex-none w-50px h-50px"
@click="imagePreview(row.pictrue)" />
</div>

View File

@ -2,8 +2,8 @@
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<el-form-item label="所属项目" prop="brandId">
<el-select v-model="queryParams.brandId" placeholder="请选择项目" clearable class="!w-240px">
<el-form-item label="所属门店" prop="brandId">
<el-select v-model="queryParams.brandId" placeholder="请选择门店" clearable class="!w-240px">
<el-option v-for="organizationNameOptions in option" :key="organizationNameOptions.id"
:label="organizationNameOptions.name" :value="organizationNameOptions.id" />
</el-select>
@ -47,7 +47,7 @@
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="图片" align="center" prop="photo">
<template #default="{ row }">
<div class="flex justify-center items-center">
<div class="flex">
<el-image fit="cover" :src="row.photo" class="flex-none w-50px h-50px"
@click="imagePreview(row.photo)" />
</div>

View File

@ -26,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@ -101,7 +100,6 @@ public class AppPointActivityController {
return success(result);
}
private List<AppPointActivityRespVO> buildAppPointActivityRespVOList(List<PointActivityDO> activityList) {
List<PointProductDO> products = pointActivityService.getPointProductListByActivityIds(
convertSet(activityList, PointActivityDO::getId));
@ -120,29 +118,4 @@ public class AppPointActivityController {
return result;
}
//获取更多积分商品
@GetMapping("/pointActivityList")
public CommonResult<List<AppPointActivityRespVO>> pointActivityList() {
List<Long> ids = new ArrayList<>();
List<PointActivityDO> pointActivityDOS = pointActivityService.pointActivityList();
for (int i = 0; i < pointActivityDOS.size(); i++) {
PointActivityDO pointActivityDO = pointActivityDOS.get(i);
ids.add(pointActivityDO.getId());
}
// 1. 获得开启的活动列表
List<PointActivityDO> activityList = pointActivityService.getPointActivityListByIds(ids);
activityList.removeIf(activity -> CommonStatusEnum.isDisable(activity.getStatus()));
if (CollUtil.isEmpty(activityList)) {
return success(Collections.emptyList());
}
// 2. 拼接返回
List<AppPointActivityRespVO> result = buildAppPointActivityRespVOList(activityList);
return success(result);
}
}

View File

@ -8,9 +8,6 @@ import cn.iocoder.yudao.module.promotion.controller.admin.point.vo.activity.Poin
import cn.iocoder.yudao.module.promotion.dal.dataobject.point.PointActivityDO;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 积分商城活动 Mapper
@ -59,10 +56,4 @@ public interface PointActivityMapper extends BaseMapperX<PointActivityDO> {
.setSql("stock = stock + " + count));
}
@Select(" select a.* from promotion_point_activity a " +
" left join product_spu b on a.spu_id = b.id " +
" where b.status = 1 and b.deleted = 0 ")
List<PointActivityDO> pointActivityList();
}

View File

@ -109,6 +109,4 @@ public interface PointActivityService {
*/
PointValidateJoinRespDTO validateJoinPointActivity(Long activityId, Long skuId, Integer count);
List<PointActivityDO> pointActivityList();
}

View File

@ -306,9 +306,4 @@ public class PointActivityServiceImpl implements PointActivityService {
return BeanUtils.toBean(product, PointValidateJoinRespDTO.class);
}
@Override
public List<PointActivityDO> pointActivityList() {
return pointActivityMapper.pointActivityList();
}
}

View File

@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.trade.controller.app.delivery.vo.pickup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalTime;
@Schema(description = "用户 App - 自提门店 Response VO")
@Data
public class AppDeliveryPickUpStoreRespVO {
@ -39,17 +37,4 @@ public class AppDeliveryPickUpStoreRespVO {
@Schema(description = "距离,单位:千米", example = "100") // 只有在用户传递了经纬度时才进行计算
private Double distance;
/**
* 营业开始时间
*/
private LocalTime openingTime;
/**
* 营业结束时间
*/
private LocalTime closingTime;
//门店状态营业中休息中
private int stat;
}

View File

@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.trade.dal.dataobject.delivery;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -82,8 +81,4 @@ public class DeliveryPickUpStoreDO extends BaseDO {
*/
private Integer status;
@TableField(exist = false)
private int stat;
}

View File

@ -11,7 +11,6 @@ import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.time.LocalTime;
import java.util.Collection;
import java.util.List;
@ -79,29 +78,7 @@ public class DeliveryPickUpStoreServiceImpl implements DeliveryPickUpStoreServic
@Override
public List<DeliveryPickUpStoreDO> getDeliveryPickUpStoreListByStatus(Integer status) {
List<DeliveryPickUpStoreDO> deliveryPickUpStoreDOS = deliveryPickUpStoreMapper.selectListByStatus(status);
for (int i = 0; i < deliveryPickUpStoreDOS.size(); i++) {
DeliveryPickUpStoreDO deliveryPickUpStoreDO = deliveryPickUpStoreDOS.get(i);
LocalTime openingTime = deliveryPickUpStoreDO.getOpeningTime();
LocalTime closingTime = deliveryPickUpStoreDO.getClosingTime();
LocalTime currentTime = LocalTime.now(); // 获取当前时间
boolean isOpen = isStoreOpen(openingTime, closingTime, currentTime);
if (isOpen) {
System.out.println("商店现在是开着的。");
deliveryPickUpStoreDO.setStat(1);
} else {
System.out.println("商店现在是关着的。");
deliveryPickUpStoreDO.setStat(0);
}
}
return deliveryPickUpStoreDOS;
}
public static boolean isStoreOpen(LocalTime openingTime, LocalTime closingTime, LocalTime currentTime) {
// 检查当前时间是否在开店时间和关店时间之间
return !currentTime.isBefore(openingTime) && !currentTime.isAfter(closingTime);
return deliveryPickUpStoreMapper.selectListByStatus(status);
}
}

View File

@ -70,8 +70,4 @@ public class LitemallBrandDO extends BaseDO {
*/
private String remark;
//状态显示下拉框数据显示或隐藏
@TableField(exist = false)
private boolean disabled;
}

View File

@ -42,12 +42,6 @@ public class LitemallBrandServiceImpl implements LitemallBrandService {
public void updateLitemallBrand(LitemallBrandSaveReqVO updateReqVO) {
// 校验存在
validateLitemallBrandExists(updateReqVO.getId());
// //停用门店
// if (updateReqVO.getStatus() == 1){
//
// }
// 更新
LitemallBrandDO updateObj = BeanUtils.toBean(updateReqVO, LitemallBrandDO.class);
litemallBrandMapper.updateById(updateObj);
@ -79,15 +73,7 @@ public class LitemallBrandServiceImpl implements LitemallBrandService {
@Override
public List<LitemallBrandDO> getOrganization() {
List<LitemallBrandDO> litemallBrandDOS = litemallBrandMapper.selectList();
for (int i = 0; i < litemallBrandDOS.size(); i++) {
LitemallBrandDO litemallBrandDO = litemallBrandDOS.get(i);
if (litemallBrandDO.getStatus() == 1){ //关闭
litemallBrandDO.setDisabled(true);
}
}
return litemallBrandDOS;
return litemallBrandMapper.selectList();
}
}