Commit 6f434d72 by 徐高华

门店查询

parent 096b7ab1
......@@ -9,17 +9,6 @@ import java.util.Set;
@Mapper
public interface TabHaobanStoreRelationMapper {
/**
*/
int deleteByPrimaryKey(String storeRelationId);
/**
*/
int insert(TabStoreRelation record);
/**
*/
int insertSelective(TabStoreRelation record);
/**
*/
......@@ -30,14 +19,6 @@ public interface TabHaobanStoreRelationMapper {
TabStoreRelation selectByPrimaryKey(String storeRelationId);
/**
*/
int updateByPrimaryKeySelective(TabStoreRelation record);
/**
*/
int updateByPrimaryKey(TabStoreRelation record);
/**
* 删除门店
*
* @param enterpriseId
......@@ -62,14 +43,6 @@ public interface TabHaobanStoreRelationMapper {
* @param enterpriseId
* @return
*/
public int deleteAllStoreRalation(@Param("enterpriseId") String enterpriseId);
/**
* 删除门店
*
* @param enterpriseId
* @return
*/
public int deleteStoreRalationByStoreIds(@Param("enterpriseId") String enterpriseId, @Param("storeIds") Set<String> storeIds);
/**
......@@ -117,5 +90,8 @@ public interface TabHaobanStoreRelationMapper {
List<String> listStoreGroupIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId);
List<String> listStoreIdByName(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId, @Param("storeName")String storeName);
}
\ No newline at end of file
......@@ -8,6 +8,8 @@ import com.gic.haoban.manage.service.entity.TabStoreRelation;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* Created 2021/4/9.
*
......@@ -128,5 +130,7 @@ public interface StoreRangeService {
* @date 2022-06-01 10:34:17
*/
List<String> listStoreGroupIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId);
List<String> listStoreIdByName( String wxEnterpriseId, String enterpriseId, String storeName) ;
}
......@@ -277,4 +277,9 @@ public class StoreRangeServiceImpl implements StoreRangeService {
public List<String> listStoreGroupIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId) {
return tabHaobanStoreRelationMapper.listStoreGroupIdByWxEnterpriseId(wxEnterpriseId,enterpriseId);
}
@Override
public List<String> listStoreIdByName(String wxEnterpriseId, String enterpriseId, String storeName) {
return tabHaobanStoreRelationMapper.listStoreIdByName(wxEnterpriseId,enterpriseId,storeName);
}
}
......@@ -663,4 +663,12 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
public List<StoreOrGroupInfoDTO> queryBindStoreRange(String enterpriseId, String wxEnterpriseId) {
return this.storeRangeService.queryBindStoreRange(enterpriseId, wxEnterpriseId);
}
@Override
public List<String> listStoreIdByName(String wxEnterpriseId, String enterpriseId, String storeName) {
if(StringUtils.isAnyBlank(wxEnterpriseId,enterpriseId,storeName)) {
return null ;
}
return this.storeRangeService.listStoreIdByName(enterpriseId, wxEnterpriseId,storeName);
}
}
......@@ -22,75 +22,8 @@
from tab_haoban_store_relation
where store_relation_id = #{storeRelationId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from tab_haoban_store_relation
where store_relation_id = #{storeRelationId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabStoreRelation">
insert into tab_haoban_store_relation (store_relation_id, wx_enterprise_id,
store_id, store_group_id, enterprise_id,
status_flag, create_time, update_time)
values (#{storeRelationId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{storeId,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRelation">
insert into tab_haoban_store_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storeRelationId != null">
store_relation_id,
</if>
<if test="wxEnterpriseId != null">
wx_enterprise_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="statusFlag != null">
status_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storeRelationId != null">
#{storeRelationId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="insertBatch">
insert into tab_haoban_store_relation (store_relation_id, wx_enterprise_id,
store_id,store_name, store_group_id, enterprise_id,
......@@ -105,45 +38,7 @@
)
</foreach>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabStoreRelation">
update tab_haoban_store_relation
<set>
<if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where store_relation_id = #{storeRelationId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabStoreRelation">
update tab_haoban_store_relation
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_relation_id = #{storeRelationId,jdbcType=VARCHAR}
</update>
<update id="deleteStoreRalation">
update tab_haoban_store_relation
set status_flag = 0,
......@@ -185,14 +80,6 @@
and status_flag=1
</select>
<update id="deleteAllStoreRalation">
update tab_haoban_store_relation
set status_flag = 0,
update_time = now()
where enterprise_id = #{enterpriseId}
and status_flag = 1
</update>
<update id="deleteStoreRalationByStoreIds">
update tab_haoban_store_relation
set
......@@ -231,4 +118,13 @@
and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and status_flag = 1 group by store_group_id
</select>
<select id="listStoreIdByName" resultType="String">
select store_id
from tab_haoban_store_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and store_name like '%${storeName}%'
and status_flag = 1
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment