package com.qtzl.alterSales.manager.handler; | |||||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||||
import com.qtzl.alterSales.manager.abstracts.AbstractAfterSalesManager; | |||||
import com.qtzl.alterSales.manager.model.protocol.NoAttributeResponse; | |||||
import com.qtzl.alterSales.manager.model.protocol.UcServiceError; | |||||
import com.qtzl.alterSales.manager.model.protocol.sales.AflBydDashboardRePushRequest; | |||||
import com.qtzl.alterSales.manager.service.AflBydDashboardService; | |||||
import com.qtzl.alterSales.manager.service.AfterSalesCmd; | |||||
import com.txffp.api.core.manager.comm.annotation.ApiHandler; | |||||
import org.springframework.stereotype.Service; | |||||
import javax.annotation.Resource; | |||||
/*** | |||||
* <p> | |||||
* 数据看板-重推 | |||||
* </p> | |||||
* @author hou yi | |||||
* {@code @date} 2024/4/9 9:21 | |||||
**/ | |||||
@Service | |||||
@ApiHandler | |||||
public class AflBydDashboardRePushHandler extends AbstractAfterSalesManager<AflBydDashboardRePushRequest> { | |||||
@Resource | |||||
private AflBydDashboardService dashboardService; | |||||
public AflBydDashboardRePushHandler() { | |||||
super(AfterSalesCmd.BYDDASHBOARDREPUSH, AflBydDashboardRePushRequest.class); | |||||
} | |||||
@Override | |||||
public String handleInternal(String filename, AflBydDashboardRePushRequest request) throws ServiceHandleException { | |||||
try { | |||||
logger.info("选装-比亚迪看板-重推,请求参数:{}", request.toJson(true)); | |||||
dashboardService.rePush(request.getId()); | |||||
return new NoAttributeResponse().toJson(); | |||||
} catch (Exception e) { | |||||
if (e instanceof ServiceHandleException) { | |||||
throw e; | |||||
} | |||||
logger.error("选装-比亚迪看板-重推:{}", e.getMessage()); | |||||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("重推失败"); | |||||
} | |||||
} | |||||
} |
package com.qtzl.alterSales.manager.handler; | |||||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||||
import com.qtzl.alterSales.manager.abstracts.AbstractAfterSalesManager; | |||||
import com.qtzl.alterSales.manager.model.protocol.NoAttributeResponse; | |||||
import com.qtzl.alterSales.manager.model.protocol.UcServiceError; | |||||
import com.qtzl.alterSales.manager.model.protocol.sales.AflBydDashboardSpRequest; | |||||
import com.qtzl.alterSales.manager.service.AflBydDashboardService; | |||||
import com.qtzl.alterSales.manager.service.AfterSalesCmd; | |||||
import com.txffp.api.core.manager.comm.annotation.ApiHandler; | |||||
import org.springframework.stereotype.Service; | |||||
import javax.annotation.Resource; | |||||
/*** | |||||
* <p> | |||||
* 数据看板-补推 | |||||
* </p> | |||||
* @author hou yi | |||||
* {@code @date} 2024/4/9 9:21 | |||||
**/ | |||||
@Service | |||||
@ApiHandler | |||||
public class AflBydDashboardSpHandler extends AbstractAfterSalesManager<AflBydDashboardSpRequest> { | |||||
@Resource | |||||
private AflBydDashboardService dashboardService; | |||||
public AflBydDashboardSpHandler() { | |||||
super(AfterSalesCmd.BYDDASHBOARDSR, AflBydDashboardSpRequest.class); | |||||
} | |||||
@Override | |||||
public String handleInternal(String filename, AflBydDashboardSpRequest request) throws ServiceHandleException { | |||||
try { | |||||
logger.info("选装-比亚迪看板-补推,请求参数:{}", request.toJson(true)); | |||||
dashboardService.supplementaryRecommendation(request.getId()); | |||||
return new NoAttributeResponse().toJson(); | |||||
} catch (Exception e) { | |||||
if (e instanceof ServiceHandleException) { | |||||
throw e; | |||||
} | |||||
logger.error("选装-比亚迪看板-补推:{}", e.getMessage()); | |||||
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("补推失败"); | |||||
} | |||||
} | |||||
} |
package com.qtzl.alterSales.manager.model.protocol.sales; | |||||
import cn.com.taiji.common.model.BaseModel; | |||||
import com.qtzl.alterSales.manager.service.AfterSalesCmd; | |||||
import com.txffp.api.core.manager.comm.annotation.Api; | |||||
/*** | |||||
* <p> | |||||
* 比亚迪看板数据重推 | |||||
* </p> | |||||
* @author hou yi | |||||
* {@code @date} 2024/4/9 9:17 | |||||
**/ | |||||
@Api(cmdClazz = AfterSalesCmd.class, cmd = "BYDDASHBOARDREPUSH") | |||||
public class AflBydDashboardRePushRequest extends BaseModel { | |||||
private String id; | |||||
public String getId() { | |||||
return id; | |||||
} | |||||
public void setId(String id) { | |||||
this.id = id; | |||||
} | |||||
} |
package com.qtzl.alterSales.manager.model.protocol.sales; | |||||
import cn.com.taiji.common.model.BaseModel; | |||||
import com.qtzl.alterSales.manager.service.AfterSalesCmd; | |||||
import com.txffp.api.core.manager.comm.annotation.Api; | |||||
/*** | |||||
* <p> | |||||
* 比亚迪看板数据补推 | |||||
* </p> | |||||
* @author hou yi | |||||
* {@code @date} 2024/4/9 9:17 | |||||
**/ | |||||
@Api(cmdClazz = AfterSalesCmd.class, cmd = "BYDDASHBOARDSR") | |||||
public class AflBydDashboardSpRequest extends BaseModel { | |||||
private String id; | |||||
public String getId() { | |||||
return id; | |||||
} | |||||
public void setId(String id) { | |||||
this.id = id; | |||||
} | |||||
} |