You've already forked FrameTour-BE
景区账号管理
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
package com.ycwl.basic.service.pc;
|
||||
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity;
|
||||
import com.ycwl.basic.model.pc.scenic.req.ScenicAccountReqQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ScenicAccountService {
|
||||
int addScenicAccount(ScenicAccountEntity entity);
|
||||
int deleteScenicAccount(Long id);
|
||||
int updateScenicAccount(ScenicAccountEntity entity);
|
||||
ScenicAccountEntity getScenicAccountById(Long id);
|
||||
ScenicAccountEntity getSuperAccountByScenicId(Long scenicId);
|
||||
|
||||
// 新增分页查询方法定义
|
||||
List<ScenicAccountEntity> pageQuery(ScenicAccountReqQuery req);
|
||||
|
||||
int updateStatus(Long id);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.ycwl.basic.service.pc.impl;
|
||||
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity;
|
||||
import com.ycwl.basic.model.pc.scenic.req.ScenicAccountReqQuery;
|
||||
import com.ycwl.basic.service.pc.ScenicAccountService;
|
||||
import com.ycwl.basic.utils.SnowFlakeUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ycwl.basic.mapper.ScenicAccountMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ScenicAccountServiceImpl implements ScenicAccountService {
|
||||
@Autowired
|
||||
private ScenicAccountMapper mapper;
|
||||
|
||||
@Override
|
||||
public int addScenicAccount(ScenicAccountEntity entity) {
|
||||
if (entity.getId() == null) {
|
||||
entity.setId(SnowFlakeUtil.getLongId());
|
||||
}
|
||||
return mapper.add(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteScenicAccount(Long id) {
|
||||
return mapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateScenicAccount(ScenicAccountEntity entity) {
|
||||
return mapper.update(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScenicAccountEntity getScenicAccountById(Long id) {
|
||||
return mapper.findAccountById(String.valueOf(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScenicAccountEntity getSuperAccountByScenicId(Long scenicId) {
|
||||
return mapper.getSuperAccountOfScenic(scenicId);
|
||||
}
|
||||
|
||||
// 新增分页查询实现
|
||||
@Override
|
||||
public List<ScenicAccountEntity> pageQuery(ScenicAccountReqQuery req) {
|
||||
return mapper.pageQuery(req);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateStatus(Long id) {
|
||||
return mapper.updateStatus(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user