|
@@ -9,6 +9,8 @@ import com.uas.platform.b2c.prod.commodity.model.ProductAttachSubmit;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.ProductAttachService;
|
|
import com.uas.platform.b2c.prod.commodity.service.ProductAttachService;
|
|
|
import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
|
|
import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
|
|
|
import com.uas.platform.b2c.prod.product.component.modal.Component;
|
|
import com.uas.platform.b2c.prod.product.component.modal.Component;
|
|
|
|
|
+import com.uas.platform.b2c.trade.support.CodeType;
|
|
|
|
|
+import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -89,4 +91,38 @@ public class ProductAttachServiceImpl implements ProductAttachService {
|
|
|
}
|
|
}
|
|
|
return submit;
|
|
return submit;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResultMap auditSuccess(ProductAttachSubmit submit) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResultMap auditFailed(Long submitId, String reason) {
|
|
|
|
|
+ ResultMap map = new ResultMap();
|
|
|
|
|
+ ProductAttachSubmit submit = productAttachSubmitDao.findOne(submitId);
|
|
|
|
|
+ if (submit == null) {
|
|
|
|
|
+ return new ResultMap(CodeType.NOT_EXiST, "此申请不存在,请重新确认申请信息");
|
|
|
|
|
+ } else if (submit.getStatus() == null || Status.UNAUDIT.value() != submit.getStatus()){
|
|
|
|
|
+ return new ResultMap(CodeType.NOT_PERMIT, "此申请不为待审核状态,请重新确认申请信息");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ submit.setStatus(Status.NOTALLOW.value());
|
|
|
|
|
+ submit.setAuditTime(new Date());
|
|
|
|
|
+ if (SystemSession.getUser() == null || SystemSession.getUser().getEnterprise() == null) {
|
|
|
|
|
+ return new ResultMap(CodeType.NO_AUTHORITY, "操作人员信息不可为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ submit.setAuditUu(SystemSession.getUser().getUserUU());
|
|
|
|
|
+ submit.setAuditEnuu(SystemSession.getUser().getEnterprise().getUu());
|
|
|
|
|
+ submit.setReason(reason);
|
|
|
|
|
+ submit = productAttachSubmitDao.save(submit);
|
|
|
|
|
+
|
|
|
|
|
+ return ResultMap.success(submit);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResultMap chooseAttach(String attach, ProductAttachSubmit productAttachSubmit) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|