客户回调接口新增有效无效

master
Caps 6 years ago
parent 13e247d4a9
commit b5052873d7

@ -144,6 +144,18 @@ public class CustomerService {
insertRelation.setUserId(sellerId);
insertRelation.setCreateBy(Constants.SYS_OPERATION);
insertRelation.setUpdateBy(Constants.SYS_OPERATION);
//判断是否有效
QueryWrapper<OpSellerCustomerRelation> wrapper = new QueryWrapper<>();
wrapper.eq("customer_id",opCustomer.getId()).last("limit 1");
OpSellerCustomerRelation op = opSellerCustomerRelationDOMapper.selectOne(wrapper);
if(op == null){
//有效
insertRelation.setType(1);
}else {
//无效
insertRelation.setType(2);
}
opSellerCustomerRelationDOMapper.insert(insertRelation);
}
}

@ -36,6 +36,11 @@ public class OpSellerCustomerRelation {
*/
private Long storeId;
/**
*
*/
private Integer type;
/**
*
*/

Loading…
Cancel
Save