Commit 65ef6181 by zhiwj

批量导入

parent 3cd1126c
......@@ -58,5 +58,7 @@ public interface TabStoreTmpMapper {
void delStoreTmp(@Param("enterpriseId") Integer enterpriseId);
List<TabStoreTmp> listStoreTmp(@Param("enterpriseId") Integer enterpriseId, @Param("isSuccess") Boolean isSuccess, @Param("isWait") Boolean isWait);
List<TabStoreTmp> listStoreTmp(@Param("enterpriseId") Integer enterpriseId, @Param("isSuccess") Boolean isSuccess);
List<TabStoreTmp> listUnImportStore(@Param("enterpriseId") Integer enterpriseId);
}
\ No newline at end of file
......@@ -43,12 +43,12 @@ public class StoreImportServiceImpl implements StoreImportService {
@Override
public Page listStoreTmp(Integer enterpriseId, boolean isSuccess, Integer currentPage, Integer pageSize) {
PageHelper.startPage(currentPage, pageSize);
return (Page) tabStoreTmpMapper.listStoreTmp(enterpriseId, isSuccess, null);
return (Page) tabStoreTmpMapper.listStoreTmp(enterpriseId, isSuccess);
}
@Override
public List<TabStoreTmp> listUnImportStore(String enterpriseId) {
return tabStoreTmpMapper.listStoreTmp(Integer.parseInt(enterpriseId), null, true);
return tabStoreTmpMapper.listUnImportStore(Integer.parseInt(enterpriseId));
}
@Override
......
......@@ -327,14 +327,18 @@
<include refid="Base_Column_List" />
from tab_store_tmp
where enterprise_id = #{enterpriseId}
<if test="isSuccess != null and isSuccess">
<if test="isSuccess != null and isSuccess == true ">
and error_message = 'success'
</if>
<if test="isSuccess != null and !isSuccess">
<if test="isSuccess != null and isSuccess == false ">
and error_message &lt;&gt; 'success' and error_message &lt;&gt; 'wait'
</if>
<if test="isWait != null and isWait">
and error_message = 'wait'
</if>
</select>
<select id="listUnImportStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_store_tmp
where enterprise_id = #{enterpriseId}
and error_message = 'wait'
</select>
</mapper>
\ No newline at end of file
......@@ -59,7 +59,7 @@ public class StoreImportController {
if (StringUtils.isBlank(regionIdStr)) {
return RestResponse.failure(ErrorCode.ERR_5.getCode(), "请选择门店域");
}
Integer enterpriseId = 10000;
Integer enterpriseId = 1111;
List<List<String>> list = new ArrayList<>();
ServiceResponse<List<List<String>>> titleServiceResponse = storeApiService.listImportTitle(enterpriseId, Integer.parseInt(regionIdStr));
......@@ -140,7 +140,7 @@ public class StoreImportController {
}
try {
if (!storeImportApiService.hasImportingStore(enterpriseId).getResult()) {
if (storeImportApiService.hasImportingStore(enterpriseId).getResult()) {
// TODO userId
String r = storeImportApiService.importDataToStore(enterpriseId, "123", uuId).getResult();
if (StringUtils.isNotBlank(r)) {
......
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