wuxw
2024-09-13 56a39056eda041711e3a013c6f8da68b41d5249c
优化代码
1个文件已修改
9 ■■■■■ 已修改文件
service-common/src/main/java/com/java110/common/bmo/mall/impl/GetCommunitysImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-common/src/main/java/com/java110/common/bmo/mall/impl/GetCommunitysImpl.java
@@ -10,6 +10,7 @@
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.ListUtil;
import com.java110.vo.ResultVo;
import com.java110.vo.api.community.ApiCommunityDataVo;
import com.java110.vo.api.community.ApiCommunityVo;
import org.springframework.beans.factory.annotation.Autowired;
@@ -56,11 +57,9 @@
        } else {
            communitys = new ArrayList<>();
        }
        ApiCommunityVo apiCommunityVo = new ApiCommunityVo();
        apiCommunityVo.setTotal(count);
        apiCommunityVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
        apiCommunityVo.setCommunitys(communitys);
        ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiCommunityVo), HttpStatus.OK);
        ResponseEntity<String> responseEntity =ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) reqJson.getInteger("row")),
                count, communitys);
        context.setResponseEntity(responseEntity);
    }