| | |
| | | import com.yeshi.fanli.dao.goods.SuperGoodsClassDao;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.bus.su.clazz.SuperGoodsClass;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.goods.SuperGoodsClassService;
|
| | |
|
| | | @Service
|
| | |
| | | private SuperGoodsClassDao superGoodsClassDao;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | | |
| | | |
| | | @Cacheable(value="classCache", key="'getSuperGoodsClassBySystemId-'+#id")
|
| | | public List<SuperGoodsClass> getSuperGoodsClassBySystemId(long id) {
|
| | |
|
| | |
| | |
|
| | | public Integer doInHibernate(Session session)
|
| | | throws HibernateException {
|
| | | System system = systemService.getSystem(platform, packageName);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform, packageName);
|
| | | Transaction transaction = session.beginTransaction();
|
| | | Query query = session.createQuery("delete SuperGoodsClass shs "
|
| | | + " where shs.goodsClass.id=? and shs.system.id=?");
|
| | |
| | |
|
| | | public void addSuperGoodsClass(long gcid, String platform,
|
| | | String packageName) {
|
| | | System system = systemService.getSystem(platform,packageName);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystem(platform,packageName);
|
| | | SuperGoodsClass superGoodsClass = new SuperGoodsClass();
|
| | | GoodsClass goodsClass = new GoodsClass();
|
| | | goodsClass.setId(gcid);
|