fix 商户数据创建时间
This commit is contained in:
parent
b96cf66a3e
commit
038562f5e4
|
|
@ -116,7 +116,7 @@ public class StoreQuery extends CommonParam {
|
||||||
*/
|
*/
|
||||||
@Condition(name = "create_time", type = Condition.ConditionType.between, tableName = "s")
|
@Condition(name = "create_time", type = Condition.ConditionType.between, tableName = "s")
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private List<LocalDateTime> createTime;
|
private List<String> createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户信息表(st_store)表控制层
|
* 商户信息表(st_store)表控制层
|
||||||
|
|
@ -47,8 +48,19 @@ public class StoreController {
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@RequiresPermissions("ins:store:page")
|
@RequiresPermissions("ins:store:page")
|
||||||
public AjaxResult pageList(@Validated StoreQuery query) {
|
public AjaxResult pageList(@Validated StoreQuery query) {
|
||||||
|
List<String> createTimes = query.getCreateTime();
|
||||||
|
query.setCreateTime(extendTimeRange(createTimes, " 00:00:00", " 23:59:59"));
|
||||||
return AjaxResult.success(storeService.pageList(query));
|
return AjaxResult.success(storeService.pageList(query));
|
||||||
}
|
}
|
||||||
|
private List<String> extendTimeRange(List<String> timeList, String prefix, String suffix) {
|
||||||
|
if (timeList != null && timeList.size() >= 2) {
|
||||||
|
String startTime = timeList.get(0) + prefix;
|
||||||
|
String endTime = timeList.get(1) + suffix;
|
||||||
|
timeList.set(0, startTime);
|
||||||
|
timeList.set(1, endTime);
|
||||||
|
}
|
||||||
|
return timeList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改商户
|
* 修改商户
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue