Merge #71 into master from cc_20260318_wishlist

feat:订单待确认 审批流去掉

* cc_20260318_wishlist: (22 commits squashed)

  - feat:心愿单接口

  - feat:心愿单接口

  - feat:心愿单接口

  - feat:心愿单接口 查询当前门店铺位绑定的心愿单

  - feat:心愿单接口 状态

  - feat:心愿单接口 状态

  - feat:心愿单接口 状态

  - feat:心愿单接口 状态

  - Merge branch 'master' into cc_20260318_wishlist

  - feat:代码merge 错误处理

  - feat:新增storeType

  - feat:查询逻辑调整

  - feat:新增use_ai 赛选

  - feat:新增use_ai 赛选

  - feat:新增use_ai 赛选

  - feat:心愿单状态筛选

  - feat:查询当前门店铺位绑定的心愿单 mini

  - feat:bug修复

  - feat:类型调整

  - feat:名称

  - feat:订单待确认 审批流去掉

  - feat:订单待确认 审批流去掉

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/71
This commit is contained in:
正新
2026-03-23 11:51:20 +00:00
parent d50a31d044
commit a13ba2175c
38 changed files with 908 additions and 242 deletions

View File

@@ -6,6 +6,7 @@ import com.cool.store.mapper.order.StoreWishlistMapper;
import com.cool.store.vo.order.MiniStoreWishlistListVO;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
@@ -25,6 +26,20 @@ public class StoreWishlistDAO {
return mapper.insertBatch(list) > 0;
}
public boolean insert(StoreWishlistDO item) {
if (item == null) {
return false;
}
return mapper.insertSelective(item) > 0;
}
public int updateByExampleSelective(StoreWishlistDO item) {
if (item == null) {
return 0;
}
return mapper.updateByPrimaryKeySelective(item);
}
public boolean softDeleteByLineIdAndStoreTypeAndVersion(Long lineId, Long storeTypeId, String versionNo) {
if (lineId == null || storeTypeId == null || versionNo == null) {
return false;
@@ -39,6 +54,27 @@ public class StoreWishlistDAO {
return mapper.getById(id);
}
public StoreWishlistDO getByPointId(Long lineId,Long pointId) {
if (lineId == null||pointId==null) {
return null;
}
return mapper.getByPointId(lineId,pointId);
}
public Boolean updateByLineId(Long id) {
if (id == null) {
return null;
}
return mapper.updateByLineId(id);
}
public Integer getPointBindWishlistCount( Long pointId, Integer wishlistStatus) {
if (pointId == null||wishlistStatus==null) {
return 0;
}
return mapper.getPointBindWishlistCount(pointId,wishlistStatus);
}
public List<StoreWishlistDO> listByLineIdAndStoreTypeAndVersion(Long lineId, Long storeTypeId, String versionNo) {
if (lineId == null || storeTypeId == null || versionNo == null) {
return Collections.emptyList();
@@ -53,14 +89,8 @@ public class StoreWishlistDAO {
return mapper.listByLineId(lineId, storeTypeId);
}
public List<MiniStoreWishlistListVO> listByVersionList(List<String> versionNoList) {
if (CollectionUtils.isEmpty(versionNoList)) {
return Collections.emptyList();
}
return mapper.listByVersionList(versionNoList);
public List<MiniStoreWishlistListVO> listByVersionList(String keyword,Long storeTypeId,Integer wishlistStatus) {
return mapper.listByVersionList(keyword,storeTypeId,wishlistStatus);
}
public List<String> getDistinctVersion(String keyword,Long storeTypeId){
return mapper.versionNoList(keyword,storeTypeId);
}
}

View File

@@ -0,0 +1,38 @@
package com.cool.store.dao.order;
import com.cool.store.entity.order.StoreWishlistOptionDO;
import com.cool.store.mapper.order.StoreWishlistOptionMapper;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import java.util.Collections;
import java.util.List;
@Repository
@RequiredArgsConstructor
public class StoreWishlistOptionDAO {
private final StoreWishlistOptionMapper mapper;
public boolean insertBatch(List<StoreWishlistOptionDO> list) {
if (CollectionUtils.isEmpty(list)) {
return false;
}
return mapper.insertBatch(list) > 0;
}
public boolean softDeleteByWishlistIds(List<Long> wishlistIds) {
if (CollectionUtils.isEmpty(wishlistIds)) {
return false;
}
return mapper.softDeleteByWishlistIds(wishlistIds) > 0;
}
public List<StoreWishlistOptionDO> listByWishlistIds(List<Long> wishlistIds) {
if (CollectionUtils.isEmpty(wishlistIds)) {
return Collections.emptyList();
}
return mapper.listByWishlistIds(wishlistIds);
}
}

View File

@@ -17,6 +17,11 @@ public interface StoreWishlistMapper extends Mapper<StoreWishlistDO> {
StoreWishlistDO getById(@Param("id") Long id);
StoreWishlistDO getByPointId(@Param("lineId") Long lineId, @Param("pointId") Long pointId);
Integer getPointBindWishlistCount(@Param("pointId") Long pointId, @Param("wishlistStatus") Integer wishlistStatus);
List<StoreWishlistDO> listByLineIdAndStoreTypeAndVersion(@Param("lineId") Long lineId,
@Param("storeTypeId") Long storeTypeId,
@Param("versionNo") String versionNo);
@@ -25,7 +30,16 @@ public interface StoreWishlistMapper extends Mapper<StoreWishlistDO> {
@Param("storeTypeId") Long storeTypeId);
List<MiniStoreWishlistListVO> listByVersionList(@Param("versionNoList") List<String> versionNoList);
List<MiniStoreWishlistListVO> listByVersionList(@Param("keyword") String keyword,
@Param("storeTypeId") Long storeTypeId,
@Param("wishlistStatus") Integer wishlistStatus);
/**
* 更新心愿单状态 将当前加盟商所有的在待完善加盟资质的心愿单状态改为绑定铺位
* @param lineId
* @return
*/
Boolean updateByLineId(Long lineId) ;
List<String> versionNoList(@Param("keyword") String keyword, @Param("storeTypeId") Long storeTypeId);
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.mapper.order;
import com.cool.store.entity.order.StoreWishlistOptionDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface StoreWishlistOptionMapper extends Mapper<StoreWishlistOptionDO> {
int insertBatch(@Param("list") List<StoreWishlistOptionDO> list);
int softDeleteByWishlistIds(@Param("wishlistIds") List<Long> wishlistIds);
List<StoreWishlistOptionDO> listByWishlistIds(@Param("wishlistIds") List<Long> wishlistIds);
}

View File

@@ -35,6 +35,12 @@
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
<result column="point_location" jdbcType="VARCHAR" property="pointLocation"/>
<result column="protection_distance" jdbcType="VARCHAR" property="protectionDistance"/>
<result column="location_desc_code" jdbcType="TINYINT" property="locationDescCode"/>
<result column="use_ai" jdbcType="TINYINT" property="useAi"/>
<result column="door_inner_depth" jdbcType="DECIMAL" property="doorInnerDepth"/>
<result column="door_inner_width" jdbcType="DECIMAL" property="doorInnerWidth"/>
<result column="door_inner_height" jdbcType="DECIMAL" property="doorInnerHeight"/>
<result column="other_desc" jdbcType="VARCHAR" property="otherDesc"/>
</resultMap>
<sql id="allColumn">
@@ -43,7 +49,8 @@
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
create_time, update_time,
province, city, district, township, opportunity_point_code, opportunity_point_name,
province_code, city_code, district_code, point_location,protection_distance
province_code, city_code, district_code, point_location,protection_distance,
location_desc_code, use_ai, door_inner_depth, door_inner_width, door_inner_height, other_desc
</sql>
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
@@ -209,7 +216,7 @@
select
<include refid="allColumn"/>
from xfsg_point_info
where deleted = 0 and point_status in (4,5) and development_manager = #{request.developmentManager} and
where deleted = 0 and point_status = 5 and development_manager = #{request.developmentManager} and
select_status = 0
<if test="request.pointStatusList != null and request.pointStatusList.size() > 0">
and point_status in
@@ -220,6 +227,9 @@
<if test="request.pointName!=null and request.pointName!=''">
and point_name like concat('%',#{request.pointName},'%')
</if>
<if test="request.useAi!=null">
and use_ai = #{request.useAi}
</if>
</select>
<update id="updateSelectedDevelopmentManager">
@@ -555,7 +565,13 @@
province_code = #{request.provinceCode},
city_code = #{request.cityCode},
district_code = #{request.districtCode},
point_location = #{request.pointLocation}
point_location = #{request.pointLocation},
location_desc_code = #{request.locationDescCode},
use_ai = #{request.useAi},
door_inner_depth = #{request.doorInnerDepth},
door_inner_width = #{request.doorInnerWidth},
door_inner_height = #{request.doorInnerHeight},
other_desc = #{request.otherDesc}
where id = #{request.id}
</update>
<update id="updateAddress">

View File

@@ -4,10 +4,10 @@
<insert id="insertBatch">
INSERT INTO zxjp_store_wishlist
(line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time)
(line_id, store_type_id, total_amount, version_no, wishlist_status, point_id, deleted, create_time, update_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.lineId}, #{item.storeTypeId}, #{item.optionId}, #{item.quantity}, #{item.totalAmount}, #{item.versionNo}, 0, NOW(), NOW())
(#{item.lineId}, #{item.storeTypeId}, #{item.totalAmount}, #{item.versionNo}, #{item.wishlistStatus}, #{item.pointId}, 0, NOW(), NOW())
</foreach>
</insert>
@@ -22,15 +22,41 @@
</update>
<select id="getById" resultType="com.cool.store.entity.order.StoreWishlistDO">
SELECT id, line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time
SELECT id, line_id, store_type_id, total_amount, version_no, wishlist_status, point_id, deleted, create_time, update_time
FROM zxjp_store_wishlist
WHERE id = #{id}
AND deleted = 0
LIMIT 1
</select>
<select id="getByPointId" resultType="com.cool.store.entity.order.StoreWishlistDO">
SELECT id, line_id, store_type_id, total_amount, version_no, wishlist_status, point_id, deleted, create_time, update_time
FROM zxjp_store_wishlist
where deleted = 0
and wishlist_status !=15
<if test="lineId!=null">
and line_id = #{lineId}
</if>
<if test="pointId!=null">
and point_id = #{pointId}
</if>
limit 1
</select>
<select id="getPointBindWishlistCount" resultType="java.lang.Integer">
select count(1) from zxjp_store_wishlist
where deleted = 0
<if test="pointId != null">
AND point_id = #{pointId}
</if>
<if test="wishlistStatus != null">
AND wishlist_status != #{wishlistStatus}
</if>
</select>
<select id="listByLineIdAndStoreTypeAndVersion" resultType="com.cool.store.entity.order.StoreWishlistDO">
SELECT id, line_id, store_type_id, option_id, quantity, total_amount, version_no, deleted, create_time, update_time
SELECT id, line_id, store_type_id, total_amount, version_no, wishlist_status, point_id, deleted, create_time, update_time
FROM zxjp_store_wishlist
WHERE line_id = #{lineId}
AND store_type_id = #{storeTypeId}
@@ -41,14 +67,17 @@
<select id="listByLineId" resultType="com.cool.store.vo.order.MiniStoreWishlistListVO">
SELECT
w.id as wishlistId,
w.store_type_id AS storeTypeId,
st.brand AS brand,
st.store_type_name AS storeTypeName,
st.store_type AS storeType,
st.image_url AS imageUrl,
MIN(w.create_time) AS createTime,
MAX(w.total_amount) AS totalAmount,
w.version_no AS versionNo
w.create_time AS createTime,
w.total_amount AS totalAmount,
w.version_no AS versionNo,
w.point_id as pointId,
w.wishlist_status as wishlistStatus
FROM zxjp_store_wishlist w
LEFT JOIN zxjp_store_type st ON st.id = w.store_type_id
WHERE w.line_id = #{lineId}
@@ -56,48 +85,50 @@
<if test="storeTypeId != null">
AND w.store_type_id = #{storeTypeId}
</if>
GROUP BY w.version_no
ORDER BY w.create_time DESC
</select>
<select id="listByVersionList" resultType="com.cool.store.vo.order.MiniStoreWishlistListVO">
SELECT
w.id as wishlistId,
w.store_type_id AS storeTypeId,
w.line_id as lineId,
st.brand AS brand,
st.store_type_name AS storeTypeName,
st.store_type AS storeType,
st.image_url AS imageUrl,
MIN(w.create_time) AS createTime,
MAX(w.total_amount) AS totalAmount,
w.version_no AS versionNo
w.create_time AS createTime,
w.total_amount AS totalAmount,
w.version_no AS versionNo,
w.point_id as pointId,
w.wishlist_status as wishlistStatus
FROM zxjp_store_wishlist w
LEFT JOIN zxjp_store_type st ON st.id = w.store_type_id
WHERE w.deleted = 0
<if test="versionNoList != null and versionNoList.size>0">
and
<foreach collection="versionNoList" item="versionNo" separator="," open="w.version_no in (" close=")">
#{versionNo}
</foreach>
</if>
GROUP BY w.version_no
ORDER BY w.create_time DESC
</select>
<select id="versionNoList" resultType="java.lang.String">
SELECT DISTINCT version_no
FROM zxjp_store_wishlist a
<if test="keyword!=null and keyword !=''">
left join xfsg_line_info b on a.line_id = b.id
left join xfsg_line_info b on w.line_id = b.id
</if>
WHERE a.deleted = 0
<if test="storeTypeId!=null">
and a.store_type_id = #{storeTypeId}
WHERE w.deleted = 0
<if test="storeTypeId != null">
AND w.store_type_id = #{storeTypeId}
</if>
<if test="wishlistStatus != null">
AND w.wishlist_status = #{wishlistStatus}
</if>
<if test="keyword!=null and keyword !=''">
and (b.username like concat("%", #{keyword}, "%") or b.mobile like concat("%", #{keyword}, "%"))
</if>
ORDER BY version_no desc
ORDER BY w.create_time DESC
</select>
<update id="updateByLineId">
UPDATE zxjp_store_wishlist
SET wishlist_status = 5,
update_time = NOW()
WHERE wishlist_status = 0
and line_id = #{lineId}
AND deleted = 0
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.cool.store.mapper.order.StoreWishlistOptionMapper">
<insert id="insertBatch">
INSERT INTO zxjp_store_wishlist_option
(wishlist_id, option_id, quantity, deleted, create_time, update_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.wishlistId}, #{item.optionId}, #{item.quantity}, 0, NOW(), NOW())
</foreach>
</insert>
<update id="softDeleteByWishlistIds">
UPDATE zxjp_store_wishlist_option
SET deleted = 1,
update_time = NOW()
WHERE deleted = 0
AND wishlist_id IN
<foreach collection="wishlistIds" item="wishlistId" open="(" separator="," close=")">
#{wishlistId}
</foreach>
</update>
<select id="listByWishlistIds" resultType="com.cool.store.entity.order.StoreWishlistOptionDO">
SELECT id, wishlist_id, option_id, quantity, deleted, create_time, update_time
FROM zxjp_store_wishlist_option
WHERE deleted = 0
AND wishlist_id IN
<foreach collection="wishlistIds" item="wishlistId" open="(" separator="," close=")">
#{wishlistId}
</foreach>
ORDER BY id ASC
</select>
</mapper>