jyy
2021-06-19 756e16e090b15c7fd8648f55f5451367face6abc
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
49
50
51
52
53
54
55
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);
 
    }
 
 
}