feat(): 更改信息
parent
62efa5e9de
commit
0a5e8071d1
|
@ -79,6 +79,9 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
/**
|
||||||
|
* 首页
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,7 +48,6 @@ public class ActivityTeamInfoAddModel {
|
||||||
/**
|
/**
|
||||||
* 轮播图
|
* 轮播图
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String imageList;
|
private String imageList;
|
||||||
/**
|
/**
|
||||||
* 活动结束时间
|
* 活动结束时间
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ActivityTeamInfoReq extends ActivityTeamInfo {
|
||||||
|
private Integer pageNum=1;
|
||||||
|
private Integer pageSize=2;
|
||||||
|
}
|
|
@ -75,4 +75,5 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ public class TeamInfoListReq extends PageDomain {
|
||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过当前对象构建业务查询模型
|
* 通过当前对象构建业务查询模型
|
||||||
* @return 业务查询模型
|
* @return 业务查询模型
|
||||||
|
|
|
@ -1,26 +1,30 @@
|
||||||
package com.muyu.marketing.team.controller;
|
package com.muyu.marketing.team.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoModel;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamProductReq;
|
|
||||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||||
import com.muyu.marketing.domain.resp.ActivityTeamInfoDatailResp;
|
|
||||||
import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 营销团购活动控制层
|
* 营销团购活动控制层
|
||||||
*
|
*
|
||||||
* @author
|
* @author DongZeLiang
|
||||||
* @date 2024-11-20 14:25
|
* @date 2024-11-20 14:25
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -28,7 +32,7 @@ import java.util.List;
|
||||||
public class ActivityTeamController {
|
public class ActivityTeamController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamInfoService activityTeamInfoService;
|
private ActivityTeamInfoService activityTeamInfoService;;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询营销团购活动列表
|
* 查询营销团购活动列表
|
||||||
|
@ -53,31 +57,23 @@ public class ActivityTeamController {
|
||||||
* @param activityTeamInfoSaveReq 添加请求对象
|
* @param activityTeamInfoSaveReq 添加请求对象
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping("/add")
|
||||||
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
||||||
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据活动Id查询信息
|
* 查询营销团购活动列表分页
|
||||||
* @param
|
* @param activityTeamInfo 添加请求对象
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{id}")
|
@PostMapping("/listTeam")
|
||||||
public Result<ActivityTeamInfoDatailResp> findById(@PathVariable Long id) {
|
public Result listTeam(@RequestBody ActivityTeamInfoReq activityTeamInfo){
|
||||||
ActivityTeamInfoDatailResp activityById = activityTeamInfoService.findActivityById(id);
|
PageHelper.startPage(activityTeamInfo.getPageNum(),activityTeamInfo.getPageSize());
|
||||||
return Result.success(activityById);
|
List<ActivityTeamInfo> list = activityTeamInfoService.list();
|
||||||
}
|
PageInfo<ActivityTeamInfo> activityTeamInfoPageInfo = new PageInfo<>(list);
|
||||||
|
return Result.success(activityTeamInfoPageInfo);
|
||||||
/**
|
|
||||||
* 根据修改
|
|
||||||
*/
|
|
||||||
@PostMapping("/update")
|
|
||||||
public Result<ActivityTeamProductReq> updDate(@RequestBody ActivityTeamProductReq activityTeamProductReq){
|
|
||||||
ActivityTeamInfoModel activityTeamInfoModel = ActivityTeamInfoModel.activityTeamBuilder(activityTeamProductReq);
|
|
||||||
activityTeamInfoService.bateUpdate(activityTeamInfoModel);
|
|
||||||
return Result.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.muyu.marketing.team.service.impl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
|
Loading…
Reference in New Issue