I need to change some code in b2bacceleratoraddon, but I don't want to change the standard code.
Is there any standard way to copy the addon with a new custom addon? or should I change standard code?
Its depends on what you want to override?
Approach 1: Override functionality using your custom addon, For example this
Approach 2: Use the customize folder
If you have small change and you need quick fix, I think you can use this approach. All you need to do is create a customize folder under the config folder and place your customized file there with the same folder structure and name as OOTB. Then you need to run ant customize
(This internally replace OOTB files with the customized file from the customize folder)
e.g. If you have a small fix/change in the AssistedServiceComponentController.java of acceleratoraddon, then you can copy the file, make your changes and place at below mentioned path and run ant customize
\config\customize\ext-addon\assistedservicestorefront\acceleratoraddon\web\src\de\hybris\platform\assistedservicestorefront\controllers\cms\AssistedServiceComponentController.java
Approach 3: Create custom addon using OOTB addon as the template
You can make the current OOTB addon as the template and run ant extgen
to generate your custom addon making the OOTB addon as the base template. Refer this.
Be mindful here, as you will not get new functionality or changes when you upgrade your platform.