SystemGoldSettingInnerServiceSMOImpl.java 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package com.java110.acct.smo.impl;
  2. import com.java110.acct.dao.ISystemGoldSettingServiceDao;
  3. import com.java110.intf.acct.ISystemGoldSettingInnerServiceSMO;
  4. import com.java110.dto.systemGoldSetting.SystemGoldSettingDto;
  5. import com.java110.po.systemGoldSetting.SystemGoldSettingPo;
  6. import com.java110.utils.util.BeanConvertUtil;
  7. import com.java110.core.base.smo.BaseServiceSMO;
  8. import com.java110.dto.user.UserDto;
  9. import com.java110.dto.PageDto;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RestController;
  13. import java.util.ArrayList;
  14. import java.util.List;
  15. /**
  16. * @ClassName FloorInnerServiceSMOImpl
  17. * @Description 金币设置内部服务实现类
  18. * @Author wuxw
  19. * @Date 2019/4/24 9:20
  20. * @Version 1.0
  21. * add by wuxw 2019/4/24
  22. **/
  23. @RestController
  24. public class SystemGoldSettingInnerServiceSMOImpl extends BaseServiceSMO implements ISystemGoldSettingInnerServiceSMO {
  25. @Autowired
  26. private ISystemGoldSettingServiceDao systemGoldSettingServiceDaoImpl;
  27. @Override
  28. public int saveSystemGoldSetting(@RequestBody SystemGoldSettingPo systemGoldSettingPo) {
  29. int saveFlag = 1;
  30. systemGoldSettingServiceDaoImpl.saveSystemGoldSettingInfo(BeanConvertUtil.beanCovertMap(systemGoldSettingPo));
  31. return saveFlag;
  32. }
  33. @Override
  34. public int updateSystemGoldSetting(@RequestBody SystemGoldSettingPo systemGoldSettingPo) {
  35. int saveFlag = 1;
  36. systemGoldSettingServiceDaoImpl.updateSystemGoldSettingInfo(BeanConvertUtil.beanCovertMap(systemGoldSettingPo));
  37. return saveFlag;
  38. }
  39. @Override
  40. public int deleteSystemGoldSetting(@RequestBody SystemGoldSettingPo systemGoldSettingPo) {
  41. int saveFlag = 1;
  42. systemGoldSettingPo.setStatusCd("1");
  43. systemGoldSettingServiceDaoImpl.updateSystemGoldSettingInfo(BeanConvertUtil.beanCovertMap(systemGoldSettingPo));
  44. return saveFlag;
  45. }
  46. @Override
  47. public List<SystemGoldSettingDto> querySystemGoldSettings(@RequestBody SystemGoldSettingDto systemGoldSettingDto) {
  48. //校验是否传了 分页信息
  49. int page = systemGoldSettingDto.getPage();
  50. if (page != PageDto.DEFAULT_PAGE) {
  51. systemGoldSettingDto.setPage((page - 1) * systemGoldSettingDto.getRow());
  52. }
  53. List<SystemGoldSettingDto> systemGoldSettings = BeanConvertUtil.covertBeanList(systemGoldSettingServiceDaoImpl.getSystemGoldSettingInfo(BeanConvertUtil.beanCovertMap(systemGoldSettingDto)), SystemGoldSettingDto.class);
  54. return systemGoldSettings;
  55. }
  56. @Override
  57. public int querySystemGoldSettingsCount(@RequestBody SystemGoldSettingDto systemGoldSettingDto) {
  58. return systemGoldSettingServiceDaoImpl.querySystemGoldSettingsCount(BeanConvertUtil.beanCovertMap(systemGoldSettingDto)); }
  59. public ISystemGoldSettingServiceDao getSystemGoldSettingServiceDaoImpl() {
  60. return systemGoldSettingServiceDaoImpl;
  61. }
  62. public void setSystemGoldSettingServiceDaoImpl(ISystemGoldSettingServiceDao systemGoldSettingServiceDaoImpl) {
  63. this.systemGoldSettingServiceDaoImpl = systemGoldSettingServiceDaoImpl;
  64. }
  65. }