记得上下班打卡 | git大法好,push需谨慎

Commit a8cc61d5 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents a8a2111a 61f83776
......@@ -36,8 +36,8 @@ public class GoblinFrontCubeController extends BaseController {
@PostMapping("list")
@ApiOperation(value = "list")
@ResponseBody
public AjaxResult list() {
return AjaxResult.success(goblinFrontCubeService.listGoblinFrontCubeParam());
public AjaxResult list(@RequestParam(name = "type", required = true) String type) {
return AjaxResult.success(goblinFrontCubeService.listGoblinFrontCubeParam(type));
}
......
package com.liquidnet.client.admin.web.controller.zhengzai.goblin;
import com.github.pagehelper.PageHelper;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinZhengzaiMarketService;
......@@ -38,6 +39,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageNum", value = "页数", example = "1"),
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "pageSize", value = "数量", example = "1"),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "purchaseName", value = "活动名称", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "Integer", name = "status", value = "活动状态[-1-全部|0-等待开始|1-活动中|2-活动结束|7-停用]", example = ""),
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "startTime", value = "活动开始时间", example = ""),
......@@ -45,14 +47,15 @@ public class GoblinSelfZhengzaiController extends BaseController {
@ApiImplicitParam(type = "form", required = false, dataType = "String", name = "createdAt", value = "活动创建时间", example = ""),
})
public TableDataInfo purchasingList(@RequestParam(value = "pageNum", required = false) @Valid Integer page,
@RequestParam(value = "pageSize", required = false) @Valid Integer size,
@RequestParam(value = "purchaseName", required = false) String purchaseName,
@RequestParam(value = "status", required = false) Integer status,
@RequestParam(value = "startTime", required = false) String st,
@RequestParam(value = "endTime", required = false) String et,
@RequestParam(value = "createdAt", required = false) String ct) {
LocalDateTime now = LocalDateTime.now();
List<GoblinSelfMarketingDto> list = goblinZhengzaiMarketService.zhengzaiList(page, purchaseName, status, st, et, ct).getData();
startPage();
PageHelper.startPage(page, size);
List<GoblinSelfMarketingDto> list = goblinZhengzaiMarketService.zhengzaiList(page, size,purchaseName, status, st, et, ct).getData();
for (GoblinSelfMarketingDto item : list) {
if (item.getStatus() != 7) {
if (now.isBefore(item.getStartTime())) {
......
package com.liquidnet.client.admin.zhengzai.goblin.service;
import com.github.pagehelper.PageHelper;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.dto.GoblinSelfMarketingDto;
import com.liquidnet.service.goblin.dto.manage.GoblinInsertZhengzaiParam;
......@@ -27,7 +28,7 @@ public interface IGoblinZhengzaiMarketService {
* @param ct 创建时间
* @return
*/
ResponseDto<List<GoblinSelfMarketingDto>> zhengzaiList(int page, String purchaseName, int status, String st, String et, String ct);
ResponseDto<List<GoblinSelfMarketingDto>> zhengzaiList(int page,int size, String purchaseName, int status, String st, String et, String ct);
/**
* 正在状态操作
......
......@@ -75,9 +75,10 @@ public class GoblinFrontCubeServiceImpl extends ServiceImpl<GoblinFrontCubeMappe
}
return true;
}
public List<GoblinFrontCubeParam> listGoblinFrontCubeParam(){
public List<GoblinFrontCubeParam> listGoblinFrontCubeParam(String type){
LambdaQueryWrapper<GoblinFrontCube> queryWrapper = Wrappers.lambdaQuery(GoblinFrontCube.class);
queryWrapper.ne(GoblinFrontCube::getDelTag,1);
queryWrapper.eq(GoblinFrontCube::getType,type);
List<GoblinFrontCube> list=goblinFrontCubeMapper.selectList(queryWrapper);
List<GoblinFrontCubeParam> list1=new ArrayList<>();
for(GoblinFrontCube goblinFrontCube:list){
......
......@@ -3,6 +3,7 @@ package com.liquidnet.client.admin.zhengzai.goblin.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fasterxml.jackson.core.type.TypeReference;
import com.github.pagehelper.PageHelper;
import com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinZhengzaiMarketService;
import com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinMongoUtils;
import com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils;
......@@ -51,7 +52,7 @@ public class GoblinZhengzaiMarketServiceImpl implements IGoblinZhengzaiMarketSer
GoblinMarketingZhengzaiRelationMapper goblinMarketingZhengzaiRelationMapper;
@Override
public ResponseDto<List<GoblinSelfMarketingDto>> zhengzaiList(int page, String purchaseName, int status, String st, String et, String ct) {
public ResponseDto<List<GoblinSelfMarketingDto>> zhengzaiList(int page,int size, String purchaseName, int status, String st, String et, String ct) {
// LambdaUpdateWrapper<GoblinSelfMarketing> queryMapper = Wrappers.lambdaUpdate(GoblinSelfMarketing.getNew()).eq(GoblinSelfMarketing::getDelFlag, 0);
// switch (status) {
// case 0://未开始
......
......@@ -80,6 +80,7 @@ GROUP BY b.store_id
<if test="status==7">and gsm.status!=7</if>
</where>
group by gsm.self_market_id
order by gsm.created_at desc
</select>
</mapper>
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