feat:askbot 门店获取方式变更
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,4 +24,11 @@ public interface StoreMapper {
|
||||
|
||||
StoreDO getByStoreNum(@Param("storeNum") String storeNum);
|
||||
|
||||
/**
|
||||
* 查询自定义字段含有该手机号的门店
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
List<StoreDO> listByMobile(@Param("mobile") String mobile);
|
||||
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user