...
|
...
|
@@ -22,7 +22,9 @@ import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
import java.lang.reflect.Method;
|
|
|
import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
public class DepositController {
|
...
|
...
|
@@ -149,4 +151,55 @@ public class DepositController { |
|
|
depositService.clearCacheByDepositCode(uid, depositCode);
|
|
|
return new ApiResponse(200, "缓存清除成功!", Boolean.TRUE);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 仓库管理详情,几个尺码 几个库存接口
|
|
|
* @param uid
|
|
|
* @param productId
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.deposit.queryUserDopositProduct")
|
|
|
@Cachable(expire = 180, pageArgs = {2,3})
|
|
|
public ApiResponse queryUserDopositingEx(@RequestParam("uid") Integer uid , @RequestParam("productId") Integer productId) {
|
|
|
LOG.info("method queryUserDopositingEx in, uid is {}, productId is {}", uid, productId);
|
|
|
DepositProductBo countBo = depositService.queryUserDepositProductCountInfo(uid, productId);
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("product", countBo);
|
|
|
LOG.info("end queryUserDopositingEx uid is {}, productId is {} result: {}", uid, productId, result);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询 到期和不到期的 库存
|
|
|
* @param uid
|
|
|
* @param productId
|
|
|
* @param page
|
|
|
* @param limit
|
|
|
* @param sort
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.deposit.queryUserDopositingSort")
|
|
|
@Cachable(expire = 180, pageArgs = {2,3})
|
|
|
public ApiResponse queryUserDopositingSort(@RequestParam("uid") Integer uid
|
|
|
, @RequestParam("productId") Integer productId
|
|
|
, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page
|
|
|
, @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit,
|
|
|
@RequestParam(value = "sort") Integer sort ) {
|
|
|
if (uid == null || uid < 1) {
|
|
|
LOG.warn("queryUserDopositing failed, invalid uid: {}", uid);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(500).message("查询失败").build();
|
|
|
}
|
|
|
if (productId == null || productId < 1) {
|
|
|
LOG.warn("queryUserDopositing failed, invalid productId: {}", productId);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(500).message("查询失败").build();
|
|
|
}
|
|
|
|
|
|
PageResp<List<DepositDetailBo>> depositDetailBoList = depositService.queryUserProductDopositingDetail(uid, productId, page, limit);
|
|
|
DepositProductBo countBo = depositService.queryUserDepositProductCountInfo(uid, productId);
|
|
|
JSONObject result = new JSONObject();
|
|
|
result.put("product", countBo);
|
|
|
result.put("items", depositDetailBoList);
|
|
|
LOG.info("queryUserDopositing result: {}", result);
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
|
|
|
}
|
|
|
} |
...
|
...
|
|