This commit is contained in:
2025-11-22 14:02:20 +08:00
parent 98a04f8fbe
commit 381ae80eeb
59 changed files with 1930 additions and 1817 deletions

View File

@@ -1,10 +1,10 @@
package com.czg.service.account.mapper;
import com.czg.account.dto.shopinfo.ShopInfoDetailDTO;
import com.czg.account.dto.shopinfo.ShopInfoSubVO;
import com.czg.account.entity.ShopInfo;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.math.BigDecimal;
@@ -22,4 +22,16 @@ public interface ShopInfoMapper extends BaseMapper<ShopInfo> {
@Update("update tb_shop_info set amount = amount + #{amount} where id = #{id} and amount + #{amount} >= 0")
boolean updateAmount(@Param("id") Long id, @Param("amount") BigDecimal amount);
/**
* 获取所有未删除的 过期时间>三天前 店铺id列表
*
* @return 店铺id列表
*/
@Select("SELECT id " +
"FROM tb_shop_info " +
"WHERE id > 1 " +
" AND expire_time > DATE_SUB(NOW(), INTERVAL 3 DAY) " +
" AND is_deleted = 0;")
List<Long> getShopIdList();
}

View File

@@ -1,20 +0,0 @@
package com.czg.service.account.mapper;
import com.czg.account.vo.ShopProdStatisticVO;
import com.mybatisflex.core.BaseMapper;
import com.czg.account.entity.ShopProdStatistic;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 映射层。
*
* @author zs
* @since 2025-03-06
*/
public interface ShopProdStatisticMapper extends BaseMapper<ShopProdStatistic> {
List<ShopProdStatisticVO> pageInfo(@Param("shopId") Long shopId, @Param("name") String name, @Param("classifyId") String classifyId,
@Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -465,4 +465,8 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
}
@Override
public List<Long> getShopIdList() {
return mapper.getShopIdList();
}
}

View File

@@ -1,26 +0,0 @@
package com.czg.service.account.service.impl;
import com.czg.utils.PageUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.account.entity.ShopProdStatistic;
import com.czg.account.service.ShopProdStatisticService;
import com.czg.service.account.mapper.ShopProdStatisticMapper;
import org.springframework.stereotype.Service;
/**
* 服务层实现。
*
* @author zs
* @since 2025-03-06
*/
@Service
public class ShopProdStatisticServiceImpl extends ServiceImpl<ShopProdStatisticMapper, ShopProdStatistic> implements ShopProdStatisticService{
@Override
public Page<?> pageInfo(Long shopId, String name, String classifyId, String startTime, String endTime) {
PageHelper.startPage(PageUtil.buildPageHelp());
return PageUtil.convert(new PageInfo<>(mapper.pageInfo(shopId, name, classifyId, startTime, endTime)));
}
}

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.czg.service.account.mapper.ShopProdStatisticMapper">
<select id="pageInfo" resultType="com.czg.account.vo.ShopProdStatisticVO">
select * from tb_shop_prod_statistic as a
left join tb_product as b on a.prod_id=b.id
where a.shop_id=#{shopId} and b.name like and b.category_id=
</select>
</mapper>