铺货历史

20230922-ljl-fixBug
cxxxxxxx详 1 year ago
parent 92b2aef561
commit 0f20d14a8d

@ -5,8 +5,8 @@ curl --location --request POST 'localhost:8080/base/cloud/spi' \
--data-raw '{
"appId":"7264840234423027259",
"authId":"4463798",
"method":"searchDSProductCatTree",
"data":"{}"
"method":"getMoveHistoryProductList",
"data":"{\"status\":\"processing\",\"pageSize\":20,\"pageNo\":1}"
}'

@ -1,7 +1,9 @@
package com.ms.api.service;
import com.ms.api.common.Pager;
import com.ms.api.common.Ret;
import com.ms.api.common.StrObjMap;
import com.ms.api.dto.move.GetMoveHistoryProductListRequestDTO;
import com.ms.dal.entity.MoveCollectTaskDetail;
/**
@ -24,4 +26,6 @@ public interface MoveCollectTaskDetailService {
MoveCollectTaskDetail getMoveCollectTaskDetail(long shopId, long moveCollectTaskDetailId) ;
Ret updateMoveCollectTaskDetail(StrObjMap updateData, long shopId, Long moveCollectTaskDetailId);
Pager<MoveCollectTaskDetail> getMoveCollectTaskList(GetMoveHistoryProductListRequestDTO condition);
}

@ -24,6 +24,4 @@ public interface MoveCollectTaskService {
int updateByPrimaryKey(MoveCollectTask record);
MoveCollectTask getMoveCollectTask(long moveCollectTaskId, long shopId);
Pager<MoveCollectTask> getMoveCollectTaskList(GetMoveHistoryProductListRequestDTO condition);
}

@ -1,7 +1,9 @@
package com.ms.api.service.impl;
import com.ms.api.common.Pager;
import com.ms.api.common.Ret;
import com.ms.api.common.StrObjMap;
import com.ms.api.dto.move.GetMoveHistoryProductListRequestDTO;
import com.ms.api.tool.CommonTool;
import com.ms.dal.entity.MoveCollectTaskDetail;
import com.ms.api.service.MoveCollectTaskDetailService;
@ -9,11 +11,14 @@ import com.ms.dal.mapper.MoveCollectTaskDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
*/
@Service
public class MoveCollectTaskDetailServiceImpl implements MoveCollectTaskDetailService{
@Autowired
@ -64,6 +69,18 @@ public class MoveCollectTaskDetailServiceImpl implements MoveCollectTaskDetailSe
return null;
}
@Override
public Pager<MoveCollectTaskDetail> getMoveCollectTaskList(GetMoveHistoryProductListRequestDTO condition) {
List<MoveCollectTaskDetail> list = moveCollectTaskDetailMapper.getMoveCollectTaskList(condition.getShopId(), condition.getStatus(), condition.getPageStart(), condition.getPageSize());
Integer count = moveCollectTaskDetailMapper.getMoveCollectTaskCount(condition.getShopId(), condition.getStatus());
Pager<MoveCollectTaskDetail> pager = new Pager<>();
pager.setTotal(count);
pager.setData(list);
pager.setPage(condition.getPage());
pager.setPageSize(condition.getPageSize());
return pager;
}
}

@ -61,18 +61,6 @@ public class MoveCollectTaskServiceImpl implements MoveCollectTaskService{
//return $this->db->query("select * from move_collect_task_detail where shop_id = %i and move_collect_task_detail_id in %li", $shopId, $detailIds);
return null;
}
@Override
public Pager<MoveCollectTask> getMoveCollectTaskList(GetMoveHistoryProductListRequestDTO condition) {
List<MoveCollectTask> list = moveCollectTaskMapper.getMoveCollectTaskList(condition.getShopId(), condition.getStatus(), condition.getPageStart(), condition.getPageSize());
Integer count = moveCollectTaskMapper.getMoveCollectTaskCount(condition.getShopId(), condition.getStatus());
Pager<MoveCollectTask> pager = new Pager<>();
pager.setTotal(count);
pager.setData(list);
pager.setPage(condition.getPage());
pager.setPageSize(condition.getPageSize());
return pager;
}
}

