|
|
|
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.domain.po.WxBusiness; |
|
|
|
import com.iformall.mapper.WxBusinessMapper; |
|
|
|
import com.iformall.service.WxBusinessService; |
|
|
|
import io.swagger.models.auth.In; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -18,39 +19,15 @@ public class WxBusinessServiceImpl implements WxBusinessService { |
|
|
|
@Autowired |
|
|
|
WxBusinessMapper wxBusinessMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxBusiness> listAsPage(WxBusiness record, Integer pageIndex, Integer pageSize) { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBusinessMapper.findList(record)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public WxBusiness getById(Long id) { |
|
|
|
public WxBusiness getById(Integer id) { |
|
|
|
return wxBusinessMapper.selectByPrimaryKey(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void saveOrUpdate(WxBusiness record) { |
|
|
|
if (record.getId() == null) { |
|
|
|
//record.setId(UUID.randomUUID().toString().replaceAll("-", "")); |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
wxBusinessMapper.insertSelective(record); |
|
|
|
} else { |
|
|
|
wxBusinessMapper.updateByPrimaryKeySelective(record); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void deleteById(Long id) { |
|
|
|
wxBusinessMapper.deleteByPrimaryKey(id); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |