| | |
| | | if (brandClass ==null || brandClass.getId() == null)
|
| | | throw new BrandInfoException(1, "分类不能为空");
|
| | |
|
| | | String shopKey = record.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | record.setShopKey(name);
|
| | | |
| | | String searchKey = record.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | record.setSearchKey(name);
|
| | | BrandInfo existBrand = brandInfoMapper.selectByUniqueName(name.trim(), brandClass.getId(), record.getId());
|
| | | if (existBrand != null)
|
| | | throw new BrandInfoException(1, "该分类中已存在:" + name.trim());
|
| | |
|
| | | Integer state = record.getState();
|
| | | if (state == null) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | record.setName(name.trim());
|
| | | Long id = record.getId();
|
| | | if (id == null) {
|
| | | record.setCreateTime(new Date());
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<BrandInfo> listQuery(long start, int count, String key, Long cid, Integer state) {
|
| | | return brandInfoMapper.listQuery(start, count, key, cid, state);
|
| | | public List<BrandInfo> listQuery(long start, int count, List<String> keys, Long cid, Integer state, Integer showState) {
|
| | | return brandInfoMapper.listQuery(start, count, keys, cid, state,showState);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countQuery(String key, Long cid, Integer state) {
|
| | | return brandInfoMapper.countQuery(key, cid, state);
|
| | | public long countQuery(List<String> keys, Long cid, Integer state, Integer showState) {
|
| | | return brandInfoMapper.countQuery(keys, cid, state, showState);
|
| | | }
|
| | |
|
| | | @Override
|