xin
2025-06-24 3e5c32288447da14ad6032aeb5bf5f79fa9a0560
oying-system/src/main/java/com/oying/modules/system/rest/UserMerchantController.java
@@ -4,18 +4,22 @@
import com.oying.modules.system.domain.UserMerchant;
import com.oying.modules.system.service.UserMerchantService;
import com.oying.modules.system.domain.dto.UserMerchantQueryCriteria;
import com.oying.utils.R;
import lombok.RequiredArgsConstructor;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.oying.utils.PageResult;
/**
* @author lixin
@@ -39,9 +43,9 @@
    @GetMapping
    @ApiOperation("查询商户管理员信息")
    @PreAuthorize("@el.check('userMerchant:list')")
    public ResponseEntity<PageResult<UserMerchant>> queryUserMerchant(UserMerchantQueryCriteria criteria){
    public ResponseEntity<Object> queryUserMerchant(UserMerchantQueryCriteria criteria) {
        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
        return new ResponseEntity<>(userMerchantService.queryAll(criteria,page),HttpStatus.OK);
        return new ResponseEntity<>(R.success(userMerchantService.queryAll(criteria, page)), HttpStatus.OK);
    }
    @PostMapping
@@ -50,7 +54,7 @@
    @PreAuthorize("@el.check('userMerchant:add')")
    public ResponseEntity<Object> createUserMerchant(@Validated @RequestBody UserMerchant resources){
        userMerchantService.create(resources);
        return new ResponseEntity<>(HttpStatus.CREATED);
        return new ResponseEntity<>(R.success(), HttpStatus.CREATED);
    }
    @PutMapping
@@ -59,7 +63,7 @@
    @PreAuthorize("@el.check('userMerchant:edit')")
    public ResponseEntity<Object> updateUserMerchant(@Validated @RequestBody UserMerchant resources){
        userMerchantService.update(resources);
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
        return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT);
    }
    @DeleteMapping
@@ -68,6 +72,6 @@
    @PreAuthorize("@el.check('userMerchant:del')")
    public ResponseEntity<Object> deleteUserMerchant(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
        userMerchantService.deleteAll(ids);
        return new ResponseEntity<>(HttpStatus.OK);
        return new ResponseEntity<>(R.success(), HttpStatus.OK);
    }
}