活动 传参 shopId
This commit is contained in:
parent
7aa726d0a0
commit
0c8a998006
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 店铺充值活动管理
|
||||
*
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
|
|
@ -29,8 +30,8 @@ public class ShopActivateController {
|
|||
*/
|
||||
@SaAdminCheckPermission("activate:list")
|
||||
@GetMapping
|
||||
public CzgResult<List<ShopActivateDTO>> detail() {
|
||||
return CzgResult.success(shopActivateService.getList());
|
||||
public CzgResult<List<ShopActivateDTO>> detail(@RequestParam(required = false) Long shopId) {
|
||||
return CzgResult.success(shopActivateService.getList(shopId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.czg.resp.CzgResult;
|
|||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -25,8 +26,8 @@ public class UserShopActivateController {
|
|||
* 店铺充值活动列表
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<List<ShopActivateDTO>> detail() {
|
||||
return CzgResult.success(shopActivateService.getList());
|
||||
public CzgResult<List<ShopActivateDTO>> detail(@RequestParam(required = false) Long shopId) {
|
||||
return CzgResult.success(shopActivateService.getList(shopId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface ShopActivateService extends IService<ShopActivate> {
|
||||
|
||||
List<ShopActivateDTO> getList();
|
||||
List<ShopActivateDTO> getList(Long shopId);
|
||||
|
||||
Boolean add(ShopActivateDTO activateDTO);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ public class ShopActivateServiceImpl extends ServiceImpl<ShopActivateMapper, Sho
|
|||
private ShopUserService shopUserService;
|
||||
|
||||
@Override
|
||||
public List<ShopActivateDTO> getList() {
|
||||
public List<ShopActivateDTO> getList(Long shopId) {
|
||||
List<ShopActivateDTO> activateDtoS = queryChain().select()
|
||||
.eq(ShopActivate::getShopId, StpKit.USER.getShopId())
|
||||
.eq(ShopActivate::getShopId, shopId == null ? StpKit.USER.getShopId() : shopId)
|
||||
.orderBy(ShopActivate::getAmount, true)
|
||||
.listAs(ShopActivateDTO.class);
|
||||
for (ShopActivateDTO activateDTO : activateDtoS) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue