|
@@ -9,8 +9,10 @@ import com.iamberry.wechat.face.mq.EfastOrderService;
|
|
|
import com.iamberry.wechat.face.warranty.WarrantyService;
|
|
|
import com.iamberry.wechat.service.mapper.ProductInfoMapper;
|
|
|
import com.iamberry.wechat.service.mapper.WarrantyMapper;
|
|
|
+import com.iamberry.wechat.service.member.dao.MemberDao;
|
|
|
import com.iamberry.wechat.tools.ResultInfo;
|
|
|
import net.sf.json.JSONArray;
|
|
|
+import org.elasticsearch.common.inject.assistedinject.AssistedInject;
|
|
|
import org.hibernate.validator.constraints.URL;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -35,7 +37,8 @@ public class WarrantyServiceImpl implements WarrantyService {
|
|
|
private SystemService systemService;
|
|
|
@Autowired
|
|
|
private WarrantyMapper warrantyMapper;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private MemberDao memberDao;
|
|
|
@Override
|
|
|
public boolean addWarrantyList(String txtOrderId, Member member, String cardWatero,
|
|
|
String cardProvince, String cardCity, String cardDistrict) throws Exception {
|
|
@@ -104,9 +107,14 @@ public class WarrantyServiceImpl implements WarrantyService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //修改用户信息
|
|
|
+ int count = memberDao.updateMemberByUserId(member);
|
|
|
//批量添加质保卡信息
|
|
|
- int num = warrantyMapper.addWarrantyCardList(cardList);
|
|
|
- if (num > 0) {
|
|
|
+ int num = 1;
|
|
|
+ if (cardList != null && cardList.size() > 0) {
|
|
|
+ num = warrantyMapper.addWarrantyCardList(cardList);
|
|
|
+ }
|
|
|
+ if (num > 0 && count > 0) {
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|