package com.matrix.system.common.service.impl; import com.matrix.core.constance.MatrixConstance; import com.matrix.system.common.bean.SysCompany; import com.matrix.system.common.bean.SysRole; import com.matrix.system.common.dao.SysRoleDao; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.bean.SysGoodsType; import com.matrix.system.hive.bean.SysShopInfo; import com.matrix.system.hive.dao.SysGoodsTypeDao; import com.matrix.system.hive.dao.SysShopInfoDao; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Arrays; @Service public class InitGoodsTypeService { @Autowired private SysGoodsTypeDao sysGoodsTypeDao; /** * 初始化默认确实和权限 * @param sysCompany */ public void initRolePower(SysCompany sysCompany) { SysGoodsType type1=new SysGoodsType(); type1.setCompanyId(sysCompany.getComId()); type1.setParentId(0L); type1.setTypeName("物料"); SysGoodsType type2=new SysGoodsType(); BeanUtils.copyProperties(type1,type2); type2.setTypeName("院装产品"); SysGoodsType type3=new SysGoodsType(); BeanUtils.copyProperties(type1,type3); type3.setTypeName("家居产品"); sysGoodsTypeDao.insert(type1); sysGoodsTypeDao.insert(type2); sysGoodsTypeDao.insert(type3); } }