@ -11,13 +11,18 @@ import com.ms.api.common.SPIBaseService;
import com.ms.api.dto.move.GetMoveHistoryProductListRequestDTO;
import com.ms.api.dto.move.SearchMoveProductItemRequestDTO;
import com.ms.api.service.MicroMoveProductItemService;
import com.ms.api.service.MoveCollectTaskDetailService;
import com.ms.api.service.MoveCollectTaskService;
import com.ms.api.tool.DsJsonRequestTemplate;
import com.ms.dal.entity.MicroMoveProductItem;
import com.ms.dal.entity.MoveCollectTask;
import com.ms.dal.entity.MoveCollectTaskDetail;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
*
*
@ -26,7 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
public class GetMoveHistoryProductListService extends SPIBaseService implements ExtensionServiceHandler<GetMoveHistoryProductListRequestDTO, Ret> {
@Autowired
private MoveCollectTaskService moveCollectTaskService;
private MoveCollectTaskDetailService moveCollectTaskDetailService;
@Override
public BaseResponse<Ret> handle(BaseRequest<GetMoveHistoryProductListRequestDTO> req) {
initHandle(req);
@ -40,9 +45,14 @@ public class GetMoveHistoryProductListService extends SPIBaseService implements
condition.setPage(fields.getPage());
condition.setPageSize(fields.getPageSize());
condition.setShopId(shopId);
Pager<MoveCollectTask> moveCollectTaskPager = moveCollectTaskService.getMoveCollectTaskList(condition);
Pager<MoveCollectTaskDetail> moveCollectTaskPager = moveCollectTaskDetailService.getMoveCollectTaskList(condition);
Map<String, Object> result = new HashMap<>();
result.put("taskDetailList", moveCollectTaskPager.getData());
result.put("taskTotal", moveCollectTaskPager.getTotal());
result.put("page", moveCollectTaskPager.getPage());
result.put("pageSize", moveCollectTaskPager.getPageSize());
// ----结果返回----
return R.ok(Ret.success(moveCollectTaskPager.toMap()));
return R.ok(Ret.success(result));
}
}

@ -3,6 +3,8 @@ package com.ms.dal.mapper;
import com.ms.dal.entity.MoveCollectTaskDetail;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Entity com.ms.dal.entity.MoveCollectTaskDetail
*/
@ -21,4 +23,7 @@ public interface MoveCollectTaskDetailMapper {
int updateByPrimaryKey(MoveCollectTaskDetail record);
List<MoveCollectTaskDetail> getMoveCollectTaskList(Long shopId, String status, Integer page, Integer pageSize);
Integer getMoveCollectTaskCount(Long shopId, String status);
}

@ -22,8 +22,4 @@ public interface MoveCollectTaskMapper {
int updateByPrimaryKeySelective(MoveCollectTask record);
int updateByPrimaryKey(MoveCollectTask record);
List<MoveCollectTask> getMoveCollectTaskList(Long shopId, String status, Integer page, Integer pageSize);
Integer getMoveCollectTaskCount(Long shopId, String status);
}

@ -223,4 +223,23 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where move_collect_task_detail_id = #{moveCollectTaskDetailId,jdbcType=BIGINT}
</update>
<select id="getMoveCollectTaskList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from move_collect_task_detail
where shop_id = #{shopId}
<if test="status != null and status!='' ">
and status = #{status}
</if>
order by move_collect_task_detail_id desc
limit #{page},#{pageSize}
</select>
<select id="getMoveCollectTaskCount" resultType="java.lang.Integer">
select COUNT(move_collect_task_detail_id)
from move_collect_task_detail
where shop_id = #{shopId}
<if test="status != null and status!='' ">
and status = #{status}
</if>
</select>
</mapper>

@ -127,24 +127,4 @@
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where move_collect_task_id = #{moveCollectTaskId,jdbcType=INTEGER}
</update>
<select id="getMoveCollectTaskList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from move_collect_task
where shop_id = #{shopId}
<if test="status != null and status!='' ">
and status = #{status}
</if>
order by move_collect_task_detail_id desc
limit #{page},#{pageSize}
</select>
<select id="getMoveCollectTaskCount" resultType="java.lang.Integer">
select COUNT(move_collect_task_detail_id)
from move_collect_task
where shop_id = #{shopId}
<if test="status != null and status!='' ">
and status = #{status}
</if>
</select>
</mapper>

Loading…
Cancel
Save