feat:askbot 门店获取方式变更

This commit is contained in:
苏竹红
2025-05-12 10:38:19 +08:00
parent 66202bfca8
commit b15c9eed79
7 changed files with 45 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Repository
@@ -55,6 +56,12 @@ public class StoreDao {
return storeMapper.getByStoreNum(storeNum);
}
public List<StoreDO> listByMobile(String mobile) {
if(StringUtils.isBlank(mobile)) {
return new ArrayList<>();
}
return storeMapper.listByMobile(mobile);
}
}

View File

@@ -24,4 +24,11 @@ public interface StoreMapper {
StoreDO getByStoreNum(@Param("storeNum") String storeNum);
/**
* 查询自定义字段含有该手机号的门店
* @param mobile
* @return
*/
List<StoreDO> listByMobile(@Param("mobile") String mobile);
}

View File

@@ -441,7 +441,8 @@
<select id="getShopListSuccessOpen" resultType="com.cool.store.response.MiniShopsResponse">
select a.shop_name as shopName,
a.id as shopId,
a.shop_code as shopCode
a.shop_code as shopCode,
a.detail_address as detailAddress
from xfsg_shop_info a
inner join store_${eid} c on a.shop_code = c.store_num
where a.line_id = #{lineId}

View File

@@ -79,4 +79,14 @@
where store_num = #{storeNum}
</select>
<select id="listByMobile" resultMap="BaseResultMap">
select *
from store_${enterpriseId}
<where>
<if test="mobile!=null and mobile !=''">
and `extend_field` like concat('%', #{mobile}, '%')
</if>
</where>
</select>
</mapper>