package com.steering.pss.sale.order.ReviewForm;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;
import com.steering.comm.db.DBCommon;
import com.steering.comm.tools.EntityTool;
import com.steering.pss.sale.order.model.SlmOrderReviewItemSignEntity;

public class SlmOrderReviewItemSignService extends DBCommon {

    public CoreReturnObject doQuery(){
        return this.getData(CoreXmlSqlParsersFactory.getSql("SlmOrderReviewItemSignService.doQuery"));
    }

    public CoreReturnObject doInsert(String json){
        String sql = CoreXmlSqlParsersFactory.getSql("SlmOrderReviewItemSignService.doInsert");
        SlmOrderReviewItemSignEntity entity = EntityTool.getEntityByJSONStr(json, SlmOrderReviewItemSignEntity.class);
        sql = EntityTool.fillSqlByEntity(sql,entity);
        return this.setData(sql);
    }

    public CoreReturnObject doUpdate(String json){
        String sql = CoreXmlSqlParsersFactory.getSql("SlmOrderReviewItemSignService.doUpdate");
        SlmOrderReviewItemSignEntity entity = EntityTool.getEntityByJSONStr(json, SlmOrderReviewItemSignEntity.class);
        sql = EntityTool.fillSqlByEntity(sql,entity);
        return this.setData(sql);
    }

    public CoreReturnObject doDelete(String id){
        String sql = CoreXmlSqlParsersFactory.getSql("SlmOrderReviewItemSignService.doDelete");
        return this.setData(sql,new Object[]{id});
    }
}
