Your Name
2023-04-23 d526cf637048d71f046667f26e76436e9d489861
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.java110.fee.smo.impl;
 
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.dto.PageDto;
import com.java110.dto.fee.FeeAccountDetailDto;
import com.java110.fee.dao.IFeeAccountDetailServiceDao;
import com.java110.intf.fee.IFeeAccountDetailServiceSMO;
import com.java110.po.feeAccountDetail.FeeAccountDetailPo;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@RestController
public class FeeAccountDetailServiceSMOImpl extends BaseServiceSMO implements IFeeAccountDetailServiceSMO {
 
    @Autowired
    private IFeeAccountDetailServiceDao feeAccountDetailServiceDaoImpl;
 
    @Override
    public List<FeeAccountDetailDto> queryFeeAccountDetails(@RequestBody FeeAccountDetailDto feeAccountDetailDto) {
        //校验是否传了 分页信息
 
        int page = feeAccountDetailDto.getPage();
 
        if (page != PageDto.DEFAULT_PAGE) {
            feeAccountDetailDto.setPage((page - 1) * feeAccountDetailDto.getRow());
        }
 
        List<FeeAccountDetailDto> feeAccountDetails = BeanConvertUtil.covertBeanList(feeAccountDetailServiceDaoImpl.getFeeAccountDetailsInfo(BeanConvertUtil.beanCovertMap(feeAccountDetailDto)), FeeAccountDetailDto.class);
 
        return feeAccountDetails;
    }
 
    @Override
    public int queryFeeAccountDetailsCount(@RequestBody FeeAccountDetailDto feeAccountDetailDto) {
        return feeAccountDetailServiceDaoImpl.queryFeeAccountDetailsCount(BeanConvertUtil.beanCovertMap(feeAccountDetailDto));
    }
 
    @Override
    public int saveFeeAccountDetail(@RequestBody FeeAccountDetailPo feeAccountDetailPo) {
        feeAccountDetailServiceDaoImpl.saveFeeAccountDetail(BeanConvertUtil.beanCovertMap(feeAccountDetailPo));
        return 1;
    }
 
}