|
|
@@ -77,16 +77,16 @@ public class CpsPopularizeController {
|
|
|
* 渠道推广链接列表
|
|
|
*/
|
|
|
@GetMapping("/get")
|
|
|
- public Result<SearchResult<UserDistributePopularizeView>> getList(String start, String end) {
|
|
|
+ public Result<SearchResult<UserDistributePopularizeView>> getList(String startTime, String endTime) {
|
|
|
long cpsUserId = StpCpsManageUser.getLoginIdAsLong();
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
builder.put("userId", String.format("and user_id = %s", cpsUserId));
|
|
|
String time = null;
|
|
|
- if (start != null) {
|
|
|
- time += String.format(" and od.created_time >= '%s'", start);
|
|
|
+ if (startTime != null) {
|
|
|
+ time += String.format(" and od.created_time >= '%s'", startTime);
|
|
|
}
|
|
|
- if (end != null) {
|
|
|
- time += String.format(" and od.created_time < '%s'", end);
|
|
|
+ if (endTime != null) {
|
|
|
+ time += String.format(" and od.created_time < '%s'", endTime);
|
|
|
}
|
|
|
if (StrUtil.isNotBlank(time)) {
|
|
|
builder.put("time", time);
|
|
|
@@ -107,10 +107,10 @@ public class CpsPopularizeController {
|
|
|
* 默认链接详情
|
|
|
*/
|
|
|
@GetMapping("/get/default")
|
|
|
- public Result<UserDistributePopularizeView> getDefaultDetail(String start, String end) {
|
|
|
+ public Result<UserDistributePopularizeView> getDefaultDetail(String startTime, String endTime) {
|
|
|
long cpsUserId = StpCpsManageUser.getLoginIdAsLong();
|
|
|
User user = userService.getById(cpsUserId);
|
|
|
- UserDistributePopularizeView view = Optional.ofNullable(cpsPopularizeService.getDefaultPopularizeDetail(cpsUserId, start, end)).orElseGet(() -> {
|
|
|
+ UserDistributePopularizeView view = Optional.ofNullable(cpsPopularizeService.getDefaultPopularizeDetail(cpsUserId, startTime, endTime)).orElseGet(() -> {
|
|
|
UserDistributePopularizeView newPopularizeView = new UserDistributePopularizeView();
|
|
|
newPopularizeView.setOrders(0);
|
|
|
newPopularizeView.setOrdersMoney(BigDecimal.ZERO);
|
|
|
@@ -202,7 +202,7 @@ public class CpsPopularizeController {
|
|
|
* 推广平台海报列表
|
|
|
*/
|
|
|
@GetMapping("/get/ds/poster/goods")
|
|
|
- public Result<List<DistributePosterGoodsCpsView>> getPosterGoods(String start, String end) {
|
|
|
+ public Result<List<DistributePosterGoodsCpsView>> getPosterGoods(String startTime, String endTime) {
|
|
|
long cpsUserId = StpCpsManageUser.getLoginIdAsLong();
|
|
|
UserDistribute userDistribute = userDistributeMapper.selectOne(Wrappers.lambdaQuery(UserDistribute.class)
|
|
|
.eq(UserDistribute::getUserId, cpsUserId)
|
|
|
@@ -210,11 +210,11 @@ public class CpsPopularizeController {
|
|
|
.last("limit 1"));
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
StringBuilder time = new StringBuilder();
|
|
|
- if (start != null) {
|
|
|
- time.append(String.format(" and od.created_time >= '%s'", start));
|
|
|
+ if (startTime != null) {
|
|
|
+ time.append(String.format(" and od.created_time >= '%s'", startTime));
|
|
|
}
|
|
|
- if (end != null) {
|
|
|
- time.append(String.format(" and od.created_time < '%s'", end));
|
|
|
+ if (endTime != null) {
|
|
|
+ time.append(String.format(" and od.created_time < '%s'", endTime));
|
|
|
}
|
|
|
List<DistributePosterGoodsCpsView> searchAll = beanSearcher.searchAll(DistributePosterGoodsCpsView.class, builder.build());
|
|
|
searchAll.forEach(e -> {
|